diff --git a/lib/cli/commands/openchannel.ts b/lib/cli/commands/openchannel.ts index 2f37652ee..d51f52dfe 100644 --- a/lib/cli/commands/openchannel.ts +++ b/lib/cli/commands/openchannel.ts @@ -37,6 +37,10 @@ export const builder = (argv: Argv) => argv .example('$0 openchannel ETH 0.5', 'deposit 0.5 into an ETH Connext channel without specifying a remote node'); export const handler = async (argv: Arguments) => { + if (isNaN(argv.amount)) { + throw 'amount must be a number'; + } + const request = new OpenChannelRequest(); if (argv.node_identifier) { request.setNodeIdentifier(argv.node_identifier);