lib/katapaty/party.rb in katapaty-0.4.3 vs lib/katapaty/party.rb in katapaty-0.4.4

- old
+ new

@@ -31,14 +31,14 @@ def create_send(payload) request(__method__, payload) end def btc_unconfirm_balance(address) - (get_unspent_txouts(address).map { |a| a['amount'] }.sum.to_d * 1e8).to_i + (unspent_txouts(address).map { |a| a['amount'] }.sum.to_d * 1e8).to_i end - def get_unspent_txouts(address) - request(__method__, { address: address, unconfirmed: true }) + def unspent_txouts(address) + request(:get_unspent_txouts, { address: address, unconfirmed: true }) end def request(method_name, payload={}) client = RestClient::Resource.new Katapaty.configuration.counterparty_url request = { method: method_name.to_s, params: payload, jsonrpc: '2.0', id: '0' }.to_json