lib/zold/commands/create.rb in zold-0.6.4 vs lib/zold/commands/create.rb in zold-0.7

- old
+ new

@@ -43,19 +43,23 @@ Available options:" o.string '--public-key', 'The location of RSA public key (default: ~/.ssh/id_rsa.pub)', require: true, default: '~/.ssh/id_rsa.pub' + o.string '--network', + 'The name of the network', + require: true, + default: 'zold' o.bool '--help', 'Print instructions' end mine = Args.new(opts, @log).take || return create(mine.empty? ? Id.new : Id.new(mine[0]), opts) end def create(id, opts) wallet = @wallets.find(id) key = Zold::Key.new(file: opts['public-key']) - wallet.init(id, key) + wallet.init(id, key, network: opts['network']) @log.info(wallet.id) @log.debug("Wallet #{Rainbow(wallet).green} created at #{@wallets.path}") wallet end end