mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 10:43:35 +00:00
[PM-1823] Defining the card brand according to its number (#5204)
* Defining the card brand according to its number * Moving cardBrandByPatterns function to Card View * Getting Card brand via cardBrandByPatterns function * Changing cardBrandByPatterns method to static. See: The reason being that someone wanting to use this outside of the onCardNumberChange would need to know to set the cc-number on the view-model before calling cardBrandByPatterns * Defining the card brand according to its number on Desktop * Defining the card brand according to its number on Web
This commit is contained in:
@@ -122,7 +122,7 @@ export class LastPassCsvImporter extends BaseImporter implements Importer {
|
||||
card.cardholderName = this.getValueOrDefault(value.ccname);
|
||||
card.number = this.getValueOrDefault(value.ccnum);
|
||||
card.code = this.getValueOrDefault(value.cccsc);
|
||||
card.brand = this.getCardBrand(value.ccnum);
|
||||
card.brand = CardView.getCardBrandByPatterns(card.number);
|
||||
|
||||
if (!this.isNullOrWhitespace(value.ccexp) && value.ccexp.indexOf("-") > -1) {
|
||||
const ccexpParts = (value.ccexp as string).split("-");
|
||||
|
||||
Reference in New Issue
Block a user