Skip to content

Commit

Permalink
fix: 🐛 boltz swap (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
apotdevin authored Dec 25, 2020
1 parent b0d9e59 commit f1c9e4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/schema/boltz/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const boltzResolvers = {

const info = detectSwap(redeemScript, lockupTransaction);

if (!info?.vout || !info.type) {
if ((info?.vout ?? -1) < 0 || (info?.type ?? -1) < 0) {
logger.error('Cannot get vout or type from Boltz');
logger.debug('Swap info: %o', {
redeemScript,
Expand All @@ -134,7 +134,7 @@ export const boltzResolvers = {
);

const finalTransaction = constructClaimTransaction(
utxos,
utxos as any,
destinationScript,
fee
);
Expand Down

0 comments on commit f1c9e4c

Please sign in to comment.