Tests for registry-cli #32
@ -2,7 +2,7 @@ import { Arguments } from 'yargs';
|
|||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import { Registry } from '@cerc-io/laconic-sdk';
|
import { Registry } from '@cerc-io/laconic-sdk';
|
||||||
|
|
||||||
import { getConfig, getConnectionInfo,txOutput } from '../../../util';
|
import { getConfig, getConnectionInfo,queryOutput } from '../../../util';
|
||||||
|
|
||||||
export const command = 'resolve [name]';
|
export const command = 'resolve [name]';
|
||||||
|
|
||||||
@ -21,7 +21,5 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
const registry = new Registry(gqlEndpoint, restEndpoint, chainId);
|
||||||
|
|
||||||
const result = await registry.resolveNames([name]);
|
const result = await registry.resolveNames([name]);
|
||||||
const success = `{"success":${result.code==0}}`
|
queryOutput(result,argv.output)
|
||||||
txOutput(result,success,argv.output,argv.verbose)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user