From 78164949343c427101b4e399c7f233f72ffb19ea Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 23 Jun 2021 11:33:28 -1000 Subject: [PATCH 1/2] Add enableCardAfterVerified --- src/libs/actions/BankAccounts.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/BankAccounts.js b/src/libs/actions/BankAccounts.js index b6d7cf18bb31..dbdf71b0b1e3 100644 --- a/src/libs/actions/BankAccounts.js +++ b/src/libs/actions/BankAccounts.js @@ -569,7 +569,16 @@ function setupWithdrawalAccount(data) { let nextStep; Onyx.merge(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {loading: true}); - const newACHData = {...reimbursementAccountInSetup, ...data}; + const newACHData = { + ...reimbursementAccountInSetup, + ...data, + + // This param tells Web-Secure that this bank account is from NewDot so we can modify links back to the correct + // app in any communications. It also will be used to provision a customer for the Expensify card automatically + // once their bank account is successfully validated. + enableCardAfterVerified: true, + }; + if (data && !_.isUndefined(data.isSavings)) { newACHData.isSavings = Boolean(data.isSavings); } From 82e4eff83448cae7b1904203f0167ce79b46c13e Mon Sep 17 00:00:00 2001 From: Marc Glasser Date: Wed, 23 Jun 2021 14:11:18 -1000 Subject: [PATCH 2/2] add enableCardAfterVerified --- src/libs/API.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/API.js b/src/libs/API.js index 39cda4472386..63b9c1264a0f 100644 --- a/src/libs/API.js +++ b/src/libs/API.js @@ -869,7 +869,7 @@ function BankAccount_Validate(parameters) { function BankAccount_SetupWithdrawal(parameters) { const commandName = 'BankAccount_SetupWithdrawal'; let allowedParameters = [ - 'currentStep', 'policyID', 'bankAccountID', 'useOnfido', 'errorAttemptsCount', + 'currentStep', 'policyID', 'bankAccountID', 'useOnfido', 'errorAttemptsCount', 'enableCardAfterVerified', // data from bankAccount step: 'setupType', 'routingNumber', 'accountNumber', 'addressName', 'plaidAccountID', 'ownershipType', 'isSavings',