peatio-bitcoincash 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: e12e8dd94904f0e60b5bc27396bcce91551e82c3eaf95aef206037e78e1b2a98
4
- data.tar.gz: 40d1179302f5659fb8d896e01bac7c7b92f2047b805f3d62d2efb846b0aa28e3
3
+ metadata.gz: 48b2f2ab9c8a1c69e3ffc4437dc7288b0dc4ba014c7bbdbf55703ab87b246d38
4
+ data.tar.gz: 66fb09f0725d67ea994d8dd33f39381f11fb54775eaa4c4f39be40a2c91f37a1
5
5
  SHA512:
6
- metadata.gz: 2ca20a92b9e130d1a2680f1c8ad94d6b60191b9950421b9a07a8607e5993cd9218de012ae7cdb5c3d0598eee9e94ec482eac437090912e896b8e046f690209af
7
- data.tar.gz: 719530948ee7d892a889088b3311b33e04798beced3537150c7a51dfbc8521968df9de58022d8755651d7faf350e66704bf73769c2202e7a9e9f4a1c54bab356
6
+ metadata.gz: 8e78082443be6dfbdd3a7392d86d653bd3ca443cfac0181a1171a81c432411cea7003288ad77b1f1341889593348e60757d0cb4a05f38a2f50792f5d86944fb2
7
+ data.tar.gz: c7e72eb4fa1571e6819a912aa44fe96e681d2e6a8c7747a88c12d196a445b74f453bf270db367ed1e8b0a3dc3965f90723d8f6e216824cfe14631bc7d7590d32
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-bitcoincash (2.5.3)
4
+ peatio-bitcoincash (2.5.4)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
7
  cash-addr (~> 0.2.0)
@@ -53,6 +53,17 @@ module Peatio
53
53
  raise Peatio::Blockchain::ClientError, e
54
54
  end
55
55
 
56
+ def transaction_sources(transaction)
57
+ transaction_hash = client.json_rpc(:getrawtransaction, [transaction.hash, 1])
58
+ transaction_hash['vin'].each_with_object([]) do |vin, source_addresses|
59
+ next if vin['txid'].blank?
60
+
61
+ vin_transaction = client.json_rpc(:getrawtransaction, [vin['txid'], 1])
62
+ source = vin_transaction['vout'].find { |hash| hash['n'] == vin['vout'] }
63
+ source_addresses << source['scriptPubKey']['addresses'][0]
64
+ end.compact.uniq
65
+ end
66
+
56
67
  private
57
68
 
58
69
  def build_transaction(tx_hash)
@@ -1,5 +1,5 @@
1
1
  module Peatio
2
2
  module Bitcoincash
3
- VERSION = "2.5.3".freeze
3
+ VERSION = "2.5.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-bitcoincash
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
  - Dinesh Chohda
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