Skip to content

Commit 25e05f4

Browse files
committed
update
1 parent e118db6 commit 25e05f4

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

app/components/Views/confirmations/components/modals/pay-with-modal/pay-with-modal.test.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,6 @@ describe('PayWithModal', () => {
438438
expect(getAvailableTokensMock).not.toHaveBeenCalled();
439439
});
440440

441-
it('calls useWithdrawTokenFilter with no arguments', () => {
442-
render();
443-
444-
expect(useWithdrawTokenFilterMock).toHaveBeenCalledWith();
445-
});
446-
447441
it('awaits addTokens before calling setPayToken for zero-balance withdraw token', async () => {
448442
const callOrder: string[] = [];
449443

app/components/Views/confirmations/components/modals/pay-with-modal/pay-with-modal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Engine from '../../../../../../core/Engine';
55
import { useTransactionPayToken } from '../../../hooks/pay/useTransactionPayToken';
66
import { useTransactionPayWithdraw } from '../../../hooks/pay/useTransactionPayWithdraw';
77
import { useWithdrawTokenFilter } from '../../../hooks/pay/useWithdrawTokenFilter';
8-
import Routes from '../../../../../../constants/navigation/Routes';
98
import { strings } from '../../../../../../../locales/i18n';
109
import { Asset } from '../../send/asset';
1110
import BottomSheet, {

app/components/Views/confirmations/components/pay-token-amount/pay-token-amount.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,15 @@ export function PayTokenAmount({ amountHuman, disabled }: PayTokenAmountProps) {
8080
return null;
8181
}
8282

83-
const hideTokenAmount = hasTransactionType(transaction, [
83+
// Don't render token amount for perps and predict deposit transactions
84+
const isPerpsOrPredictDeposit = hasTransactionType(transaction, [
8485
TransactionType.perpsDeposit,
8586
TransactionType.perpsDepositAndOrder,
8687
TransactionType.predictDeposit,
8788
TransactionType.predictDepositAndOrder,
8889
]);
8990

90-
if (hideTokenAmount) {
91+
if (isPerpsOrPredictDeposit) {
9192
return null;
9293
}
9394

app/components/Views/confirmations/hooks/pay/useWithdrawTokenFilter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function runHook({
105105
},
106106
} as never;
107107

108-
return renderHookWithProvider(() => useWithdrawTokenFilter(), {
108+
return renderHookWithProvider(useWithdrawTokenFilter, {
109109
state: mockState,
110110
});
111111
}

0 commit comments

Comments
 (0)