diff --git a/src/app/screens/sendOrdinal/index.tsx b/src/app/screens/sendOrdinal/index.tsx index f4325f6f8..2546a2c0b 100644 --- a/src/app/screens/sendOrdinal/index.tsx +++ b/src/app/screens/sendOrdinal/index.tsx @@ -4,8 +4,14 @@ import { useResetUserFlow } from '@hooks/useResetUserFlow'; import useSelectedAccount from '@hooks/useSelectedAccount'; import useTransactionContext from '@hooks/useTransactionContext'; import useWalletSelector from '@hooks/useWalletSelector'; +import { TransportWebUSB } from '@keystonehq/hw-transport-webusb'; import type { TransactionSummary } from '@screens/sendBtc/helpers'; -import { AnalyticsEvents, btcTransaction, type Transport } from '@secretkeylabs/xverse-core'; +import { + AnalyticsEvents, + btcTransaction, + type AccountType, + type Transport, +} from '@secretkeylabs/xverse-core'; import { removeAccountAvatarAction } from '@stores/wallet/actions/actionCreators'; import { isInOptions, isLedgerAccount } from '@utils/helper'; import { trackMixPanel } from '@utils/mixpanel'; @@ -150,10 +156,18 @@ function SendOrdinalScreen() { return undefined; }; - const handleSubmit = async (ledgerTransport?: Transport) => { + const handleSubmit = async (type?: AccountType, transport?: Transport | TransportWebUSB) => { try { setIsSubmitting(true); - const txnId = await transaction?.broadcast({ ledgerTransport, rbfEnabled: true }); + const txnId = await transaction?.broadcast({ + ...(type === 'ledger' && { + ledgerTransport: transport as Transport, + }), + ...(type === 'keystone' && { + keystoneTransport: transport as TransportWebUSB, + }), + rbfEnabled: true, + }); trackMixPanel(AnalyticsEvents.TransactionConfirmed, { protocol: 'ordinals', diff --git a/src/app/screens/signPsbtRequest/index.tsx b/src/app/screens/signPsbtRequest/index.tsx index 1498d1186..d74d0ec9a 100644 --- a/src/app/screens/signPsbtRequest/index.tsx +++ b/src/app/screens/signPsbtRequest/index.tsx @@ -79,6 +79,9 @@ function SignPsbtRequest() { ...(accountType === 'ledger' && { ledgerTransport: transport as Transport, }), + ...(accountType === 'keystone' && { + keystoneTransport: transport as TransportWebUSB, + }), }); const response = await confirmSignPsbt(signedPsbt); trackMixPanel(AnalyticsEvents.TransactionConfirmed, { diff --git a/src/app/screens/swap/components/psbtConfirmation/psbtConfirmation.tsx b/src/app/screens/swap/components/psbtConfirmation/psbtConfirmation.tsx index a7576f5ce..b437b3d26 100644 --- a/src/app/screens/swap/components/psbtConfirmation/psbtConfirmation.tsx +++ b/src/app/screens/swap/components/psbtConfirmation/psbtConfirmation.tsx @@ -132,6 +132,9 @@ export default function PsbtConfirmation({ ...(accountType === 'ledger' && { ledgerTransport: transport as Transport, }), + ...(accountType === 'keystone' && { + keystoneTransport: transport as TransportWebUSB, + }), }); if (!signedPsbt) {