diff --git a/src/components/AddWithdraw/DynamicBankAccountForm.tsx b/src/components/AddWithdraw/DynamicBankAccountForm.tsx index 79e3c9603..534d99fcb 100644 --- a/src/components/AddWithdraw/DynamicBankAccountForm.tsx +++ b/src/components/AddWithdraw/DynamicBankAccountForm.tsx @@ -32,7 +32,7 @@ export type IBankAccountDetails = { city: string state: string postalCode: string - iban?: string + iban: string country: string } @@ -185,7 +185,7 @@ export const DynamicBankAccountForm = forwardRef<{ handleSubmit: () => void }, D const result = await onSuccess(payload as AddBankAccountPayload, { ...data, - iban: isIban ? data.accountNumber || iban : undefined, + iban: isIban ? data.accountNumber || iban || '' : '', accountNumber: isIban ? '' : data.accountNumber, bic: bic, country, diff --git a/src/components/Claim/Link/views/BankFlowManager.view.tsx b/src/components/Claim/Link/views/BankFlowManager.view.tsx index 5cbdda8ff..e9b37f297 100644 --- a/src/components/Claim/Link/views/BankFlowManager.view.tsx +++ b/src/components/Claim/Link/views/BankFlowManager.view.tsx @@ -246,12 +246,16 @@ export const BankFlowManager = (props: IClaimScreenProps) => { name: addBankAccountResponse.data.details.accountOwnerName || user?.user.fullName || '', iban: addBankAccountResponse.data.type === 'iban' - ? addBankAccountResponse.data.identifier - : undefined, + ? addBankAccountResponse.data.identifier || '' + : '', clabe: - addBankAccountResponse.data.type === 'clabe' ? addBankAccountResponse.data.identifier : '', + addBankAccountResponse.data.type === 'clabe' + ? addBankAccountResponse.data.identifier || '' + : '', accountNumber: - addBankAccountResponse.data.type === 'us' ? addBankAccountResponse.data.identifier : '', + addBankAccountResponse.data.type === 'us' + ? addBankAccountResponse.data.identifier || '' + : '', country: addBankAccountResponse.data.details.countryCode, id: addBankAccountResponse.data.id, bridgeAccountId: addBankAccountResponse.data.bridgeAccountId, @@ -360,9 +364,9 @@ export const BankFlowManager = (props: IClaimScreenProps) => { const bankDetails: IBankAccountDetails & { id?: string; bridgeAccountId?: string } = { name: account.details.accountOwnerName || user?.user.fullName || '', - iban: account.type === 'iban' ? account.identifier : undefined, - clabe: account.type === 'clabe' ? account.identifier : '', - accountNumber: account.type === 'us' ? account.identifier : '', + iban: account.type === 'iban' ? account.identifier || '' : '', + clabe: account.type === 'clabe' ? account.identifier || '' : '', + accountNumber: account.type === 'us' ? account.identifier || '' : '', country: account.details.countryCode, id: account.id, bridgeAccountId: account.bridgeAccountId,