Skip to content

Commit

Permalink
Merge pull request #3741 from Expensify/marcaaron-enableCardAfterVeri…
Browse files Browse the repository at this point in the history
…fied

[No QA] Add the enableCardAfterVerified param to additionalData
  • Loading branch information
marcaaron authored Jun 25, 2021
2 parents fffa33b + 82e4eff commit b55729a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 10 additions & 1 deletion src/libs/actions/BankAccounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b55729a

Please sign in to comment.