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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/peatio/bitcoincash/blockchain.rb +11 -0
- data/lib/peatio/bitcoincash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48b2f2ab9c8a1c69e3ffc4437dc7288b0dc4ba014c7bbdbf55703ab87b246d38
|
4
|
+
data.tar.gz: 66fb09f0725d67ea994d8dd33f39381f11fb54775eaa4c4f39be40a2c91f37a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e78082443be6dfbdd3a7392d86d653bd3ca443cfac0181a1171a81c432411cea7003288ad77b1f1341889593348e60757d0cb4a05f38a2f50792f5d86944fb2
|
7
|
+
data.tar.gz: c7e72eb4fa1571e6819a912aa44fe96e681d2e6a8c7747a88c12d196a445b74f453bf270db367ed1e8b0a3dc3965f90723d8f6e216824cfe14631bc7d7590d32
|
data/Gemfile.lock
CHANGED
@@ -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)
|
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.
|
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-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|