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

[Workspace Feeds] Showing the request a limit increase button, despite the settlement account being set up with plaid. #48943

Open
1 of 6 tasks
kevinksullivan opened this issue Sep 10, 2024 · 6 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2

Comments

@kevinksullivan
Copy link
Contributor

we're showing the button to request a limit increase, despite the settlement account being set up with a plaid connection.

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


Reproducible in 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): kevinksullivan88+workspacefeed@gmail.com
Slack conversation: https://expensify.slack.com/archives/C036QM0SLJK/p1725976051148139

Action Performed:

  1. Add account to workspaceFeeds beta
  2. Sign in with test account
  3. Select Manage my team’s expenses
  4. Enter any business name / personal name
  5. Navigate to the workspace editor of the newly created workspace
  6. Navigate to More features tab
  7. Toggle on the feature
  8. Navigate to the Expensify Card page
  9. Select Issue new card, give the user a $2 limit
  10. Follow the steps for an OPEN bank account (option 3) of this SO
  11. Finish the setup process
  12. Issue a card
  13. Navigate back to the Expensify Card page
  14. Select the remaining limit info

Expected Result:

The Request limit increase button should not be shown. From the doc:

Remaining limit will also have a Request limit increase button when a company’s settlement account is NOT connected via plaid. When clicked the admin should be redirected to their DM with concierge, and this should also trigger a message from concierge requesting next steps for getting a higher limit (this flow exists today).

Actual Result:

The Request limit increase button is shown even though the bank account is connected to plaid.

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

Onyx data:

image

{
    "title": "Alberta Bobbeth Charleson",
    "description": "Account ending in 1111",
    "methodID": 5993587,
    "key": "bankAccount-5993587",
    "accountType": "bankAccount",
    "accountData": {
        "accountNumber": "XXXXXXXXXXXX1111",
        "additionalData": {
            "acceptTerms": true,
            "addressCity": "San Francisco",
            "addressState": "CA",
            "addressStreet": "88 Kearny Street",
            "addressZipCode": "94108",
            "approvedBy": "Automatic",
            "bankName": "Bank of America",
            "beneficialOwners": [],
            "certifyTrueInformation": true,
            "companyName": "Alberta Bobbeth Charleson",
            "companyPhone": "2035210374",
            "companyTaxID": "123456789",
            "country": "US",
            "currency": "USD",
            "currentStep": "EnableStep",
            "dateSigned": "2024-09-04 19:44:16",
            "dob": "2000-08-08",
            "fieldsType": "local",
            "firstName": "Alberta",
            "hasFullSSN": true,
            "hasNoConnectionToCannabis": true,
            "incorporationDate": "2017-08-02",
            "incorporationState": "AK",
            "incorporationType": "LLC",
            "industryCode": "325910",
            "isAuthorizedToUseBankAccount": true,
            "isControllingOfficer": true,
            "isOnfidoSetupComplete": true,
            "lastName": "Charleson",
            "lastUpdate": "2024-09-10 18:26:59",
            "mask": "1111",
            "ownsMoreThan25Percent": false,
            "plaidAccessToken": "access-sandbox-c01a8176-b985-4046-bc7e-121da4604351",
            "plaidAccountID": "7AaVzJ4AywcAzm9dX8KEiXeDeG31nAidyvWNM",
            "policyID": "57086C788336F9D3",
            "requestorAddressCity": "Kearny",
            "requestorAddressState": "NJ",
            "requestorAddressStreet": "88 Kearny Avenue",
            "requestorAddressZipCode": "07032",
            "setupType": "plaid",
            "ssnLast4": "3333",
            "verifications": {
                "blackListed": {
                    "isBankAccountCopy": false,
                    "isBlackListedAddress": false,
                    "isBlackListedName": false,
                    "isBlackListedUser": false,
                    "isFlagged": false
                }
            },
            "website": "https://www.company.com"
        },
        "addressName": "Alberta Bobbeth Charleson",
        "allowDebit": true,
        "bankAccountID": 5993587,
        "created": "2024-09-04 19:41:15",
        "defaultCredit": false,
        "expensifyCardDomain": "expensify-policy57086c788336f9d3.exfy",
        "isExpensifyCardSettlementAccount": true,
        "isSavings": true,
        "processor": "bancorp",
        "riskChecked": true,
        "routingNumber": "011401533",
        "sharees": [],
        "state": "OPEN",
        "type": "BUSINESS"
    },
    "isDefault": true
}

View all open jobs on GitHub

@kevinksullivan kevinksullivan added Daily KSv2 Internal Requires API changes or must be handled by Expensify staff Bug Something is broken. Auto assigns a BugZero manager. labels Sep 10, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

Triggered auto assignment to @jliexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@mountiny mountiny self-assigned this Sep 10, 2024
@koko57
Copy link
Contributor

koko57 commented Sep 11, 2024

Hey, I'm Agata from Callstack, I've been working on this feature, I can take a look 😊

@jliexpensify
Copy link
Contributor

Thanks, assigned you!

@koko57
Copy link
Contributor

koko57 commented Sep 11, 2024

ok, so it's still the problem with the bankAccount objects being different in AcceptACHContractForBankAccount and OpenPaymentsPage - after we're adding a bank account we don't have the additionalData object within the bankAccount - we have a flatter structure where plaidAccountID is the property of the accountData bankAccount object not additionalData. So it works ok when we remove additionalData and we check for accountData?.plaidAccountID instead of accountData?.additionalData?.plaidAccountID.

AcceptACHContractForBankAccount
Screenshot 2024-09-11 at 09 50 24

But, when we go to Wallet page response from OpenPaymentsPage is different and it has additionalData property and SET method for Onyx, so it overwrites the bankAccount data and when we go back to the Expensify Cards page this fix doesn't work anymore - without the fix it works ok (the button is not shown).

OpenPaymentsPage
Screenshot 2024-09-11 at 09 55 43

So we need to get the bankAccount object the very same from all the requests to either check for additionalData or not.

cc @mountiny @MariaHCD

@MariaHCD
Copy link
Contributor

Hmmm, this discrepancy sounds similar to https://github.com/Expensify/Auth/pull/12043

Seems like we need to properly clean up the formats such that they are not different across commands cc: @nkuoch

For now, can we add the plaidAccountID prop to accountData in AcceptACHContractForBankAccount? Alternatively should we just have the FE look for the prop in both accountData?.plaidAccountID and accountData?.additionalData?.plaidAccountID?

@mountiny
Copy link
Contributor

yeah lets fix this in App for now https://expensify.slack.com/archives/C036QM0SLJK/p1726058812587419?thread_ts=1725898727.642509&cid=C036QM0SLJK and then clean the data along with #47944

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2
Projects
Status: Release 2.5: SuiteWorld (Sept 9th)
Development

No branches or pull requests

5 participants