From 61a2aaab0f8c9e1a5fe4b2c439a046c9fa30a652 Mon Sep 17 00:00:00 2001 From: 0xmuralik Date: Mon, 27 Mar 2023 19:37:16 +0530 Subject: [PATCH] fix send output --- src/cmds/cns-cmds/tokens-cmds/send.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cmds/cns-cmds/tokens-cmds/send.ts b/src/cmds/cns-cmds/tokens-cmds/send.ts index 8ee6c61..983a097 100644 --- a/src/cmds/cns-cmds/tokens-cmds/send.ts +++ b/src/cmds/cns-cmds/tokens-cmds/send.ts @@ -2,7 +2,7 @@ import { Arguments } from 'yargs'; import assert from 'assert'; import { Account, Registry } from '@cerc-io/laconic-sdk'; -import { getConfig, getConnectionInfo, getGasAndFees } from '../../../util'; +import { getConfig, getConnectionInfo, getGasAndFees, queryOutput } from '../../../util'; export const command = 'send'; @@ -40,9 +40,5 @@ export const handler = async (argv: Arguments) => { const fee = getGasAndFees(argv, cnsConfig); await registry.sendCoins({ denom, amount, destinationAddress }, privateKey, fee); const result = await registry.getAccounts([fromAddress, destinationAddress]); - if (argv.output=="json"){ - console.log(JSON.stringify(result, undefined, 2)); - } else { - console.log(result) - } + queryOutput(result,argv.output) }