From fa9172948b392c426f97aa4539094fa8896276a3 Mon Sep 17 00:00:00 2001 From: Otto Allmendinger Date: Fri, 22 May 2026 15:51:44 +0200 Subject: [PATCH] refactor(abstract-utxo): inline toWasmBIP32 in signPsbtWasm The signer keychain is already typed as bip32.BIP32Interface | BIP32 (both from wasm-utxo). Convert directly via BIP32.fromBase58 instead of routing through the wasmUtil bridge. Refs: T1-3279 --- .../src/transaction/fixedScript/signPsbtWasm.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/abstract-utxo/src/transaction/fixedScript/signPsbtWasm.ts b/modules/abstract-utxo/src/transaction/fixedScript/signPsbtWasm.ts index 6b61f8cedf..a42d3d4546 100644 --- a/modules/abstract-utxo/src/transaction/fixedScript/signPsbtWasm.ts +++ b/modules/abstract-utxo/src/transaction/fixedScript/signPsbtWasm.ts @@ -2,11 +2,13 @@ import assert from 'assert'; import { BIP32, bip32, ECPair, fixedScriptWallet, getWasmUtxoVersion } from '@bitgo/wasm-utxo'; -import { toWasmBIP32 } from '../../wasmUtil'; - import { BulkSigningError, InputSigningError, TransactionSigningError } from './SigningError'; import { Musig2Participant } from './musig2'; +function toWasmBIP32(key: bip32.BIP32Interface | BIP32): BIP32 { + return key instanceof BIP32 ? key : BIP32.fromBase58(key.toBase58()); +} + export type ReplayProtectionKeys = { publicKeys: (Uint8Array | ECPair)[]; };