Skip to content

Commit a04841d

Browse files
committed
fix: allow users to send btc to themselves, ref #5349
1 parent 99b84d3 commit a04841d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/app/pages/send/send-crypto-asset-form/form/btc/use-btc-send-form.tsx

-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { BitcoinSendFormValues } from '@shared/models/form.model';
1414

1515
import { formatPrecisionError } from '@app/common/error-formatters';
1616
import { useOnMount } from '@app/common/hooks/use-on-mount';
17-
import { notCurrentAddressValidator } from '@app/common/validation/forms/address-validators';
1817
import {
1918
btcInsufficientBalanceValidator,
2019
btcMinimumSpendValidator,
@@ -27,7 +26,6 @@ import {
2726
import { useUpdatePersistedSendFormValues } from '@app/features/popup-send-form-restoration/use-update-persisted-send-form-values';
2827
import { useCurrentNativeSegwitUtxos } from '@app/query/bitcoin/address/utxos-by-address.hooks';
2928
import { useCurrentBtcCryptoAssetBalanceNativeSegwit } from '@app/query/bitcoin/balance/btc-balance-native-segwit.hooks';
30-
import { useCurrentAccountNativeSegwitIndexZeroSigner } from '@app/store/accounts/blockchain/bitcoin/native-segwit-account.hooks';
3129
import { useCurrentNetwork } from '@app/store/networks/networks.selectors';
3230

3331
import { useCalculateMaxBitcoinSpend } from '../../family/bitcoin/hooks/use-calculate-max-spend';
@@ -37,7 +35,6 @@ export function useBtcSendForm() {
3735
const [isSendingMax, setIsSendingMax] = useState(false);
3836
const formRef = useRef<FormikProps<BitcoinSendFormValues>>(null);
3937
const currentNetwork = useCurrentNetwork();
40-
const nativeSegwitSigner = useCurrentAccountNativeSegwitIndexZeroSigner();
4138
const { data: utxos = [], filteredUtxosQuery } = useCurrentNativeSegwitUtxos();
4239
const { balance } = useCurrentBtcCryptoAssetBalanceNativeSegwit();
4340
const sendFormNavigate = useSendFormNavigate();
@@ -76,7 +73,6 @@ export function useBtcSendForm() {
7673
recipient: nonEmptyStringValidator()
7774
.concat(btcAddressValidator())
7875
.concat(btcAddressNetworkValidator(currentNetwork.chain.bitcoin.mode))
79-
.concat(notCurrentAddressValidator(nativeSegwitSigner.address || ''))
8076
.concat(
8177
complianceValidator(
8278
btcAddressValidator(),

0 commit comments

Comments
 (0)