Skip to content

Commit

Permalink
bump to canary.4-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab committed Nov 25, 2024
1 parent 09fe163 commit b8d6562
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app/hooks/services/useTransactionService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
BTCSigType,
ProofOfPossessionBTC,
} from "@babylonlabs-io/babylon-proto-ts/dist/generated/babylon/btcstaking/v1/pop";
import { createWitness, Staking } from "@babylonlabs-io/btc-staking-ts";
import { createCovenantWitness, Staking } from "@babylonlabs-io/btc-staking-ts";
import { fromBech32 } from "@cosmjs/encoding";
import { SigningStargateClient } from "@cosmjs/stargate";
import { Network, Psbt, Transaction } from "bitcoinjs-lib";
Expand Down Expand Up @@ -308,7 +308,7 @@ export const useTransactionService = () => {
stakingInput.finalityProviderPkNoCoordHex,
stakingInput.stakingTimeBlocks,
);
const stakingPsbt = staking.createStakingPsbt(
const stakingPsbt = staking.toStakingPsbt(
Transaction.fromHex(stakingTxHex),
inputUTXOs!,
);
Expand Down Expand Up @@ -373,7 +373,7 @@ export const useTransactionService = () => {
);

const unbondingTx = Transaction.fromHex(unbondingTxHex);
const unbondingPsbt = staking.createUnbondingPsbt(unbondingTx, stakingTx);
const unbondingPsbt = staking.toUnbondingPsbt(unbondingTx, stakingTx);
const signedUnbondingPsbtHex = await signPsbt(unbondingPsbt.toHex());

// Compare the unbonding tx hash with the one from API
Expand All @@ -386,7 +386,7 @@ export const useTransactionService = () => {
const covenantBuffers = p.covenantNoCoordPks.map((covenant) =>
Buffer.from(covenant, "hex"),
);
const witness = createWitness(
const witness = createCovenantWitness(
signedUnbondingTx.ins[0].witness,
covenantBuffers,
covenantUnbondingSignatures,
Expand Down Expand Up @@ -517,7 +517,7 @@ export const useTransactionService = () => {

// Get the staking transaction hex from the mempool
const stakingTxHex = await getTxHex(stakingTxHashHex);
const { psbt } = staking.createWithdrawTimelockUnbondedTransaction(
const { psbt } = staking.createWithdrawStakingExpiredTransaction(
Transaction.fromHex(stakingTxHex),
defaultFeeRate,
);
Expand Down

0 comments on commit b8d6562

Please sign in to comment.