diff --git a/src/app/pages/send/send-crypto-asset-form/form/brc-20/brc-20-choose-fee.tsx b/src/app/pages/send/send-crypto-asset-form/form/brc-20/brc-20-choose-fee.tsx index 4b56ffd75a3..e116664d4be 100644 --- a/src/app/pages/send/send-crypto-asset-form/form/brc-20/brc-20-choose-fee.tsx +++ b/src/app/pages/send/send-crypto-asset-form/form/brc-20/brc-20-choose-fee.tsx @@ -24,6 +24,7 @@ import { BitcoinChooseFee } from '@app/features/bitcoin-choose-fee/bitcoin-choos import { useValidateBitcoinSpend } from '@app/features/bitcoin-choose-fee/hooks/use-validate-bitcoin-spend'; import { UtxoResponseItem } from '@app/query/bitcoin/bitcoin-client'; import { useBrc20Transfers } from '@app/query/bitcoin/ordinals/brc20/use-brc-20'; +import { useSignBitcoinTx } from '@app/store/accounts/blockchain/bitcoin/bitcoin.hooks'; import { useSendBitcoinAssetContextState } from '../../family/bitcoin/components/send-bitcoin-asset-container'; @@ -41,6 +42,7 @@ export function BrcChooseFee() { const navigate = useNavigate(); const { amount, recipient, tick, utxos } = useBrc20ChooseFeeState(); const generateTx = useGenerateUnsignedNativeSegwitSingleRecipientTx(); + const signTx = useSignBitcoinTx(); const { selectedFeeType, setSelectedFeeType } = useSendBitcoinAssetContextState(); const { initiateTransfer } = useBrc20Transfers(); const { feesList, isLoading } = useBitcoinFeesList({ @@ -80,12 +82,15 @@ export function BrcChooseFee() { ); if (!resp) return logger.error('Attempted to generate raw tx, but no tx exists'); + const signedTx = await signTx(resp.psbt); + + if (!signedTx) return logger.error('Attempted to sign tx, but no tx exists'); + signedTx.finalize(); - const { hex } = resp; const feeRowValue = formFeeRowValue(feeRate, isCustomFee); navigate(RouteUrls.SendBrc20Confirmation.replace(':ticker', tick), { state: { - tx: hex, + tx: signedTx.hex, orderId: id, fee: feeValue, serviceFee: charge.amount, diff --git a/src/app/pages/send/send-crypto-asset-form/send-crypto-asset-form.routes.tsx b/src/app/pages/send/send-crypto-asset-form/send-crypto-asset-form.routes.tsx index 7bd95d10a71..23bdf75383d 100644 --- a/src/app/pages/send/send-crypto-asset-form/send-crypto-asset-form.routes.tsx +++ b/src/app/pages/send/send-crypto-asset-form/send-crypto-asset-form.routes.tsx @@ -14,7 +14,7 @@ import { AccountGate } from '@app/routes/account-gate'; import { BroadcastError } from '../broadcast-error/broadcast-error'; import { ChooseCryptoAsset } from '../choose-crypto-asset/choose-crypto-asset'; import { SendContainer } from '../send-container'; -import { Brc20SentSummary } from '../sent-summary/brc20-sent-symmary'; +import { Brc20SentSummary } from '../sent-summary/brc20-sent-summary'; import { BtcSentSummary } from '../sent-summary/btc-sent-summary'; import { StxSentSummary } from '../sent-summary/stx-sent-summary'; import { RecipientAccountsDrawer } from './components/recipient-accounts-drawer/recipient-accounts-drawer'; diff --git a/src/app/pages/send/sent-summary/brc20-sent-symmary.tsx b/src/app/pages/send/sent-summary/brc20-sent-summary.tsx similarity index 100% rename from src/app/pages/send/sent-summary/brc20-sent-symmary.tsx rename to src/app/pages/send/sent-summary/brc20-sent-summary.tsx