diff --git a/lib/cli/Command.ts b/lib/cli/Command.ts index bc1b938b..2a2c2d4d 100644 --- a/lib/cli/Command.ts +++ b/lib/cli/Command.ts @@ -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; };