onchain 2.12 → 2.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce567b41960ed48b8522da199ec5e54a14728464
4
- data.tar.gz: aa6b26e696229a0ab68bd8c7192c227e01053207
3
+ metadata.gz: 98212005220585a5e54eb91b46c5c79a377d2737
4
+ data.tar.gz: 3d049b15dc63e88392060025c19f709325fedf00
5
5
  SHA512:
6
- metadata.gz: 67dc3675d14b0f92b2e37cb5586eb81d07c06c2cb2755806b25f130fa12cd13f9fd86de3a69cef51a9c4578422f6ad4691db76d76739f6da08a225656a418cb7
7
- data.tar.gz: 8bee778795273d7ce344ac3f541dd1df74ce0f79fb64dac87cd628bded807a5dbfdaa6c61f65376e9c5d3fc259ff1eaeba363b258d47a4f4d3640bb5068943d6
6
+ metadata.gz: 08f1fa37d1281856c59182411b84a4b822c144e20b9a1adb371cd1c42c0d104ce7d50b2d2c0aa064703d187973c68dacf3be5f5a2b08c21fe2fd6ded85536a6d
7
+ data.tar.gz: 75203bb5e1f63f01b5f63429d15aac3795314f983380116be435255389cd941298f2527b46eb091879401a480ae8783a5bb85abb4f59ac5bf20b15641935bafe
@@ -135,7 +135,7 @@ class OnChain::BlockChain
135
135
  next
136
136
  end
137
137
 
138
- if supplier == :blockrand and network == :bitcoin and method_name.to_s == 'address_history'
138
+ if supplier == :blockr and network == :bitcoin and method_name.to_s == 'address_history'
139
139
  next
140
140
  end
141
141
 
@@ -143,7 +143,7 @@ class OnChain::BlockChain
143
143
  next
144
144
  end
145
145
 
146
- if supplier == :blockr and method_name.to_s == 'get_history_for_addresses'
146
+ if supplier == :blockr and network == :bitcoin and method_name.to_s == 'get_history_for_addresses'
147
147
  next
148
148
  end
149
149
 
@@ -1,7 +1,7 @@
1
1
  class OnChain::BlockChain
2
2
  class << self
3
3
 
4
- def blockinfo_address_history(address)
4
+ def blockinfo_address_history(address, network = :bitcoin)
5
5
 
6
6
  base_url = "https://blockchain.info/address/#{address}?format=json"
7
7
  json = fetch_response(base_url, true)
@@ -22,7 +22,7 @@ class OnChain::BlockChain
22
22
  txs = json['data']['txs']
23
23
  txs.each do |tx|
24
24
  row = {}
25
- row[:time] = tx["time_utc"]
25
+ row[:time] = DateTime.parse(tx["time_utc"]).to_time.to_i
26
26
  row[:addr] = {}
27
27
  row[:outs] = {}
28
28
  row[:hash] = tx["tx"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onchain
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.12'
4
+ version: '2.13'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Number 6