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

[$500] Android - Wallet - Expensify terms of service checkbox is not shown when adding BA using Enable Wallet #32407

Closed
1 of 6 tasks
kbecciv opened this issue Dec 2, 2023 · 27 comments
Assignees
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors NewFeature Something to build that is a new item.

Comments

@kbecciv
Copy link

kbecciv commented Dec 2, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.7-0
Reproducible in staging?: y
Reproducible in production?: cannot check production
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Launch app
  2. Tap profile icon
  3. Tap Wallet
  4. Tap "Enable Wallet"
  5. Tap continue and select Bank "chase"
  6. Tap continue to login
  7. Enter the credentials and complete the flow selecting "plaid saving ending 1111"
  8. In Add Bank account page, note no message under under "plaid saving 1111"

Expected Result:

Expensify terms of service checkbox must be displayed when adding Bank account using "Enable wallet"

Actual Result:

Expensify terms of service checkbox is not displayed when adding Bank account using "Enable wallet"

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6298331_1701499589777.h6.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d1378f851b3082b9
  • Upwork Job ID: 1731744794475872256
  • Last Price Increase: 2023-12-11
Issue OwnerCurrent Issue Owner: @pecanoro
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Dec 2, 2023
Copy link
Contributor

github-actions bot commented Dec 2, 2023

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Dec 2, 2023

Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@bernhardoj
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

The add bank account page from "Enable Wallet" button doesn't show a terms of service checkbox which is different from the add bank account page from the workspace bank account.

What is the root cause of that problem?

The add bank account page from "Enable Wallet" component is AddPersonalBankAccountPage. I think we never have a terms of service checkbox in that component.

What changes do you think we should make in order to solve the problem?

If we want to add it, we can add it like in BankAccountPlaidStep,

{Boolean(selectedPlaidAccountID) && !_.isEmpty(lodashGet(plaidData, 'bankAccounts')) && (
    <InputWrapper
        InputComponent={CheckboxWithLabel}
        accessibilityLabel={`${translate('common.iAcceptThe')} ${translate('common.expensifyTermsOfService')}`}
        style={styles.mt4}
        inputID="acceptTerms"
        LabelComponent={() => (
            <Text>
                {translate('common.iAcceptThe')}
                <TextLink href={CONST.TERMS_URL}>{translate('common.expensifyTermsOfService')}</TextLink>
            </Text>
        )}
    />
)}

and add a validation for the checkbox just like in BankAccountPlaidStep too.

const validate = useCallback((values) => {
const errorFields = {};
if (!values.acceptTerms) {
errorFields.acceptTerms = 'common.error.acceptTerms';
}
return errorFields;
}, []);

@pecanoro pecanoro removed the DeployBlockerCash This issue or pull request should block deployment label Dec 4, 2023
@melvin-bot melvin-bot bot added the Overdue label Dec 4, 2023
@pecanoro
Copy link
Contributor

pecanoro commented Dec 4, 2023

Not a deploy blocker since this has never existed in the component.

@melvin-bot melvin-bot bot removed the Overdue label Dec 4, 2023
@pecanoro pecanoro added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed Hourly KSv2 labels Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

Triggered auto assignment to @garrettmknight (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

This comment was marked as off-topic.

@pecanoro pecanoro added the NewFeature Something to build that is a new item. label Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

Current assignee @garrettmknight is eligible for the NewFeature assigner, not assigning anyone new.

@pecanoro pecanoro removed the Bug Something is broken. Auto assigns a BugZero manager. label Dec 4, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Dec 4, 2023
@pecanoro
Copy link
Contributor

pecanoro commented Dec 4, 2023

Not a bug, I forgot the NewFeature one also adds a BZ member.

@pecanoro
Copy link
Contributor

pecanoro commented Dec 4, 2023

Ok, so after discussion, we do want to add the checkbox but we need to make sure we are sending the data to the back-end the same way we do when adding a business account!

@pecanoro pecanoro added the External Added to denote the issue can be worked on by a contributor label Dec 4, 2023
@melvin-bot melvin-bot bot changed the title Android - Wallet - Expensify terms of service checkbox is not shown when adding BA using Enable Wallet [$500] Android - Wallet - Expensify terms of service checkbox is not shown when adding BA using Enable Wallet Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01d1378f851b3082b9

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

📣 @postonsundays! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@happy-devs
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.

The Expensify terms of service checkbox is not shown when trying to add a personal bank account using Enable Wallet.

What is the root cause of that problem?

A checkbox with the terms of service label does not currently exist in the AddPersonalBankAccountPage user flow.

What changes do you think we should make in order to solve the problem?

As @bernhardoj mentioned, inserting an InputWrapper component as the first child of the FormProvider component and similar validation to the BankAccountPlaidStep is enough to prompt user confirmation.

The following changes to https://github.com/Expensify/App/blob/6dbaa4a7ac8c8142a452bf2a059a16b2947616c9/src/pages/AddPersonalBankAccountPage.js#L64`:

LINE 64:

const shouldShowTOS = Boolean(selectedPlaidAccountId) && !_.isEmpty(lodashGet(plaidData, 'bankAccounts'));

LINE 69:

const validateBankAccountForm = useCallback((values) => {
        const errorFields = {};
        if (!values.acceptTerms) {
            errorFields.acceptTerms = 'common.error.acceptTerms';
        }

        return errorFields;
    }, []);

LINE 117:

<FormProvider
                    formID={ONYXKEYS.PERSONAL_BANK_ACCOUNT}
                    isSubmitButtonVisible={Boolean(selectedPlaidAccountId)}
                    submitButtonText={translate('common.saveAndContinue')}
                    scrollContextEnabled
                    onSubmit={submitBankAccountForm}
                    validate={validateBankAccountForm}
                    style={[styles.mh5, styles.flex1]}
                >
                    {shouldShowTOS && <InputWrapper
                        InputComponent={CheckboxWithLabel}
                        accessibilityLabel={`${translate('common.iAcceptThe')} ${translate('common.expensifyTermsOfService')}`}
                        style={styles.mt4}
                        inputID="acceptTerms"
                        LabelComponent={() => (
                            <Text>
                                {translate('common.iAcceptThe')}
                                <TextLink href={CONST.TERMS_URL}>{translate('common.expensifyTermsOfService')}</TextLink>
                            </Text>
                        )}
                    />}

It's unclear where the code to add a business account is as @pecanoro mentioned to compare how we are currently sending the data to the back-end, but as the proposed checkbox is only a confirmation step this should not affect the current flow.

Copy link

melvin-bot bot commented Dec 4, 2023

📣 @happy-devs! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@happy-devs
Copy link

Contributor details
Your Expensify account email: andrew@happysoft.dev
Upwork Profile Link: https://www.upwork.com/en-gb/freelancers/happysoft

Copy link

melvin-bot bot commented Dec 4, 2023

⚠️ Missing/invalid email or upwork profile link. Please make sure you add both your Expensify email and Upwork profile link in the format specified.

Copy link

melvin-bot bot commented Dec 4, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@happy-devs
Copy link

Contributor details
Your Expensify account email: andrew@happysoft.dev
Upwork Profile Link: [upwork.com/en-gb/freelancers/happysoft](https://www.upwork.com/en-gb/freelancers/~015d50ed7ac7d2d7ce)

Copy link

melvin-bot bot commented Dec 4, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@bernhardoj
Copy link
Contributor

we need to make sure we are sending the data to the back-end the same way we do when adding a business account!

@pecanoro what should be the parameter name for the checkbox value?

Looking at the add business bank account API, we don't send the checkbox value (and I think it's gonna always be true).

function connectBankAccountWithPlaid(bankAccountID: number, selectedPlaidBankAccount: PlaidBankAccount) {
const commandName = 'ConnectBankAccountWithPlaid';
type ConnectBankAccountWithPlaidParams = {
bankAccountID: number;
routingNumber: string;
accountNumber: string;
bank?: string;
plaidAccountID: string;
plaidAccessToken: string;
};
const parameters: ConnectBankAccountWithPlaidParams = {
bankAccountID,
routingNumber: selectedPlaidBankAccount.routingNumber,
accountNumber: selectedPlaidBankAccount.accountNumber,
bank: selectedPlaidBankAccount.bankName,
plaidAccountID: selectedPlaidBankAccount.plaidAccountID,
plaidAccessToken: selectedPlaidBankAccount.plaidAccessToken,
};
API.write(commandName, parameters, getVBBADataForOnyx());
}

@melvin-bot melvin-bot bot added the Overdue label Dec 7, 2023
@garrettmknight
Copy link
Contributor

@pecanoro starring you while we wait for your answer.

@pecanoro
Copy link
Contributor

pecanoro commented Dec 7, 2023

When looking into this I realized that we have something similar to accept the terms when enabling the wallet so I am double-checking in Slack to see of that is enough or we should add it again here.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Dec 7, 2023
Copy link

melvin-bot bot commented Dec 11, 2023

@garrettmknight, @akinwale, @pecanoro Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Dec 11, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Dec 13, 2023

@garrettmknight, @akinwale, @pecanoro Eep! 4 days overdue now. Issues have feelings too...

Copy link

melvin-bot bot commented Dec 15, 2023

@garrettmknight, @akinwale, @pecanoro 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@pecanoro
Copy link
Contributor

So it seems there is checkbox already for the wallet so we don't need one in this flow:

image (1)

@melvin-bot melvin-bot bot removed the Overdue label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

6 participants