peatio-dash 2.5.3 → 2.5.4

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
  SHA256:
3
- metadata.gz: 0eb56cd43ddb00766264b921a042a72d3a97a82d80f6a60d46302bf69ec396e6
4
- data.tar.gz: 1ff4ae1a0bbce9d4e12cb5aadabd07d9c557305bf1692393e24eea9a51dab18e
3
+ metadata.gz: c9302f74327e656926f93fa1e314998d6c2922d11ee7345cd4d7855f9c6ede51
4
+ data.tar.gz: a764fd26782ffbd2c57771c5fb3fcde856a150388b6af109a668729d1aa523fe
5
5
  SHA512:
6
- metadata.gz: 223dbcaafecefefd8f741dcf42812f7547974c4961aa22baf32ad0b1d52df50bbe6f2baddd779887fa5e7d84550cfba9a2fd778eaf91fabca2c4f19f49ec59fb
7
- data.tar.gz: dab780313356ce917f4b66f4c40db7cf7c048b85094c86ff82cdb84e107727b036984d76989b4225600626d2e2c6a0bdc3c2132bc494abcbdc5efca1f540745a
6
+ metadata.gz: 4cb1114f8927e6b59551fdbe1932cd4bfd7c26c42384c2669595f480428ce674dffa6e077dbf9f40a901bb148806185c79bd45db8a37c314e8fe588c56c78d6a
7
+ data.tar.gz: 50f1025396f81353ad2d0cf7e7b86a1c279dbf3df8c3c9eef2b20bb1f75f402cb5db2848e1fee4d0e8467b0e98085a91eabe642eec8182cec72497d5f5a1f0be
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-dash (2.5.3)
4
+ peatio-dash (2.5.4)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
7
  faraday (~> 0.17)
@@ -51,6 +51,17 @@ module Peatio
51
51
  raise Peatio::Blockchain::ClientError, e
52
52
  end
53
53
 
54
+ def transaction_sources(transaction)
55
+ transaction_hash = client.json_rpc(:getrawtransaction, [transaction.hash, 1])
56
+ transaction_hash['vin'].each_with_object([]) do |vin, source_addresses|
57
+ next if vin['txid'].blank?
58
+
59
+ vin_transaction = client.json_rpc(:getrawtransaction, [vin['txid'], 1])
60
+ source = vin_transaction['vout'].find { |hash| hash['n'] == vin['vout'] }
61
+ source_addresses << source['scriptPubKey']['addresses'][0]
62
+ end.compact.uniq
63
+ end
64
+
54
65
  private
55
66
 
56
67
  def filter_vout(tx_hash)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Peatio
4
4
  module Dash
5
- VERSION = "2.5.3"
5
+ VERSION = "2.5.4"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.3
4
+ version: 2.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MoD
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-10 00:00:00.000000000 Z
11
+ date: 2020-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport