peatio-dash 2.5.4 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -12
- data/lib/peatio/dash/blockchain.rb +0 -11
- data/lib/peatio/dash/client.rb +3 -10
- data/lib/peatio/dash/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: b1ad408a30a09d6841cec6229b4263a51492cd76cfa048f0c9d09117f878a5b6
|
4
|
+
data.tar.gz: abbac21c06c24e62d6fe7915b886a3383ab2558973a99be263a06fe7e6962fb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 574cc27aa39c83f6d6770803798b9a9f4196de8167865e4d27b8e03ea087cc89dbf6651e50827e2f8e1a0c776ff3739ccfcacee423cf49de74926120983aa47f
|
7
|
+
data.tar.gz: 571e79b4639d879e0d2e770078065ef1cdb2f055c598002ff1e8b0b479316908801375a972498eda80a2dbf6d3060960d93937d231462b18c83b2f13022d3095
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
peatio-dash (2.
|
4
|
+
peatio-dash (2.6.0)
|
5
5
|
activesupport (~> 5.2.3)
|
6
6
|
better-faraday (~> 1.0.5)
|
7
7
|
faraday (~> 0.17)
|
@@ -12,9 +12,9 @@ PATH
|
|
12
12
|
GEM
|
13
13
|
remote: https://rubygems.org/
|
14
14
|
specs:
|
15
|
-
activemodel (5.2.4.
|
16
|
-
activesupport (= 5.2.4.
|
17
|
-
activesupport (5.2.4.
|
15
|
+
activemodel (5.2.4.2)
|
16
|
+
activesupport (= 5.2.4.2)
|
17
|
+
activesupport (5.2.4.2)
|
18
18
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
19
|
i18n (>= 0.7, < 2)
|
20
20
|
minitest (~> 5.1)
|
@@ -35,14 +35,14 @@ GEM
|
|
35
35
|
clamp (1.3.1)
|
36
36
|
coderay (1.1.2)
|
37
37
|
concurrent-ruby (1.1.6)
|
38
|
-
connection_pool (2.2.
|
38
|
+
connection_pool (2.2.2)
|
39
39
|
cookiejar (0.3.3)
|
40
40
|
crack (0.4.3)
|
41
41
|
safe_yaml (~> 1.0.0)
|
42
42
|
daemons (1.3.1)
|
43
43
|
diff-lcs (1.3)
|
44
44
|
docile (1.3.2)
|
45
|
-
em-http-request (1.1.
|
45
|
+
em-http-request (1.1.5)
|
46
46
|
addressable (>= 2.3.4)
|
47
47
|
cookiejar (!= 0.3.1)
|
48
48
|
em-socksify (>= 0.3)
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
multipart-post (>= 1.2, < 3)
|
61
61
|
faraday_middleware (0.13.1)
|
62
62
|
faraday (>= 0.7.4, < 1.0)
|
63
|
-
faye (1.
|
63
|
+
faye (1.2.5)
|
64
64
|
cookiejar (>= 0.3.0)
|
65
65
|
em-http-request (>= 0.3.0)
|
66
66
|
eventmachine (>= 0.12.0)
|
@@ -73,7 +73,7 @@ GEM
|
|
73
73
|
websocket-driver (>= 0.5.1)
|
74
74
|
hashdiff (1.0.1)
|
75
75
|
http_parser.rb (0.6.0)
|
76
|
-
i18n (1.8.
|
76
|
+
i18n (1.8.2)
|
77
77
|
concurrent-ruby (~> 1.0)
|
78
78
|
io-console (0.5.6)
|
79
79
|
irb (1.2.3)
|
@@ -82,7 +82,7 @@ GEM
|
|
82
82
|
jwt (2.2.1)
|
83
83
|
memoist (0.16.2)
|
84
84
|
method_source (1.0.0)
|
85
|
-
minitest (5.14.
|
85
|
+
minitest (5.14.0)
|
86
86
|
mocha (1.11.2)
|
87
87
|
multi_json (1.14.1)
|
88
88
|
multipart-post (2.1.1)
|
@@ -92,7 +92,7 @@ GEM
|
|
92
92
|
parallel (1.19.1)
|
93
93
|
parser (2.7.0.5)
|
94
94
|
ast (~> 2.4.0)
|
95
|
-
peatio (2.
|
95
|
+
peatio (2.4.4)
|
96
96
|
activemodel (> 5.2, <= 6.0.0)
|
97
97
|
amqp
|
98
98
|
bunny
|
@@ -161,9 +161,9 @@ GEM
|
|
161
161
|
addressable (>= 2.3.6)
|
162
162
|
crack (>= 0.3.2)
|
163
163
|
hashdiff (>= 0.4.0, < 2.0.0)
|
164
|
-
websocket-driver (0.7.
|
164
|
+
websocket-driver (0.7.1)
|
165
165
|
websocket-extensions (>= 0.1.0)
|
166
|
-
websocket-extensions (0.1.
|
166
|
+
websocket-extensions (0.1.4)
|
167
167
|
|
168
168
|
PLATFORMS
|
169
169
|
ruby
|
@@ -51,17 +51,6 @@ 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
|
-
|
65
54
|
private
|
66
55
|
|
67
56
|
def filter_vout(tx_hash)
|
data/lib/peatio/dash/client.rb
CHANGED
@@ -8,7 +8,7 @@ module Peatio
|
|
8
8
|
module Dash
|
9
9
|
class Client
|
10
10
|
Error = Class.new(StandardError)
|
11
|
-
|
11
|
+
ConnectionError = Class.new(Error)
|
12
12
|
|
13
13
|
class ResponseError < Error
|
14
14
|
def initialize(code, msg)
|
@@ -38,15 +38,8 @@ module Peatio
|
|
38
38
|
end
|
39
39
|
|
40
40
|
response.fetch("result")
|
41
|
-
rescue
|
42
|
-
|
43
|
-
when Faraday::Error
|
44
|
-
raise ConnectionError, e
|
45
|
-
when Error
|
46
|
-
raise e
|
47
|
-
else
|
48
|
-
raise Error, e
|
49
|
-
end
|
41
|
+
rescue Faraday::Error => e
|
42
|
+
raise ConnectionError, e
|
50
43
|
end
|
51
44
|
|
52
45
|
private
|
data/lib/peatio/dash/version.rb
CHANGED
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.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MoD
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|