Skip to content

[Payment due @ZhenjaHorbach] [Wise] [No QA] Confirm the Wise quote before paying a cross-currency report - #106141

Merged
grgia merged 20 commits into
Expensify:mainfrom
software-mansion-labs:@mikolajpochec/wise-quote-confirm-modal
Nov 6, 2026
Merged

grgia merged 20 commits into
Expensify:mainfrom
software-mansion-labs:@mikolajpochec/wise-quote-confirm-modal

Conversation

@mikolajpochec

@mikolajpochec mikolajpochec commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Explanation of Change

This PR shows the Wise quote before paying a report from a Wise business bank account, behind the wiseReimbursements beta. The quote shows when the report has requiresGlobalReimbursement and at least one of its expenses is in a currency other than the bank account's. The admin sees the report total, the debit amount, what the employee receives, the fees, the tax when Wise charges one and the FX rate, and pays with that quote (wiseQuoteID on PayMoneyRequest). Every other payment goes straight to PayMoneyRequest.

  • Pay stays disabled until GetWiseQuote returns. A failed quote shows its error in the card.
  • While the quote loads, one loader takes the space of a loaded card with a tax row, so the modal keeps its height.
  • Bulk pay opens a carousel when at least one selected report needs the quote. It shows every selected report: the ones with requiresGlobalReimbursement load a quote, the others show their amounts with zero fees. Pay all pays each report with its own quote.
  • Paying only the unheld expenses from the hold menu opens the quote over the hold menu, with the unheld amount.
  • One-tap Pay on a Search row opens the report instead, where the admin pays through the quote.
  • ConfirmModal takes isConfirmDisabled, which also turns off the Enter shortcut.
07-carousel-second-with-tax

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/692513
$ https://github.com/Expensify/Expensify/issues/692512
PROPOSAL:

Tests

Note

GetWiseQuote and paying through Wise aren't live on the backend yet, so the quote comes from the snippet below. Paying sends PayMoneyRequest with the quote, and the backend rejects it.

Please expand the section below to see instructions on getting the local testing data

Testing with a mocked Wise account and quote

The snippet adds a Wise bank account in USD by hand, makes it the workspace's reimbursement account, and sets requiresGlobalReimbursement on the reports and the currency of their expenses. A fetch of the bank account list overwrites the account, so run setUp again after a reload.

Paste this in the browser console (web) or run it through the JS debugger (native):

window.wiseQuoteTest = {
    setUp: async (policyID, reportIDs, currency = 'EUR', requiresGlobalReimbursement = true) => {
        const bankAccountID = 999001;
        const email = (await Onyx.get('session')).email;
        Onyx.merge('betaOverrides', {wiseReimbursements: true});
        await Onyx.merge('bankAccountList', {
            [bankAccountID]: {
                methodID: bankAccountID,
                accountType: 'bankAccount',
                title: 'Wise Checking',
                bankCurrency: 'USD',
                bankCountry: 'US',
                accountData: {
                    bankAccountID,
                    accountNumber: 'XXXX1234',
                    routingNumber: '011000015',
                    addressName: 'Boulder Development Inc.',
                    state: 'OPEN',
                    type: 'BUSINESS',
                    allowDebit: true,
                    additionalData: {currency: 'USD', country: 'US', isGlobalReimbursementEnabled: true, globalReimbursementProvider: 'WISE'},
                },
            },
        });
        await Onyx.merge(`policy_${policyID}`, {
            reimbursementChoice: 'reimburseYes',
            achAccount: {
                bankAccountID,
                accountNumber: 'XXXX1234',
                routingNumber: '011000015',
                addressName: 'Boulder Development Inc.',
                bankName: 'Wise Checking',
                reimburser: email,
                state: 'OPEN',
            },
        });
        const reportUpdate = {requiresGlobalReimbursement};
        const snapshots = (await Onyx.get('snapshot_')) ?? {};
        const transactions = Object.values((await Onyx.get('transactions_')) ?? {});
        for (const reportID of reportIDs) {
            await Onyx.merge(`report_${reportID}`, {...reportUpdate, wiseQuote: null, errorFields: {wiseQuote: null}});
            for (const transaction of transactions.filter((t) => t?.reportID === reportID)) {
                await Onyx.merge(`transactions_${transaction.transactionID}`, {currency, modifiedCurrency: ''});
            }
            for (const [key, snapshot] of Object.entries(snapshots)) {
                if (snapshot?.data?.[`report_${reportID}`]) {
                    await Onyx.merge(key, {data: {[`report_${reportID}`]: reportUpdate}});
                }
            }
        }
    },
    setQuote: (reportID, tax) =>
        Onyx.merge(`report_${reportID}`, {
            errorFields: {wiseQuote: null},
            wiseQuote: {
                wiseQuoteID: `test-${reportID}`,
                fee: 412,
                rate: 0.8623,
                debitedAmount: 15962,
                creditedAmount: 13409,
                currency: 'USD',
                paymentCurrency: 'EUR',
                expectedDate: '2026-11-07',
                expiresAt: '2026-11-06T17:00:00Z',
                tax,
            },
        }),
};

One report

  1. Run wiseQuoteTest.setUp('<policyID>', ['<reportA>']) for an approved expense report from another member
  2. Open report A and press Pay > "Pay with business account"
  3. Verify that "Confirm payment" opens with a loader and Pay disabled
  4. Verify that once GetWiseQuote fails, the card shows the report and the error, and Pay stays disabled
  5. Run wiseQuoteTest.setQuote('<reportA>')
  6. Verify that the card shows Report total, Debit amount, Employee will receive, Total fees and "FX rate $1 = €0.8623" with no Tax row, that Pay is enabled, and that the modal keeps its height
  7. Run wiseQuoteTest.setQuote('<reportA>', 82) and verify that a Tax row of $0.82 shows above the FX rate, with the modal keeping its height
  8. Press Cancel and verify that the report isn't paid
  9. Press Pay > "Pay with business account" again, run wiseQuoteTest.setQuote('<reportA>') and press Pay
  10. Verify that PayMoneyRequest is sent with wiseQuoteID: test-<reportA>

Several reports

  1. Run wiseQuoteTest.setUp('<policyID>', ['<reportA>', '<reportB>', '<reportC>']) for three approved expense reports
  2. Go to Spend > Reports, select reports A, B and C, and press Pay > "Pay with business account"
  3. Verify that "Confirm payment" shows "3 reports" with one loader, and that Pay all is disabled
  4. Run wiseQuoteTest.setQuote for A, B and C, and verify that no card shows a Tax row and that Pay all is enabled
  5. Press the arrows and swipe, and verify that the carousel moves card by card, with the next card showing at the edge
  6. Run wiseQuoteTest.setQuote('<reportB>', 82) and verify that only card B shows a Tax row, with every card and the modal keeping their height
  7. Run wiseQuoteTest.setQuote('<reportA>', 82) and wiseQuoteTest.setQuote('<reportC>', 82) and verify that every card shows a Tax row
  8. Press Cancel, run wiseQuoteTest.setUp('<policyID>', ['<reportC>'], 'EUR', false) and open the carousel again for A, B and C
  9. Verify that card C shows its amounts with zero fees and no loader, while A and B load their quotes
  10. Run wiseQuoteTest.setQuote for A and B, press Pay all and verify that PayMoneyRequest is sent for A and B with their wiseQuoteID, and for C without one

Currencies

  1. Run wiseQuoteTest.setUp('<policyID>', ['<reportA>'], 'USD'), press Pay > "Pay with business account" on report A and verify that it pays without the quote modal
  2. Run wiseQuoteTest.setUp('<policyID>', ['<reportA>'], 'EUR', false), press Pay > "Pay with business account" on report A and verify that it pays without the quote modal
  3. Run wiseQuoteTest.setUp('<policyID>', ['<reportB>', '<reportC>'], 'USD'), select B and C in Spend > Reports, press Pay > "Pay with business account" and verify that they're paid without the carousel

Use an account on the wiseReimbursements beta, or turn it on in Settings > Troubleshoot > Beta overrides. The account is an admin of a workspace whose reimbursement account is a USD business bank account with global reimbursements enabled through Wise. The workspace needs these approved expense reports:

  • At least three with expenses in a currency other than USD from members whose bank accounts are outside the US, where Wise charges a tax on at least one and on at least one it doesn't
  • One from a member whose bank account is in the US
  • Two with all expenses in USD

One report

  1. Open a report Wise doesn't charge a tax on and press Pay > "Pay with business account"
  2. Verify that "Confirm payment" opens with a loader and Pay disabled
  3. Verify that once the quote loads, the card shows Report total, Debit amount, Employee will receive, Total fees and FX rate with no Tax row, that Pay is enabled, and that the modal keeps its height
  4. Press Cancel and verify that the report isn't paid
  5. Open a report Wise charges a tax on, press Pay > "Pay with business account" and verify that the card shows a Tax row above the FX rate
  6. Press Pay and verify that PayMoneyRequest is sent with the quote's wiseQuoteID and the report is paid

Several reports

  1. Go to Spend > Reports, select at least two reports Wise doesn't charge a tax on, and press Pay > "Pay with business account"
  2. Verify that the carousel shows the number of reports with one loader, and that Pay all stays disabled until every quote loads
  3. Verify that no card shows a Tax row, and that the arrows and swiping move card by card
  4. Press Cancel, select reports with and without a tax, open the carousel and verify that only the taxed ones show a Tax row, with every card and the modal keeping their height
  5. Press Cancel, select only taxed reports, open the carousel and verify that every card shows a Tax row
  6. Press Cancel, select a report outside the US together with the report from the member with a US bank account, and open the carousel
  7. Verify that the US member's card shows its amounts with zero fees and no loader
  8. Press Pay all and verify that both reports are paid, the one outside the US with its wiseQuoteID

Currencies

  1. Pay a report with all expenses in USD with Pay > "Pay with business account" and verify that it pays without the quote modal
  2. Pay the report from the member with a US bank account on its own and verify that it pays without the quote modal
  3. Select both reports with USD expenses in Spend > Reports, press Pay > "Pay with business account" and verify that they're paid without the carousel
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

N/A

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

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

@melvin-bot

melvin-bot Bot commented Nov 5, 2026

Copy link
Copy Markdown

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx bun ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx bun ./scripts/generateTranslations.ts --compare-ref main

@mikolajpochec
mikolajpochec marked this pull request as ready for review November 5, 2026 19:33
@mikolajpochec
mikolajpochec requested review from a team as code owners November 5, 2026 19:33
@melvin-bot
melvin-bot Bot requested review from ZhenjaHorbach and removed request for a team November 5, 2026 19:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T19:59:12.922453Z ae0dff1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@melvin-bot

melvin-bot Bot commented Nov 5, 2026

Copy link
Copy Markdown

@ZhenjaHorbach Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot requested review from joekaufmanexpensify and removed request for a team November 5, 2026 19:33
}
};

const renderArrow = (direction: 'previous' | 'next') => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ CLEAN-REACT-PATTERNS-4 (docs)

renderArrow is an internal render helper that returns JSX, closes over mutable parent state (shownIndex, which derives from the targetIndex/currentIndex useState values) and bakes that state into the JSX it produces (isDisabled, the onPress target). The rule targets render helpers that carry non-trivial logic and embed mutable component state in the JSX they return; the recommended fix is to extract the helper into its own component with explicit props.

Extract the arrow into a dedicated component so the state it needs flows in via props:

function CarouselArrow({direction, isDisabled, onPress}: {direction: 'previous' | 'next'; isDisabled: boolean; onPress: () => void}) {
    const styles = useThemeStyles();
    const StyleUtils = useStyleUtils();
    const theme = useTheme();
    const {translate} = useLocalize();
    const icons = useMemoizedLazyExpensifyIcons(['ArrowRight', 'BackArrow']);
    const isPrevious = direction === 'previous';
    return (
        <PressableWithFeedback
            accessibilityRole="button"
            accessible
            accessibilityLabel={translate(isPrevious ? 'common.previous' : 'common.next')}
            style={[styles.reportPreviewArrowButton, StyleUtils.getBackgroundColorStyle(theme.buttonDefaultBG)]}
            onPress={onPress}
            disabled={isDisabled}
            disabledStyle={[styles.cursorDefault, styles.buttonOpacityDisabled]}
            sentryLabel={isPrevious ? CONST.SENTRY_LABEL.WISE_QUOTE_CAROUSEL.PREVIOUS : CONST.SENTRY_LABEL.WISE_QUOTE_CAROUSEL.NEXT}
        >
            <Icon src={isPrevious ? icons.BackArrow : icons.ArrowRight} fill={theme.icon} width={variables.iconSizeExtraSmall} height={variables.iconSizeExtraSmall} />
        </PressableWithFeedback>
    );
}

Then render <CarouselArrow direction="previous" isDisabled={shownIndex === 0} onPress={() => scrollToIndex(shownIndex - 1)} /> and the matching next arrow in the parent.


Reviewed at: ae0dff1 | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 96.03% <ø> (ø)
src/components/ConfirmContent.tsx 98.86% <100.00%> (+0.01%) ⬆️
src/components/ConfirmModal.tsx 100.00% <100.00%> (ø)
...firmationPage/composed/ConfirmationPageDefault.tsx 100.00% <ø> (ø)
...rc/components/Modal/Global/ConfirmModalWrapper.tsx 100.00% <100.00%> (ø)
...c/components/Modal/Global/HoldMenuModalWrapper.tsx 92.30% <100.00%> (+1.39%) ⬆️
...Item/MoneyRequestReportPreview/PayActionButton.tsx 96.80% <100.00%> (+0.03%) ⬆️
...h/SearchList/ListItem/ActionCell/PayActionCell.tsx 95.65% <100.00%> (+0.04%) ⬆️
...entSummary/components/WisePaymentSummaryHeader.tsx 100.00% <100.00%> (ø)
...aymentSummary/components/WisePaymentSummaryRow.tsx 100.00% <100.00%> (ø)
... and 23 more
... and 7 files with indirect coverage changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae0dff1579

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/hooks/usePayWithWiseQuote.ts Resolved
/** Pay stays disabled until the quote is on screen, since Wise requires the admin to see it before paying */
function WiseQuoteConfirmModalWrapper({closeModal, resolveModal, reportID, isPayingUnheldOnly, onConfirm}: WiseQuoteConfirmModalWrapperProps) {
const {translate} = useLocalize();
const [wiseQuoteID] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${getNonEmptyStringOnyxID(reportID)}`, {selector: (report) => report?.wiseQuote?.wiseQuoteID});

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expire or refresh quotes before enabling payment

If the confirmation modal remains open past report.wiseQuote.expiresAt (the new type documents a 30-minute lifetime), this selector retains only the ID and no time-based update ever disables the button, so the user can confirm and submit an expired price. Track expiresAt alongside the ID and disable or refresh the quote when it expires; the carousel selector needs the same treatment.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge-case. Should we handle that in a follow-up? @grgia

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread src/components/ConfirmContent.tsx Resolved
@ZhenjaHorbach

ZhenjaHorbach commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp
Screen.Recording.2026-11-06.at.21.08.13.mov
Android: mWeb Chrome
Screen.Recording.2026-11-06.at.12.13.45.mov
iOS: HybridApp
Screen.Recording.2026-11-06.at.21.08.13.mov
iOS: mWeb Safari
Screen.Recording.2026-11-06.at.12.13.45.mov
MacOS: Chrome / Safari
Screen.Recording.2026-11-06.at.11.59.29.mov

@ZhenjaHorbach

ZhenjaHorbach commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

On iOS native, the modal doesn't open after choosing a few reports
As a result, we can't use the app

Screen.Recording.2026-11-06.at.12.36.27.mov

dariusz-biela added a commit to dariusz-biela/pr-assets that referenced this pull request Nov 6, 2026
dariusz-biela added a commit to dariusz-biela/pr-assets that referenced this pull request Nov 6, 2026
@dariusz-biela

dariusz-biela commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Hold menu comes back after the Wise quote modal, so the report can be paid twice

ModalProvider renders only the top modal. Pushing the quote modal unmounts the hold menu while isVisible is still true, so onModalHide returns early and closeModalByID never runs. When the quote modal closes (Pay or Cancel), the hold menu is rendered again (useHoldMenuSubmit.ts).

In the video: Pay → Wise account → "Pay only $200.00" → Pay in the quote modal → the hold menu is back → "Pay $314.38" → Pay. One report gets two PayMoneyRequest calls (full: false, then full: true).

1-hold-menu-returns-double-pay.mp4
How the API was mocked

Web dev build against the dev backend, throwaway account, expenses in EUR. The Wise setup is merged into Onyx on the client: a USD Wise business bank account, achAccount on the workspace, the wiseReimbursements beta and requiresGlobalReimbursement on the report. Playwright intercepts two commands:

  • GetWiseQuote: after 1.5 s returns a quote priced on the whole report total, merged into report_<id>.wiseQuote.
  • PayMoneyRequest: returns jsonCode: 200 with no onyxData, so nothing is paid on the backend.

The box in the bottom-left corner logs the parameters of every intercepted request.

@dariusz-biela

dariusz-biela commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GetWiseQuote doesn't tell which amount is being paid

getWiseQuote sends only reportID, so "Pay only $200.00" and "Pay $314.38" send the identical request (see the log in the video). The backend can't price the unheld amount, so for one of the two options the admin approves a quote for a different amount than what gets paid.

In the video the mock prices the whole report, which is all it can do with reportID alone: the "Pay only" modal shows "Unheld amount being paid $200.00" next to "Debit amount $316.88".

3-wise-quote-ignores-pay-only.mp4
How the API was mocked

Web dev build against the dev backend, throwaway account, expenses in EUR. The Wise setup is merged into Onyx on the client: a USD Wise business bank account, achAccount on the workspace, the wiseReimbursements beta and requiresGlobalReimbursement on the report. Playwright intercepts two commands:

  • GetWiseQuote: after 1.5 s returns a quote priced on the whole report total, merged into report_<id>.wiseQuote.
  • PayMoneyRequest: returns jsonCode: 200 with no onyxData, so nothing is paid on the backend.

The box in the bottom-left corner logs the parameters of every intercepted request.

@grgia
grgia self-requested a review November 6, 2026 16:47
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@melvin-bot
melvin-bot Bot requested a review from grgia November 6, 2026 20:10
@melvin-bot melvin-bot Bot changed the title [Wise] [No QA] Confirm the Wise quote before paying a cross-currency report [Payment due @ZhenjaHorbach] [Wise] [No QA] Confirm the Wise quote before paying a cross-currency report Nov 6, 2026
@melvin-bot

melvin-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown

🎯 @ZhenjaHorbach, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/692513.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

BUG: missing row for same currency payments in bulk pay confirmation modal

Can we show: FX rate N/A?

2026-11-06_16-13-07.mp4

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Polish: spacing in confirmation modal seems incorrect

At least compared to mock

design doc

image

adhoc

image

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Polish: loader over quote that already exists

We shouldn't be showing a loader if we already have a quote

2026-11-06_16-24-28.mp4

@joekaufmanexpensify

Copy link
Copy Markdown
Contributor

Otherwise working really well!

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@grgia
grgia merged commit 62536e1 into Expensify:main Nov 6, 2026
37 of 38 checks passed
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🚧 grgia has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@OSBotify OSBotify mentioned this pull request Nov 7, 2026
85 tasks done
@OSBotify

OSBotify commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 9.5.34-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — the new Wise quote confirmation workflow remains behind the wiseReimbursements beta, and the remaining changes do not make existing help articles factually incorrect.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor

FullStory updates are warranted for the new Wise quote confirmation flow. Created Update FullStory for E/A#106141 Review and confirm cross-currency Wise reimbursement quotes with five suggestions covering custom elements, quote errors, and masking.

Added Weekly and assigned joekaufmanexpensify and mikolajpochec.


view run

@OSBotify

OSBotify commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.5.34-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants