lib/katapaty/party.rb in katapaty-1.0.6 vs lib/katapaty/party.rb in katapaty-1.1.0

- old
+ new

@@ -52,10 +52,10 @@ 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 + client = RestClient::Resource.new(Katapaty.configuration.counterparty_url, timeout: Katapaty.configuration.timeout) request = { method: method_name.to_s, params: payload, jsonrpc: '2.0', id: '0' }.to_json response = JSON.parse client.post(request, accept: 'json', content_type: 'json' ) raise Katapaty::JsonResponseError.new response if response.has_key? 'code'