Skip to content

Commit

Permalink
Merge pull request #1491 from ExchangeUnion/fix/cli-async
Browse files Browse the repository at this point in the history
  • Loading branch information
sangaman authored Apr 21, 2020
2 parents 8830466 + 43eef40 commit 572c98d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/cli/commands/deposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const builder = {
},
};

export const handler = (argv: Arguments<any>) => {
export const handler = async (argv: Arguments<any>) => {
const request = new DepositRequest();
request.setCurrency(argv.currency);
loadXudClient(argv).deposit(request, callback(argv));
(await loadXudClient(argv)).deposit(request, callback(argv));
};
4 changes: 2 additions & 2 deletions lib/cli/commands/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const builder = {
},
};

export const handler = (argv: Arguments<any>) => {
export const handler = async (argv: Arguments<any>) => {
const request = new WithdrawRequest();
request.setCurrency(argv.currency);
if (argv.all) {
Expand All @@ -40,5 +40,5 @@ export const handler = (argv: Arguments<any>) => {
request.setDestination(argv.destination);
request.setFee(argv.fee);

loadXudClient(argv).withdraw(request, callback(argv));
(await loadXudClient(argv)).withdraw(request, callback(argv));
};

0 comments on commit 572c98d

Please sign in to comment.