Skip to content

Commit 3a51914

Browse files
authored
feat: auto-select fiat payment method for MoneyAccount "Deposit Funds" action (MetaMask#30713)
## **Description** Modifies the Money Hub "Deposit Funds" flow to use `initiateDeposit` with auto-fiat-selection instead of the Ramps `goToBuy` flow. When the user taps "Deposit Funds" in the Add Money sheet, the confirmation screen now auto-selects the first available fiat payment method (bank/card) rather than showing the crypto token selector. **Key implementation details:** - Extended `useAutomaticTransactionPayToken` to handle fiat auto-selection atomically: when `autoSelectFiatPayment` is true, the hook waits for Ramps payment methods to load, then calls `updateFiatPayment` without calling `setPayToken` (since `updatePaymentToken` resets `fiatPayment` to `{}` in the controller). - All three effects in `useAutomaticTransactionPayToken` are guarded with `hasFiatPaymentSelected` to prevent any instance of the hook from calling `setPayToken` when a fiat payment method is active — this protects against the second instance in `usePayWithPreferredToken` (used by the pay-with bottom sheet) from wiping the fiat selection. - The "Deposit Funds" option is gated on the `confirmations_pay_fiat` remote feature flag including `moneyAccountDeposit` in `enabledTransactionTypes`. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Auto-select fiat payment for money account deposits Scenario: user deposits funds via fiat payment Given the user is on the Money Hub with moneyAccountDeposit enabled in confirmations_pay_fiat feature flag When user taps "Add funds" then "Deposit funds" Then the confirmation screen shows with fiat payment method pre-selected (no crypto token flicker) And the PayAccountSelector and percentage buttons are hidden initially Scenario: user switches from fiat to crypto payment Given the confirmation screen shows with fiat payment method pre-selected When user taps the "Pay with" row and selects a crypto token Then the PayAccountSelector appears And percentage buttons appear And the selected crypto token is shown in the Pay with row Scenario: deposit funds hidden when feature flag is off Given moneyAccountDeposit is NOT in the confirmations_pay_fiat enabledTransactionTypes When user opens the Add Money sheet Then the "Deposit funds" option is not shown ``` ## **Screenshots/Recordings** ### **Before** https://github.com/user-attachments/assets/31d85902-70b1-46d4-b987-1aaefb8d7ee8 ### **After** https://github.com/user-attachments/assets/09fd4583-3a21-4c2b-a819-464d5ae52458 ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes payment routing and Transaction Pay fiat/token selection for money account deposits; mitigated by feature flags and tests, but affects funds-in UX and controller state. > > **Overview** > Money Hub **Deposit funds** now routes through `initiateDeposit` with **`autoSelectFiatPayment`** instead of the Ramps buy flow, and the sheet only shows that option when **`confirmations_pay_fiat`** includes `moneyAccountDeposit`. > > On the money-account deposit confirmation screen, **`autoSelectFiatPayment`** is threaded from navigation params into **`useAutomaticTransactionPayToken`**, which picks the first eligible Ramps payment method (respecting max delay) via **`updateFiatPayment`** and skips **`setPayToken`** so fiat selection is not cleared. **`CustomAmountInfo`** can hide the account selector and percentage shortcuts until the user switches to crypto, and hook effects bail out when a fiat method is already selected. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1737fd5. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent b65bcbd commit 3a51914

10 files changed

Lines changed: 212 additions & 64 deletions

File tree

app/components/UI/Money/components/MoneyAddMoneySheet/MoneyAddMoneySheet.test.tsx

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
import React from 'react';
22
import { fireEvent } from '@testing-library/react-native';
3+
import { TransactionType, CHAIN_IDS } from '@metamask/transaction-controller';
34
import renderWithProvider from '../../../../../util/test/renderWithProvider';
45
import MoneyAddMoneySheet from './MoneyAddMoneySheet';
56
import { MoneyAddMoneySheetTestIds } from './MoneyAddMoneySheet.testIds';
6-
import { useMusdConversionFlowData } from '../../../Earn/hooks/useMusdConversionFlowData';
7-
import { useRampNavigation } from '../../../Ramp/hooks/useRampNavigation';
87
import { useMusdBalance } from '../../../Earn/hooks/useMusdBalance';
98
import { useMoneyAccountDeposit } from '../../hooks/useMoneyAccount';
9+
import { useMMPayFiatConfig } from '../../../../Views/confirmations/hooks/pay/useMMPayFiatConfig';
1010
import {
1111
MUSD_CONVERSION_DEFAULT_CHAIN_ID,
1212
MUSD_TOKEN_ADDRESS_BY_CHAIN,
13-
MUSD_TOKEN_ASSET_ID_BY_CHAIN,
1413
} from '../../../Earn/constants/musd';
15-
import { CHAIN_IDS } from '@metamask/transaction-controller';
1614

1715
const mockOnCloseBottomSheet = jest.fn((cb?: () => void) => cb?.());
1816
const mockNavigate = jest.fn();
1917
const mockGoBack = jest.fn();
20-
const mockGetChainIdForBuyFlow = jest.fn();
21-
const mockGoToBuy = jest.fn();
2218
const mockInitiateDeposit = jest.fn(() => Promise.resolve());
2319

2420
jest.mock('@react-navigation/native', () => {
@@ -32,14 +28,6 @@ jest.mock('@react-navigation/native', () => {
3228
};
3329
});
3430

35-
jest.mock('../../../Earn/hooks/useMusdConversionFlowData', () => ({
36-
useMusdConversionFlowData: jest.fn(),
37-
}));
38-
39-
jest.mock('../../../Ramp/hooks/useRampNavigation', () => ({
40-
useRampNavigation: jest.fn(),
41-
}));
42-
4331
jest.mock('../../../Earn/hooks/useMusdBalance', () => ({
4432
useMusdBalance: jest.fn(),
4533
}));
@@ -48,6 +36,13 @@ jest.mock('../../hooks/useMoneyAccount', () => ({
4836
useMoneyAccountDeposit: jest.fn(),
4937
}));
5038

39+
jest.mock(
40+
'../../../../Views/confirmations/hooks/pay/useMMPayFiatConfig',
41+
() => ({
42+
useMMPayFiatConfig: jest.fn(),
43+
}),
44+
);
45+
5146
jest.mock('@metamask/design-system-react-native', () => {
5247
const actual = jest.requireActual('@metamask/design-system-react-native');
5348
const { forwardRef, useImperativeHandle } = jest.requireActual('react');
@@ -80,14 +75,6 @@ describe('MoneyAddMoneySheet', () => {
8075
beforeEach(() => {
8176
jest.clearAllMocks();
8277

83-
mockGetChainIdForBuyFlow.mockReturnValue(MUSD_CONVERSION_DEFAULT_CHAIN_ID);
84-
85-
(useMusdConversionFlowData as jest.Mock).mockReturnValue({
86-
getChainIdForBuyFlow: mockGetChainIdForBuyFlow,
87-
});
88-
(useRampNavigation as jest.Mock).mockReturnValue({
89-
goToBuy: mockGoToBuy,
90-
});
9178
(useMusdBalance as jest.Mock).mockReturnValue({
9279
fiatBalanceAggregated: '1203.89',
9380
fiatBalanceAggregatedFormatted: '$1,203.89',
@@ -98,6 +85,10 @@ describe('MoneyAddMoneySheet', () => {
9885
(useMoneyAccountDeposit as jest.Mock).mockReturnValue({
9986
initiateDeposit: mockInitiateDeposit,
10087
});
88+
(useMMPayFiatConfig as jest.Mock).mockReturnValue({
89+
enabledTransactionTypes: [TransactionType.moneyAccountDeposit],
90+
maxDelayMinutesForPaymentMethods: 10,
91+
});
10192
});
10293

10394
it('renders all four options', () => {
@@ -226,16 +217,16 @@ describe('MoneyAddMoneySheet', () => {
226217
expect(getByText('Add your 42.50 mUSD')).toBeOnTheScreen();
227218
});
228219

229-
it('navigates to the Ramps buy flow with mUSD pre-selected when Deposit funds is pressed', () => {
220+
it('initiates a deposit with autoSelectFiatPayment when Deposit funds is pressed', () => {
230221
const { getByTestId } = renderWithProvider(<MoneyAddMoneySheet />);
231222

232223
fireEvent.press(
233224
getByTestId(MoneyAddMoneySheetTestIds.DEPOSIT_FUNDS_OPTION),
234225
);
235226

236227
expect(mockOnCloseBottomSheet).toHaveBeenCalledTimes(1);
237-
expect(mockGoToBuy).toHaveBeenCalledWith({
238-
assetId: MUSD_TOKEN_ASSET_ID_BY_CHAIN[MUSD_CONVERSION_DEFAULT_CHAIN_ID],
228+
expect(mockInitiateDeposit).toHaveBeenCalledWith({
229+
autoSelectFiatPayment: true,
239230
});
240231
});
241232

@@ -250,6 +241,19 @@ describe('MoneyAddMoneySheet', () => {
250241
expect(mockInitiateDeposit).toHaveBeenCalledWith();
251242
});
252243

244+
it('hides the Deposit funds option when moneyAccountDeposit is not in enabledTransactionTypes', () => {
245+
(useMMPayFiatConfig as jest.Mock).mockReturnValue({
246+
enabledTransactionTypes: [],
247+
maxDelayMinutesForPaymentMethods: 10,
248+
});
249+
250+
const { queryByTestId } = renderWithProvider(<MoneyAddMoneySheet />);
251+
252+
expect(
253+
queryByTestId(MoneyAddMoneySheetTestIds.DEPOSIT_FUNDS_OPTION),
254+
).toBeNull();
255+
});
256+
253257
it('initiates a deposit pre-selecting mUSD on the highest-balance chain when Move mUSD is pressed', () => {
254258
(useMusdBalance as jest.Mock).mockReturnValue({
255259
fiatBalanceAggregated: '1500.00',

app/components/UI/Money/components/MoneyAddMoneySheet/MoneyAddMoneySheet.tsx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import React, { useCallback, useRef } from 'react';
1+
import React, { useCallback, useMemo, useRef } from 'react';
22
import { TouchableOpacity, View } from 'react-native';
33
import { useNavigation } from '@react-navigation/native';
44
import BigNumber from 'bignumber.js';
5+
import { TransactionType } from '@metamask/transaction-controller';
56
import {
67
BottomSheet,
78
BottomSheetHeader,
@@ -18,16 +19,14 @@ import {
1819
import Tag from '../../../../../component-library/components/Tags/Tag';
1920
import { strings } from '../../../../../../locales/i18n';
2021
import { useStyles } from '../../../../../component-library/hooks';
21-
import { useMusdConversionFlowData } from '../../../Earn/hooks/useMusdConversionFlowData';
2222
import { useMusdBalance } from '../../../Earn/hooks/useMusdBalance';
2323
import {
2424
MUSD_CONVERSION_DEFAULT_CHAIN_ID,
2525
MUSD_TOKEN_ADDRESS_BY_CHAIN,
26-
MUSD_TOKEN_ASSET_ID_BY_CHAIN,
2726
} from '../../../Earn/constants/musd';
2827
import { Hex } from '@metamask/utils';
29-
import { useRampNavigation } from '../../../Ramp/hooks/useRampNavigation';
3028
import { useMoneyAccountDeposit } from '../../hooks/useMoneyAccount';
29+
import { useMMPayFiatConfig } from '../../../../Views/confirmations/hooks/pay/useMMPayFiatConfig';
3130
import { useElevatedSurface } from '../../../../../util/theme/themeUtils';
3231
import styleSheet from './MoneyAddMoneySheet.styles';
3332
import { MoneyAddMoneySheetTestIds } from './MoneyAddMoneySheet.testIds';
@@ -54,9 +53,12 @@ const MoneyAddMoneySheet: React.FC = () => {
5453
tokenBalanceAggregated,
5554
tokenBalanceByChain,
5655
} = useMusdBalance();
57-
const { getChainIdForBuyFlow } = useMusdConversionFlowData();
58-
const { goToBuy } = useRampNavigation();
5956
const { initiateDeposit } = useMoneyAccountDeposit();
57+
const { enabledTransactionTypes } = useMMPayFiatConfig();
58+
const isFiatDepositEnabled = useMemo(
59+
() => enabledTransactionTypes.includes(TransactionType.moneyAccountDeposit),
60+
[enabledTransactionTypes],
61+
);
6062

6163
const closeAndNavigate = useCallback((navigateFn: () => void) => {
6264
sheetRef.current?.onCloseBottomSheet(navigateFn);
@@ -72,17 +74,11 @@ const MoneyAddMoneySheet: React.FC = () => {
7274
});
7375
}, [closeAndNavigate, initiateDeposit]);
7476

75-
// TODO(MUSD-479): point to the Ramps "Add funds" amount-entry screen
76-
// (Figma 2547:8780). Interim: unified smart-routed Buy flow with mUSD
77-
// pre-selected so the destination matches the Money Hub experience.
7877
const handleDepositFunds = useCallback(() => {
79-
const chainId = getChainIdForBuyFlow
80-
? getChainIdForBuyFlow()
81-
: MUSD_CONVERSION_DEFAULT_CHAIN_ID;
8278
closeAndNavigate(() => {
83-
goToBuy({ assetId: MUSD_TOKEN_ASSET_ID_BY_CHAIN[chainId] });
79+
initiateDeposit({ autoSelectFiatPayment: true }).catch(() => undefined);
8480
});
85-
}, [closeAndNavigate, getChainIdForBuyFlow, goToBuy]);
81+
}, [closeAndNavigate, initiateDeposit]);
8682

8783
const handleMoveMusd = useCallback(() => {
8884
let sourceChainId: Hex = MUSD_CONVERSION_DEFAULT_CHAIN_ID;
@@ -129,14 +125,21 @@ const MoneyAddMoneySheet: React.FC = () => {
129125
onPress: handleConvertCrypto,
130126
testID: MoneyAddMoneySheetTestIds.CONVERT_CRYPTO_OPTION,
131127
},
132-
{
133-
label: strings('money.add_money_sheet.deposit_funds'),
134-
description: strings('money.add_money_sheet.deposit_funds_description'),
135-
descriptionTestID: MoneyAddMoneySheetTestIds.DEPOSIT_FUNDS_DESCRIPTION,
136-
icon: IconName.AttachMoney,
137-
onPress: handleDepositFunds,
138-
testID: MoneyAddMoneySheetTestIds.DEPOSIT_FUNDS_OPTION,
139-
},
128+
...(isFiatDepositEnabled
129+
? [
130+
{
131+
label: strings('money.add_money_sheet.deposit_funds'),
132+
description: strings(
133+
'money.add_money_sheet.deposit_funds_description',
134+
),
135+
descriptionTestID:
136+
MoneyAddMoneySheetTestIds.DEPOSIT_FUNDS_DESCRIPTION,
137+
icon: IconName.AttachMoney,
138+
onPress: handleDepositFunds,
139+
testID: MoneyAddMoneySheetTestIds.DEPOSIT_FUNDS_OPTION,
140+
},
141+
]
142+
: []),
140143
];
141144

142145
const options: Option[] = hasMusdBalance

app/components/UI/Money/hooks/useMoneyAccount.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ describe('useMoneyAccountDeposit', () => {
201201
loader: ConfirmationLoader.CustomAmount,
202202
stack: Routes.MONEY.CONFIRMATIONS_ROOT,
203203
preferredPaymentToken: undefined,
204+
autoSelectFiatPayment: undefined,
204205
});
205206

206207
expect(mockAddTransactionBatch).toHaveBeenCalledWith(
@@ -214,6 +215,21 @@ describe('useMoneyAccountDeposit', () => {
214215
);
215216
});
216217

218+
it('passes autoSelectFiatPayment to navigateToConfirmation', async () => {
219+
const { result } = renderHook(() => useMoneyAccountDeposit());
220+
221+
await act(async () => {
222+
await result.current.initiateDeposit({ autoSelectFiatPayment: true });
223+
});
224+
225+
expect(getNavigateToConfirmation()).toHaveBeenCalledWith({
226+
loader: ConfirmationLoader.CustomAmount,
227+
stack: Routes.MONEY.CONFIRMATIONS_ROOT,
228+
preferredPaymentToken: undefined,
229+
autoSelectFiatPayment: true,
230+
});
231+
});
232+
217233
it('pre-generates a batchId, registers intent before the await, and forwards preferredPaymentToken', async () => {
218234
const preferredPaymentToken = {
219235
address: '0xaca92e438df0b2401ff60da7e4337b687a2435da' as Hex,
@@ -241,6 +257,7 @@ describe('useMoneyAccountDeposit', () => {
241257
loader: ConfirmationLoader.CustomAmount,
242258
stack: Routes.MONEY.CONFIRMATIONS_ROOT,
243259
preferredPaymentToken,
260+
autoSelectFiatPayment: undefined,
244261
});
245262
expect(observedBatchId).toMatch(/^0x[0-9a-f]+$/);
246263
expect(intentAtCallTime).toBe('addMusd');

app/components/UI/Money/hooks/useMoneyAccount.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export interface InitiateDepositOptions {
4545
chainId: Hex;
4646
};
4747
intent?: MoneyAccountDepositIntent;
48+
autoSelectFiatPayment?: boolean;
4849
}
4950

5051
function resolveNetworkClientId(chainId: Hex): string {
@@ -108,6 +109,7 @@ export function useMoneyAccountDeposit() {
108109
loader: ConfirmationLoader.CustomAmount,
109110
stack: Routes.MONEY.CONFIRMATIONS_ROOT,
110111
preferredPaymentToken,
112+
autoSelectFiatPayment: options?.autoSelectFiatPayment,
111113
});
112114

113115
try {

app/components/Views/confirmations/components/confirm/confirm-component.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export enum ConfirmationLoader {
5858
}
5959

6060
export interface ConfirmationParams {
61+
autoSelectFiatPayment?: boolean;
6162
loader?: ConfirmationLoader;
6263
maxValueMode?: boolean;
6364
forceBottomSheet?: boolean;

app/components/Views/confirmations/components/info/custom-amount-info/custom-amount-info.tsx

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ReactNode, memo, useCallback, useState } from 'react';
1+
import React, { ReactNode, memo, useCallback, useRef, useState } from 'react';
22
import { toCaipAssetType } from '@metamask/utils';
33
import { TransactionType } from '@metamask/transaction-controller';
44
import { PayTokenAmount, PayTokenAmountSkeleton } from '../../pay-token-amount';
@@ -72,10 +72,12 @@ import { CustomAmountInfoTestIds } from './custom-amount-info.testIds';
7272
import { useConfirmationContext } from '../../../context/confirmation-context';
7373

7474
export interface CustomAmountInfoProps {
75+
autoSelectFiatPayment?: boolean;
7576
children?: ReactNode;
7677
currency?: string;
7778
disablePay?: boolean;
7879
hasMax?: boolean;
80+
hideAccountSelector?: boolean;
7981
preferredToken?: SetPayTokenRequest;
8082
footerText?: string;
8183
/**
@@ -104,12 +106,14 @@ export interface CustomAmountInfoProps {
104106

105107
export const CustomAmountInfo: React.FC<CustomAmountInfoProps> = memo(
106108
({
109+
autoSelectFiatPayment,
107110
children,
108111
currency,
109112
disableConfirm,
110113
disablePay,
111114
hasMax,
112115
hasExtraBottomPadding,
116+
hideAccountSelector,
113117
onAmountSubmit,
114118
hidePayTokenAmount,
115119
preferredToken,
@@ -121,6 +125,7 @@ export const CustomAmountInfo: React.FC<CustomAmountInfoProps> = memo(
121125
const { canSelectWithdrawToken } = useTransactionPayWithdraw();
122126

123127
useAutomaticTransactionPayToken({
128+
autoSelectFiatPayment,
124129
disable: disablePay,
125130
preferredToken,
126131
});
@@ -133,6 +138,12 @@ export const CustomAmountInfo: React.FC<CustomAmountInfoProps> = memo(
133138
const { hasTokens } = useTransactionPayAvailableTokens();
134139
const fiatPayment = useTransactionPayFiatPayment();
135140
const selectedFiatPaymentMethodId = fiatPayment?.selectedPaymentMethodId;
141+
const fiatEverSelectedRef = useRef(false);
142+
if (selectedFiatPaymentMethodId) {
143+
fiatEverSelectedRef.current = true;
144+
}
145+
const shouldHideAccountSelector =
146+
hideAccountSelector && !fiatEverSelectedRef.current;
136147
const transactionMeta = useTransactionMetadataRequest();
137148
const transactionId = transactionMeta?.id;
138149
const accountOverride = useTransactionAccountOverride();
@@ -239,17 +250,19 @@ export const CustomAmountInfo: React.FC<CustomAmountInfoProps> = memo(
239250
<AlertMessage alertMessage={alertMessage ?? headlessBuyError} />
240251
{!isResultReady && (
241252
<>
242-
{supportAccountSelection && !selectedFiatPaymentMethodId && (
243-
<PayAccountSelector style={styles.separator} />
244-
)}
253+
{supportAccountSelection &&
254+
!selectedFiatPaymentMethodId &&
255+
!shouldHideAccountSelector && (
256+
<PayAccountSelector style={styles.separator} />
257+
)}
245258
{disablePay !== true && hasTokens && <PayWithRow />}
246259
</>
247260
)}
248261
{isResultReady && (
249262
<Box>
250-
{supportAccountSelection && !selectedFiatPaymentMethodId && (
251-
<PayAccountSelector />
252-
)}
263+
{supportAccountSelection &&
264+
!selectedFiatPaymentMethodId &&
265+
!shouldHideAccountSelector && <PayAccountSelector />}
253266
{disablePay !== true && hasTokens && <PayWithRow />}
254267
{showPaymentDetails && (
255268
<>
@@ -276,7 +289,10 @@ export const CustomAmountInfo: React.FC<CustomAmountInfoProps> = memo(
276289
)}
277290
{isKeyboardVisible && hasTokens && (
278291
<DepositKeyboard
279-
hidePercentageButtons={Boolean(selectedFiatPaymentMethodId)}
292+
hidePercentageButtons={
293+
Boolean(selectedFiatPaymentMethodId) ||
294+
shouldHideAccountSelector
295+
}
280296
alertMessage={alertTitle}
281297
value={amountFiat}
282298
onChange={updatePendingAmount}

0 commit comments

Comments
 (0)