Skip to content

Commit

Permalink
fix(cli): accept lower case currencies (#1629)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sangaman authored Jun 11, 2020
1 parent fca4960 commit 105ed51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cli/commands/walletdeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ export const builder = (argv: Argv) => argv

export const handler = async (argv: Arguments<any>) => {
const request = new DepositRequest();
request.setCurrency(argv.currency);
request.setCurrency(argv.currency.toUpperCase());
(await loadXudClient(argv)).walletDeposit(request, callback(argv));
};
2 changes: 1 addition & 1 deletion lib/cli/commands/walletwithdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const builder = (argv: Argv) => argv

export const handler = async (argv: Arguments<any>) => {
const request = new WithdrawRequest();
request.setCurrency(argv.currency);
request.setCurrency(argv.currency.toUpperCase());
if (argv.all) {
request.setAll(argv.all);
} else {
Expand Down

0 comments on commit 105ed51

Please sign in to comment.