lib/zold/commands/create.rb in zold-0.14.28 vs lib/zold/commands/create.rb in zold-0.14.29
- old
+ new
@@ -58,14 +58,15 @@
end
private
def create(id, opts)
- wallet = @wallets.find(id)
key = Zold::Key.new(file: opts['public-key'])
- wallet.init(id, key, network: opts['network'])
- @log.info(wallet.id)
- @log.debug("Wallet #{Rainbow(wallet).green} created at #{@wallets.path}")
- wallet
+ @wallets.find(id) do |wallet|
+ wallet.init(id, key, network: opts['network'])
+ @log.debug("Wallet #{Rainbow(wallet).green} created at #{@wallets.path}")
+ end
+ @log.info(id)
+ id
end
end
end