lib/zold/commands/show.rb in zold-0.7 vs lib/zold/commands/show.rb in zold-0.8
- old
+ new
@@ -22,10 +22,11 @@
require 'rainbow'
require_relative 'args'
require_relative '../log'
require_relative '../id'
require_relative '../amount'
+require_relative '../wallet'
# SHOW command.
# Author:: Yegor Bugayenko (yegor256@gmail.com)
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
# License:: MIT
@@ -59,10 +60,12 @@
def show(wallet, _)
balance = wallet.balance
wallet.txns.each do |t|
@log.info(t.to_text)
end
- @log.info("The balance of #{wallet}: #{balance}")
+ msg = "The balance of #{wallet}: #{balance}"
+ msg += " (net:#{wallet.network})" if wallet.network != Wallet::MAIN_NETWORK
+ @log.info(msg)
balance
end
end
end