lib/bitshares/wallet.rb in bitshares-0.1.4.pre vs lib/bitshares/wallet.rb in bitshares-0.1.5

- old
+ new

@@ -5,29 +5,29 @@ attr_reader :name, :account def initialize(name) @name = name @account = nil - @password = Bitshares.config[:wallets][@name.to_sym] + @password = Bitshares.config[:wallet][@name] end def account(name) @account = Bitshares::Account.new(self, name) end def open - Bitshares::Client::rpc.request('wallet_open', [@name]) + CLIENT.request('wallet_open', [@name]) end def lock open # must be opened first - Bitshares::Client::rpc.request 'wallet_lock' + CLIENT.request 'wallet_lock' end def unlock(timeout = 1776) open # must be opened first - Bitshares::Client::rpc.request('wallet_unlock', [timeout, @password]) + CLIENT.request('wallet_unlock', [timeout, @password]) end def open? self.get_info['open'] end @@ -44,10 +44,10 @@ def locked? !unlocked? end def method_missing(m, *args) - Bitshares::Client::rpc.request('wallet_' + m.to_s, args) + CLIENT.request('wallet_' + m.to_s, args) end end end