Skip to content

Commit dd4ca9b

Browse files
feat(utxo-staking): add toStakerInfo helper
Add helper function to convert key and address to staker info object. Issue: BTC-1933
1 parent cfd5fd6 commit dd4ca9b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
testnetFinalityProvider0,
1515
getSignedPsbt,
1616
getStakingParams,
17+
toStakerInfo,
1718
} from '../../../src/babylon';
1819
import { normalize } from '../fixtures.utils';
1920

@@ -289,10 +290,7 @@ function describeWithKeys(
289290
it('has expected transactions (vendorStaking.Staking)', async function (this: Mocha.Context) {
290291
const vendorStakingTxBuilder = new vendor.Staking(
291292
bitcoinjslib.networks.bitcoin,
292-
{
293-
address: changeAddress,
294-
publicKeyNoCoordHex: getXOnlyPubkey(stakerKey).toString('hex'),
295-
},
293+
toStakerInfo(stakerKey, changeAddress),
296294
stakingParams,
297295
getXOnlyPubkey(finalityProvider).toString('hex'),
298296
stakingParams.minStakingTimeBlocks

0 commit comments

Comments
 (0)