fix cmd outputs #33
@ -23,5 +23,6 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
const result = await registry.deleteName({ crn: name }, privateKey, fee);
|
const result = await registry.deleteName({ crn: name }, privateKey, fee);
|
||||||
|
|
||||||
console.log(JSON.stringify(result, undefined, 2));
|
const success = `{"success":${result.code==0}}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2): JSON.stringify(JSON.parse(success)));
|
||||||
}
|
}
|
||||||
|
@ -21,5 +21,6 @@ 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]);
|
||||||
console.log(JSON.stringify(result, undefined, 4));
|
const success = `{"success":${result.code==0}}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2): JSON.stringify(JSON.parse(success)));
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,6 @@ export const handler = async (argv: Arguments) => {
|
|||||||
const fee = getGasAndFees(argv, cnsConfig);
|
const fee = getGasAndFees(argv, cnsConfig);
|
||||||
const result = await registry.setName({ crn: name, cid: id }, privateKey, fee);
|
const result = await registry.setName({ crn: name, cid: id }, privateKey, fee);
|
||||||
|
|
||||||
console.log(JSON.stringify(result, undefined, 2));
|
const success = `{"success":${result.code==0}}`
|
||||||
|
console.log(argv.verbose ? JSON.stringify(result, undefined, 2): JSON.stringify(JSON.parse(success)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user