diff --git a/package.json b/package.json index 23bb3e6..8e29830 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cerc-io/laconic-registry-cli", - "version": "0.1.2", + "version": "0.1.3", "main": "index.js", "repository": "git@github.com:cerc-io/laconic-registry-cli.git", "author": "", diff --git a/src/cmds/cns-cmds/name-cmds/resolve.ts b/src/cmds/cns-cmds/name-cmds/resolve.ts index d125f9f..d4388c2 100644 --- a/src/cmds/cns-cmds/name-cmds/resolve.ts +++ b/src/cmds/cns-cmds/name-cmds/resolve.ts @@ -2,7 +2,7 @@ import { Arguments } from 'yargs'; import assert from 'assert'; import { Registry } from '@cerc-io/laconic-sdk'; -import { getConfig, getConnectionInfo,txOutput } from '../../../util'; +import { getConfig, getConnectionInfo, queryOutput } from '../../../util'; export const command = 'resolve [name]'; @@ -20,8 +20,8 @@ export const handler = async (argv: Arguments) => { const registry = new Registry(gqlEndpoint, restEndpoint, chainId); - const result = await registry.resolveNames([name]); - const success = `{"success":${result.code==0}}` - txOutput(result,success,argv.output,argv.verbose) + let result = await registry.resolveNames([name]); + result = result.filter((v: any) => v); + queryOutput(result, argv.output); } diff --git a/src/cmds/cns-cmds/record-cmds/list.ts b/src/cmds/cns-cmds/record-cmds/list.ts index c887455..d20133c 100644 --- a/src/cmds/cns-cmds/record-cmds/list.ts +++ b/src/cmds/cns-cmds/record-cmds/list.ts @@ -48,11 +48,11 @@ export const handler = async (argv: Arguments) => { // Apply ex post filters. if (bondId) { - result = result.filter(v => v.bondId === bondId); + result = result.filter((v: any) => v.bondId === bondId); } if (owner) { - result = result.filter(v => v.owners?.find((e: string) => e === owner)); + result = result.filter((v: any) => v.owners?.find((e: string) => e === owner)); } queryOutput(result, argv.output)