Skip to content

Commit

Permalink
fix: throw error in cli when no swap output can be found (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Jan 1, 2025
1 parent 097afa3 commit efe6b8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cli/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export const prepareTx = async (
res.swapOutput = detectSwap(res.redeemScript, transaction);
}

if (res.swapOutput === undefined) {
throw 'could not find swap output';
}

return res;
};

Expand Down

0 comments on commit efe6b8a

Please sign in to comment.