From 2990bf0bc8f610cc3ba30a41ce06597b6f691d23 Mon Sep 17 00:00:00 2001 From: gagdiez Date: Tue, 23 Jan 2024 12:37:38 +0100 Subject: [PATCH] fix: minor fixes --- bin/near-cli.js | 2 +- commands/account/create.js | 3 +-- config.js | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/near-cli.js b/bin/near-cli.js index 899d056c..d72db0da 100644 --- a/bin/near-cli.js +++ b/bin/near-cli.js @@ -23,7 +23,7 @@ yargs // eslint-disable-line .command(require('../commands/transactions/status')) .command(require('../commands/contract/view')) .command(require('../commands/deprecated')) - .option('verbose', { desc: 'Prints out verbose output', type: 'boolean', default: false }) + .option('verbose', { alias: ['v'], desc: 'Prints out verbose output', type: 'boolean', default: false }) .showHelpOnFail(true) .recommendCommands() .demandCommand(1, chalk`Pass {bold --help} to see all available commands and options.`) diff --git a/commands/account/create.js b/commands/account/create.js index aebcc30f..95030dbe 100644 --- a/commands/account/create.js +++ b/commands/account/create.js @@ -5,7 +5,6 @@ const inspectResponse = require('../../utils/inspect-response'); const { assertCredentials, storeCredentials } = require('../../utils/credentials'); const { DEFAULT_NETWORK } = require('../../config'); const chalk = require('chalk'); -const { BN } = require('bn.js'); module.exports = { command: 'create-account ', @@ -97,7 +96,7 @@ async function create(options) { throw new Error(`Account ${options.useAccount} does not exist in ${options.networkId}. Are you using the right network?`); } - const initialBalance = new BN(utils.format.parseNearAmount(options.initialBalance)); + const initialBalance = utils.format.parseNearAmount(options.initialBalance); const split = newAccountId.split('.'); const isSubAccount = newAccountId.endsWith(options.useAccount); diff --git a/config.js b/config.js index af0d158e..748c6e6c 100644 --- a/config.js +++ b/config.js @@ -26,6 +26,7 @@ function getConfig(env) { default: throw Error(`Unconfigured environment '${env}'. Can be configured in src/config.js.`); } + config['initialBalance'] = '1' + '0'.repeat(24); return config; }