Skip to content

Commit fbfd4dd

Browse files
feat(utxo-staking): initialize bitcoinjs ecc lib with utxolib ecc
Issue: BTC-1933
1 parent a631006 commit fbfd4dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

modules/utxo-staking/src/transaction.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import * as utxolib from '@bitgo/utxo-lib';
22
import { Dimensions } from '@bitgo/unspents';
3+
import * as bitcoinjslib from 'bitcoinjs-lib';
4+
5+
bitcoinjslib.initEccLib(utxolib.ecc);
36

47
/**
58
* Build a staking transaction for a wallet that assumes 2-of-3 multisig for the inputs

modules/utxo-staking/test/unit/babylon/transactions.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import { normalize } from '../fixtures.utils';
2020
import { fromXOnlyPublicKey, getECKey, getECKeys, getXOnlyPubkey } from './key.utils';
2121
import { getBitGoUtxoStakingMsgCreateBtcDelegation, getVendorMsgCreateBtcDelegation } from './vendor.utils';
2222

23-
bitcoinjslib.initEccLib(utxolib.ecc);
24-
2523
type WithFee<T> = T & { fee: number };
2624
type TransactionWithFee = WithFee<{ transaction: bitcoinjslib.Transaction }>;
2725
type PsbtWithFee = WithFee<{ psbt: bitcoinjslib.Psbt }>;

0 commit comments

Comments
 (0)