Compare commits

..
1 Commits
Author SHA1 Message Date
telackey 6055da62c7 Fix default 'account get' output. (#77)
Lint / lint (18.x) (push) Successful in 1m27s
Publish npm package to gitea / npm_publish (18.x) (release) Successful in 1m42s
Tests / cli_tests (18.x) (push) Successful in 9m27s
The current code throws an exception if no address is specified.  It is supposed to return the current account info.

Reviewed-on: #77
Reviewed-by: David Boreham <dboreham@noreply.git.vdb.to>
Co-authored-by: Thomas E Lackey <telackey@bozemanpass.com>
Co-committed-by: Thomas E Lackey <telackey@bozemanpass.com>
2024-08-20 19:01:24 +00:00
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@cerc-io/laconic-registry-cli",
"version": "0.2.5",
"version": "0.2.6",
"main": "index.js",
"repository": "git@github.com:cerc-io/laconic-registry-cli.git",
"author": "",
+3 -1
View File
@@ -18,7 +18,9 @@ export const handler = async (argv: Arguments) => {
assert(chainId, 'Invalid registry Chain ID.');
if (!address && privateKey) {
address = new Account(Buffer.from(privateKey, 'hex')).address;
const account = new Account(Buffer.from(privateKey, 'hex'));
await account.init();
address = account.address;
}
const registry = new Registry(gqlEndpoint, rpcEndpoint, chainId);