From 105ed518e7b476d1b4749a0d10c26f0d3a899740 Mon Sep 17 00:00:00 2001 From: Daniel McNally Date: Thu, 11 Jun 2020 18:21:25 -0400 Subject: [PATCH] fix(cli): accept lower case currencies (#1629) This allows xucli to accept lower or mixed case currency tickers (such as `btc` or `Btc`) as well as upper case for the `walletdeposit` and `walletwithdraw` commands. Closes #1626. --- lib/cli/commands/walletdeposit.ts | 2 +- lib/cli/commands/walletwithdraw.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cli/commands/walletdeposit.ts b/lib/cli/commands/walletdeposit.ts index 87a628c95..2da7df98b 100644 --- a/lib/cli/commands/walletdeposit.ts +++ b/lib/cli/commands/walletdeposit.ts @@ -15,6 +15,6 @@ export const builder = (argv: Argv) => argv export const handler = async (argv: Arguments) => { const request = new DepositRequest(); - request.setCurrency(argv.currency); + request.setCurrency(argv.currency.toUpperCase()); (await loadXudClient(argv)).walletDeposit(request, callback(argv)); }; diff --git a/lib/cli/commands/walletwithdraw.ts b/lib/cli/commands/walletwithdraw.ts index 13b94ad0f..b0a817b38 100644 --- a/lib/cli/commands/walletwithdraw.ts +++ b/lib/cli/commands/walletwithdraw.ts @@ -34,7 +34,7 @@ export const builder = (argv: Argv) => argv export const handler = async (argv: Arguments) => { const request = new WithdrawRequest(); - request.setCurrency(argv.currency); + request.setCurrency(argv.currency.toUpperCase()); if (argv.all) { request.setAll(argv.all); } else {