diff --git a/src/app/common/validation/forms/recipient-validators.ts b/src/app/common/validation/forms/recipient-validators.ts index 0f24ddb3..d8f04b0e 100644 --- a/src/app/common/validation/forms/recipient-validators.ts +++ b/src/app/common/validation/forms/recipient-validators.ts @@ -1,13 +1,8 @@ -import * as yup from 'yup'; - import { NetworkConfiguration } from '@shared/constants'; import { FormErrorMessages } from '@app/common/error-messages'; -import { fetchBtcNameOwner } from '@app/query/stacks/bns/bns.utils'; -import { StacksClient } from '@app/query/stacks/stacks-client'; import { - btcAddressValidator, notCurrentAddressValidator, stxAddressNetworkValidator, stxAddressValidator, @@ -21,23 +16,3 @@ export function stxRecipientValidator( .concat(stxAddressNetworkValidator(currentNetwork)) .concat(notCurrentAddressValidator(currentAddress || '')); } - -export function btcRecipientAddressOrBnsNameValidator({ client }: { client: StacksClient }) { - return yup.string().test({ - name: 'btcRecipientOrBnsName', - message: FormErrorMessages.InvalidAddress, - test: async value => { - try { - await btcAddressValidator().validate(value); - return true; - } catch (e) {} - try { - const btcAddress = await fetchBtcNameOwner(client, value ?? ''); - await btcAddressValidator().validate(btcAddress); - return true; - } catch (error) { - return false; - } - }, - }); -} diff --git a/src/app/components/fees-row/components/fee-estimate-select.layout.tsx b/src/app/components/fees-row/components/fee-estimate-select.layout.tsx index c38f8d82..50239dcc 100644 --- a/src/app/components/fees-row/components/fee-estimate-select.layout.tsx +++ b/src/app/components/fees-row/components/fee-estimate-select.layout.tsx @@ -50,7 +50,7 @@ export function FeeEstimateSelectLayout(props: FeeEstimateSelectLayoutProps) { position="absolute" ref={ref} style={styles} - top="-100px" + top="-35px" zIndex={9999} > {children} diff --git a/src/app/pages/send/ordinal-inscription/components/collectible-asset.tsx b/src/app/pages/send/ordinal-inscription/components/collectible-asset.tsx index 62f6c032..c6e33714 100644 --- a/src/app/pages/send/ordinal-inscription/components/collectible-asset.tsx +++ b/src/app/pages/send/ordinal-inscription/components/collectible-asset.tsx @@ -10,14 +10,25 @@ interface CollectibleAssetProps { } export function CollectibleAsset({ icon, name, symbol }: CollectibleAssetProps) { return ( - - - {icon} - - {name} - - {symbol && ({symbol.toUpperCase()})} - - + + + + {icon} + + {name} + + {symbol && ({symbol.toUpperCase()})} + + + ); } diff --git a/src/app/pages/send/ordinal-inscription/send-inscription-form.tsx b/src/app/pages/send/ordinal-inscription/send-inscription-form.tsx index 747f7bc2..19c3bdfe 100644 --- a/src/app/pages/send/ordinal-inscription/send-inscription-form.tsx +++ b/src/app/pages/send/ordinal-inscription/send-inscription-form.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; -import { Box, Button } from '@stacks/ui'; +import { Box, Button, Flex } from '@stacks/ui'; import BigNumber from 'bignumber.js'; import { Form, Formik } from 'formik'; @@ -16,8 +16,6 @@ import { OrdinalIcon } from '@app/components/icons/ordinal-icon'; import { getNumberOfInscriptionOnUtxo } from '@app/query/bitcoin/ordinals/utils'; import { BtcSizeFeeEstimator } from '../../../common/transactions/bitcoin/fees/btc-size-fee-estimator'; -import { FormErrors } from '../send-crypto-asset-form/components/form-errors'; -import { FormFieldsLayout } from '../send-crypto-asset-form/components/form-fields.layout'; import { RecipientField } from '../send-crypto-asset-form/components/recipient-field'; import { CollectibleAsset } from './components/collectible-asset'; import { CollectiblePreviewCard } from './components/collectible-preview-card'; @@ -107,12 +105,15 @@ export function SendInscriptionForm() { - + } name="Ordinal inscription" /> - - + + - {currentError && ( {currentError} @@ -120,6 +121,7 @@ export function SendInscriptionForm() { )}