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; }