Skip to content

Commit

Permalink
fix(cli): openchannel assertion error for string amount (#1950)
Browse files Browse the repository at this point in the history
Fixes #1643.
  • Loading branch information
rsercano authored Nov 1, 2020
1 parent d458745 commit a0cc6d7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/cli/commands/openchannel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>) => {
if (isNaN(argv.amount)) {
throw 'amount must be a number';
}

const request = new OpenChannelRequest();
if (argv.node_identifier) {
request.setNodeIdentifier(argv.node_identifier);
Expand Down

0 comments on commit a0cc6d7

Please sign in to comment.