dashlane-csv-importer: Set month on import (#4284)

This commit is contained in:
Daniel James Smith 2023-01-23 15:52:38 +01:00 committed by GitHub
parent 72ec05a3e6
commit 6d2a2aa852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -79,8 +79,8 @@ describe("Dashlane CSV Importer", () => {
expect(cipher2.card.cardholderName).toBe("John Doe");
expect(cipher2.card.number).toBe("41111111111111111");
expect(cipher2.card.code).toBe("123");
expect(cipher2.card.expMonth).toBe("01");
expect(cipher2.card.expYear).toBe("23");
expect(cipher2.card.expMonth).toBe("1");
expect(cipher2.card.expYear).toBe("2023");
expect(cipher2.fields.length).toBe(2);

View File

@ -137,8 +137,7 @@ export class DashlaneCsvImporter extends BaseImporter implements Importer {
cipher.card.number = row.cc_number;
cipher.card.brand = this.getCardBrand(cipher.card.number);
cipher.card.code = row.code;
cipher.card.expMonth = row.expiration_month;
cipher.card.expYear = row.expiration_year.substring(2, 4);
this.setCardExpiration(cipher, `${row.expiration_month}/${row.expiration_year}`);
// If you add more mapped fields please extend this
mappedValues = [