From 503e089efaafcbbbc3aac2d1be13332dee3db037 Mon Sep 17 00:00:00 2001 From: Jared Vu Date: Sat, 23 Dec 2023 01:17:41 -0800 Subject: [PATCH] temp hide fees for cctp route (#213) --- .../DepositForm/DepositButtonAndReceipt.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/forms/AccountManagementForms/DepositForm/DepositButtonAndReceipt.tsx b/src/views/forms/AccountManagementForms/DepositForm/DepositButtonAndReceipt.tsx index 4edf5f6..9ceeea1 100644 --- a/src/views/forms/AccountManagementForms/DepositForm/DepositButtonAndReceipt.tsx +++ b/src/views/forms/AccountManagementForms/DepositForm/DepositButtonAndReceipt.tsx @@ -34,6 +34,7 @@ import { calculateCanAccountTrade } from '@/state/accountCalculators'; import { getSubaccountBuyingPower, getSubaccountEquity } from '@/state/accountSelectors'; import { getTransferInputs } from '@/state/inputsSelectors'; +import { isTruthy } from '@/lib/isTruthy'; import { MustBigNumber } from '@/lib/numbers'; import { SlippageEditor } from '../SlippageEditor'; @@ -83,7 +84,7 @@ export const DepositButtonAndReceipt = ({ const { current: buyingPower, postOrder: newBuyingPower } = useSelector(getSubaccountBuyingPower, shallowEqual) || {}; - const { summary, requestPayload } = useSelector(getTransferInputs, shallowEqual) || {}; + const { isCctp, summary, requestPayload } = useSelector(getTransferInputs, shallowEqual) || {}; const feeSubitems: DetailsItem[] = []; @@ -157,7 +158,7 @@ export const DepositButtonAndReceipt = ({ ), }, - { + !isCctp && { key: 'total-fees', label: {stringGetter({ key: STRING_KEYS.TOTAL_FEES })}, value: , @@ -193,7 +194,7 @@ export const DepositButtonAndReceipt = ({ /> ), }, - ]; + ].filter(isTruthy); const isFormValid = !isDisabled && !isEditingSlippage;