From e792c92c9cbae492da74701e41a4cf469cae7838 Mon Sep 17 00:00:00 2001 From: Bill He Date: Tue, 29 Aug 2023 12:06:42 -0700 Subject: [PATCH] address nits --- .../AccountManagementForms/WithdrawForm.tsx | 26 ++++++++----------- .../WithdrawForm/WithdrawButtonAndReceipt.tsx | 4 +-- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/src/views/forms/AccountManagementForms/WithdrawForm.tsx b/src/views/forms/AccountManagementForms/WithdrawForm.tsx index 841a4b7..3c2f1f4 100644 --- a/src/views/forms/AccountManagementForms/WithdrawForm.tsx +++ b/src/views/forms/AccountManagementForms/WithdrawForm.tsx @@ -5,19 +5,16 @@ import type { NumberFormatValues } from 'react-number-format'; import { shallowEqual, useSelector } from 'react-redux'; import { TESTNET_CHAIN_ID } from '@dydxprotocol/v4-client'; -import { - TransferInputField, - TransferInputTokenResource, - TransferType, -} from '@/constants/abacus'; +import { TransferInputField, TransferInputTokenResource, TransferType } from '@/constants/abacus'; import { AlertType } from '@/constants/alerts'; -import { ButtonAction, ButtonSize, ButtonType } from '@/constants/buttons'; +import { ButtonSize } from '@/constants/buttons'; import { STRING_KEYS } from '@/constants/localization'; import { NumberSign, QUANTUM_MULTIPLIER } from '@/constants/numbers'; import { useDebounce, useStringGetter, useSubaccount } from '@/hooks'; import { layoutMixins } from '@/styles/layoutMixins'; +import { formMixins } from '@/styles/formMixins'; import { AlertMessage } from '@/components/AlertMessage'; import { Button } from '@/components/Button'; @@ -132,10 +129,10 @@ export const WithdrawForm = () => { setIsLoading(true); const txHash = await sendSquidWithdraw(debouncedAmountBN.toNumber(), requestPayload?.data); - + if (txHash?.hash) { const hash = `0x${Buffer.from(txHash.hash).toString('hex')}`; - + setTransactionHash(hash); abacusStateManager.setTransferStatus({ hash, @@ -288,14 +285,9 @@ export const WithdrawForm = () => { value={withdrawAmount} label={stringGetter({ key: STRING_KEYS.AMOUNT })} slotRight={ - + } /> @@ -360,3 +352,7 @@ Styled.Link = styled(Link)` Styled.TransactionInfo = styled.span` ${layoutMixins.row} `; + +Styled.FormInputButton = styled(Button)` + ${formMixins.inputInnerButton} +`; diff --git a/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx b/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx index dace465..2047627 100644 --- a/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx +++ b/src/views/forms/AccountManagementForms/WithdrawForm/WithdrawButtonAndReceipt.tsx @@ -19,11 +19,11 @@ import { Output, OutputType } from '@/components/Output'; import { ToggleButton } from '@/components/ToggleButton'; import { WithReceipt } from '@/components/WithReceipt'; -import { SlippageEditor } from '../SlippageEditor'; - import { getSubaccount } from '@/state/accountSelectors'; import { getTransferInputs } from '@/state/inputsSelectors'; +import { SlippageEditor } from '../SlippageEditor'; + type ElementProps = { setSlippage: (slippage: number) => void;