Skip to content

Commit

Permalink
fix: init secp-zkp for legacy refunds (#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Feb 22, 2025
1 parent 8d618bf commit 27da26e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/refund.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import log from "loglevel";

import { LBTC } from "../consts/Assets";
import { SwapType } from "../consts/Enums";
import secp from "../lazy/secp";
import {
TransactionInterface,
broadcastTransaction,
Expand Down Expand Up @@ -215,6 +216,8 @@ export const refund = async <T extends SubmarineSwap | ChainSwap>(
cooperative,
);
} else {
// Initialize the secp256k1-zkp library for blinding
await secp.get();
const redeemScript = Buffer.from(
(swap as unknown as { redeemScript: string }).redeemScript,
"hex",
Expand Down

0 comments on commit 27da26e

Please sign in to comment.