mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-03-27 01:44:21 +08:00
feat: remove taproot address validator, closes #3670
This commit is contained in:
@@ -33,6 +33,7 @@ export function btcAddressValidator() {
|
||||
});
|
||||
}
|
||||
|
||||
// ts-unused-exports:disable-next-line
|
||||
export function btcTaprootAddressValidator() {
|
||||
return yup.string().test((input, context) => {
|
||||
if (!input || !validate(input)) return false;
|
||||
|
||||
@@ -15,7 +15,6 @@ import { useWalletType } from '@app/common/use-wallet-type';
|
||||
import {
|
||||
btcAddressNetworkValidator,
|
||||
btcAddressValidator,
|
||||
btcTaprootAddressValidator,
|
||||
} from '@app/common/validation/forms/address-validators';
|
||||
import { getNumberOfInscriptionOnUtxo } from '@app/query/bitcoin/ordinals/ordinals-aware-utxo.query';
|
||||
import { useCurrentNetwork } from '@app/store/networks/networks.selectors';
|
||||
@@ -113,8 +112,7 @@ export function useSendInscriptionForm() {
|
||||
.string()
|
||||
.required(FormErrorMessages.AddressRequired)
|
||||
.concat(btcAddressValidator())
|
||||
.concat(btcAddressNetworkValidator(currentNetwork.chain.bitcoin.network))
|
||||
.concat(btcTaprootAddressValidator()),
|
||||
.concat(btcAddressNetworkValidator(currentNetwork.chain.bitcoin.network)),
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user