mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
show last 5 on amex
This commit is contained in:
@@ -47,7 +47,10 @@ export class CardView implements View {
|
|||||||
} else {
|
} else {
|
||||||
this._subTitle = '';
|
this._subTitle = '';
|
||||||
}
|
}
|
||||||
this._subTitle += ('*' + this.number.substr(this.number.length - 4));
|
|
||||||
|
// Show last 5 on amex, last 4 for all others
|
||||||
|
const count = this.number.length >= 5 && this.number.match(new RegExp('^3[47]')) != null ? 5 : 4;
|
||||||
|
this._subTitle += ('*' + this.number.substr(this.number.length - count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this._subTitle;
|
return this._subTitle;
|
||||||
|
|||||||
Reference in New Issue
Block a user