Skip to content

Commit

Permalink
Fix: chainId required during account create.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwinphatak committed Aug 27, 2020
1 parent 2e2d915 commit 3dd703f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/cli-wns/src/modules/wns.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,12 @@ export const WNSModule = ({ config }) => ({

handler: asyncHandler(async argv => {
const wnsConfig = config.get('services.wns');
const { server, userKey, bondId } = getConnectionInfo(argv, wnsConfig);
const { server, userKey, bondId, chainId } = getConnectionInfo(argv, wnsConfig);

assert(server, 'Invalid WNS endpoint.');
assert(!userKey, 'User key already exists.');
assert(!bondId, 'Bond already exists.');
assert(chainId, 'Invalid WNS Chain ID.');

const faucetServer = config.get('services.faucet.server');

Expand All @@ -371,7 +372,7 @@ export const WNSModule = ({ config }) => ({
const account = Account.generateFromMnemonic(mnemonic);
const address = account.getCosmosAddress();

const registry = new Registry(server);
const registry = new Registry(server, chainId);
const accountResult = await registry.getAccounts([address]);
if (accountResult.length) {
log('Account already exists.');
Expand Down

0 comments on commit 3dd703f

Please sign in to comment.