mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-01-12 22:53:27 +08:00
fix: reduce btc send form click area
This commit is contained in:
@@ -105,12 +105,11 @@ export function AmountField({
|
||||
return (
|
||||
<Stack
|
||||
alignItems="center"
|
||||
onClick={onClickFocusInput}
|
||||
px="extra-loose"
|
||||
spacing={['base', meta.error && meta.touched ? 'base' : '48px']}
|
||||
width="100%"
|
||||
>
|
||||
<Flex alignItems="center" flexDirection="column">
|
||||
<Flex alignItems="center" flexDirection="column" onClick={onClickFocusInput}>
|
||||
<Flex
|
||||
alignItems="center"
|
||||
height="55px"
|
||||
|
||||
@@ -51,7 +51,10 @@ export function BitcoinSendMaxButton({
|
||||
data-testid={SendCryptoAssetSelectors.SendMaxBtn}
|
||||
fontSize={0}
|
||||
height="32px"
|
||||
onClick={onSendMax}
|
||||
onClick={e => {
|
||||
e.stopPropagation();
|
||||
onSendMax();
|
||||
}}
|
||||
mode="tertiary"
|
||||
px="base-tight"
|
||||
type="button"
|
||||
|
||||
@@ -52,6 +52,7 @@ export function useBtcSendForm() {
|
||||
validationSchema: yup.object({
|
||||
amount: yup
|
||||
.number()
|
||||
.concat(btcMinimumSpendValidator())
|
||||
.concat(
|
||||
btcAmountPrecisionValidator(formatPrecisionError(btcCryptoCurrencyAssetBalance.balance))
|
||||
)
|
||||
@@ -63,8 +64,7 @@ export function useBtcSendForm() {
|
||||
recipient: formRef.current?.values.recipient ?? '',
|
||||
calcMaxSpend,
|
||||
})
|
||||
)
|
||||
.concat(btcMinimumSpendValidator()),
|
||||
),
|
||||
recipient: yup
|
||||
.string()
|
||||
.concat(btcAddressValidator())
|
||||
|
||||
Reference in New Issue
Block a user