From b0f2d577a1034e93c28f9140a4e3fd07bce1aa7a Mon Sep 17 00:00:00 2001 From: Kacper Falat Date: Wed, 20 Sep 2023 10:29:03 +0200 Subject: [PATCH] Resolved all requested changes. --- src/libs/models/BankAccount.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libs/models/BankAccount.ts b/src/libs/models/BankAccount.ts index c1557cdef324..90ce49945840 100644 --- a/src/libs/models/BankAccount.ts +++ b/src/libs/models/BankAccount.ts @@ -19,7 +19,7 @@ type ACHData = { }; class BankAccount { - public static readonly STATE = { + static readonly STATE = { PENDING: 'PENDING', OPEN: 'OPEN', DELETED: 'DELETED', @@ -182,28 +182,28 @@ class BankAccount { * @returns - country of the bank account. */ getCountry(): string { - return this.json.accountData?.additionalData?.country as string || CONST.COUNTRY.US; + return this.json.accountData?.additionalData?.country ?? CONST.COUNTRY.US; } /** * @returns - currency of the bank account. */ getCurrency(): string { - return this.json.accountData?.additionalData?.currency as string || "USD"; + return this.json.accountData?.additionalData?.currency ?? "USD"; } /** * @returns - bank name of the bank account. */ getBankName(): string { - return this.json.accountData?.additionalData?.bankName as string || ""; + return this.json.accountData?.additionalData?.bankName ?? ""; } /** * @returns - Information if did we get bank account details for local transfer or international wire. */ hasInternationalWireDetails(): boolean { - return this.json.accountData?.additionalData?.fieldsType as string === 'international'; + return this.json.accountData?.additionalData?.fieldsType === 'international'; } /**