Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Add the enableCardAfterVerified param to additionalData #3741

Merged
merged 2 commits into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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