Skip to content

Commit 851458d

Browse files
chore(utxo-lib): allow non-UtxoPsbt class instances in addXpubsToPsbt
Update the addXpubsToPsbt function to accept any Psbt instance rather than requiring UtxoPsbt. This makes the function more flexible and reusable. Issue: BTC-2385
1 parent b491a42 commit 851458d

File tree

1 file changed

+2
-1
lines changed
  • modules/utxo-lib/src/bitgo/wallet

1 file changed

+2
-1
lines changed

modules/utxo-lib/src/bitgo/wallet/Psbt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { checkForInput } from 'bip174/src/lib/utils';
55
import { BIP32Interface } from 'bip32';
66
import * as bs58check from 'bs58check';
77
import { UtxoPsbt } from '../UtxoPsbt';
8+
import { Psbt } from '../../';
89
import { UtxoTransaction } from '../UtxoTransaction';
910
import {
1011
createOutputScript2of3,
@@ -495,7 +496,7 @@ export function isTransactionWithKeyPathSpendInput(
495496
* We do all the matching of the (tap)bip32Derivations masterFingerprint to the fingerprint of the
496497
* extendedPubkey.
497498
*/
498-
export function addXpubsToPsbt(psbt: UtxoPsbt, rootWalletKeys: RootWalletKeys): void {
499+
export function addXpubsToPsbt(psbt: Psbt, rootWalletKeys: RootWalletKeys): void {
499500
const safeRootWalletKeys = new RootWalletKeys(
500501
rootWalletKeys.triple.map((bip32) => bip32.neutered()) as Triple<BIP32Interface>,
501502
rootWalletKeys.derivationPrefixes

0 commit comments

Comments
 (0)