diff --git a/src/app/common/utils/psbt.ts b/src/app/common/utils/psbt.ts index 142b5beb..10156ee4 100644 --- a/src/app/common/utils/psbt.ts +++ b/src/app/common/utils/psbt.ts @@ -2,8 +2,6 @@ import { Psbt, Transaction } from "bitcoinjs-lib"; import { WalletProvider } from "@/utils/wallet/wallet_provider"; -const SIGN_PSBT_NOT_COMPATIBLE_WALLETS = ["OneKey"]; - export type SignPsbtTransaction = (psbtHex: string) => Promise; // This method is created to accommodate backward compatibility with the @@ -12,17 +10,6 @@ export type SignPsbtTransaction = (psbtHex: string) => Promise; export const signPsbtTransaction = (wallet: WalletProvider) => { return async (psbtHex: string) => { const signedHex = await wallet.signPsbt(psbtHex); - const providerName = await wallet.getWalletProviderName(); - if (SIGN_PSBT_NOT_COMPATIBLE_WALLETS.includes(providerName)) { - try { - // Try to parse the signedHex as PSBT to see if it follows the new implementation - return Psbt.fromHex(signedHex).extractTransaction(); - } catch { - // If parsing fails, it's the old version implementation - return Transaction.fromHex(signedHex); - } - } - // For compatible wallets, directly extract the transaction from the signed PSBT return Psbt.fromHex(signedHex).extractTransaction(); };