Skip to content

Commit c25dd3e

Browse files
Merge pull request #8861 from BitGo/otto/sign-psbt-wasm-inline-bip32
refactor(abstract-utxo): inline toWasmBIP32 in signPsbtWasm
2 parents 88b995d + fa91729 commit c25dd3e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

modules/abstract-utxo/src/transaction/fixedScript/signPsbtWasm.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import assert from 'assert';
22

33
import { BIP32, bip32, ECPair, fixedScriptWallet, getWasmUtxoVersion } from '@bitgo/wasm-utxo';
44

5-
import { toWasmBIP32 } from '../../wasmUtil';
6-
75
import { BulkSigningError, InputSigningError, TransactionSigningError } from './SigningError';
86
import { Musig2Participant } from './musig2';
97

8+
function toWasmBIP32(key: bip32.BIP32Interface | BIP32): BIP32 {
9+
return key instanceof BIP32 ? key : BIP32.fromBase58(key.toBase58());
10+
}
11+
1012
export type ReplayProtectionKeys = {
1113
publicKeys: (Uint8Array | ECPair)[];
1214
};

0 commit comments

Comments
 (0)