diff --git a/src/app/(mobile-ui)/withdraw/page.tsx b/src/app/(mobile-ui)/withdraw/page.tsx index ed7ef7959..0f4a94dd4 100644 --- a/src/app/(mobile-ui)/withdraw/page.tsx +++ b/src/app/(mobile-ui)/withdraw/page.tsx @@ -33,7 +33,7 @@ export default function WithdrawPage() { setShowAllWithdrawMethods, } = useWithdrawFlow() - const initialStep: WithdrawStep = selectedMethod || selectedBankAccount ? 'inputAmount' : 'selectMethod' + const initialStep: WithdrawStep = selectedMethod ? 'inputAmount' : 'selectMethod' const [step, setStep] = useState(initialStep) @@ -218,8 +218,6 @@ export default function WithdrawPage() { }, [rawTokenAmount, maxDecimalAmount, error.showError, selectedTokenData?.price]) if (step === 'inputAmount') { - const methodTitle = selectedMethod?.title || selectedMethod?.countryPath || 'Selected method' - return (
= ({ pageTitle={pageTitle} onPrev={onBackClick || defaultBackNavigation} savedAccounts={savedAccounts} - onAccountClick={(account, path) => { + onAccountClick={(account, _path) => { setSelectedBankAccount(account) - - // FIXED: For withdraw flow, route to saved account path - if (flow === 'withdraw') { - if (account.type === AccountType.MANTECA) { - router.push( - `/withdraw/manteca?country=${account.details.countryName}&destination=${account.identifier}` - ) - } else { - router.push(path) - } - return + setSelectedMethod({ + type: account.type === AccountType.MANTECA ? 'manteca' : 'bridge', + countryPath: account.details.countryName, + title: 'To Bank', + }) + if (account.type === AccountType.MANTECA) { + router.push( + `/withdraw/manteca?country=${account.details.countryName}&destination=${account.identifier}` + ) } - - // Original add flow - router.push(path) }} onSelectNewMethodClick={() => setShouldShowAllMethods(true)} />