peatio-ripple 0.1.1 → 0.1.2

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: 71cd9263f7437ec7f60b5b836a7fa5ea7a2988f7b2cfc12ec2dbb3322ccf7f53
4
- data.tar.gz: e5899ec1dfe2353c6faabbeba27149387d8aa4ed921a80dd3204e2850fbf4f9d
3
+ metadata.gz: fca8aa799c1b54795efa9cbac40bb012f921b5696be7227ea5d3ac77249e3b49
4
+ data.tar.gz: 9ca88c8760dd198af3c4e37eeff9f6b56e71693e5f81b5bba9d4f703ab32d286
5
5
  SHA512:
6
- metadata.gz: a033452f237c31e3278d387650b6b2cd6ec33255741558d87a28016e20026002cc6a39f85eb55cdd54ba0c96fb8666370de8411e75570fba6968e539cd511287
7
- data.tar.gz: 02cc273fda5ed5f15f19ab72220a1d12461b22dc3fb5ca8a7469763b5a41272abfba08380ef12a5bff2a007ffe04d7904b6b08ed980b3be6c622928ae7ac164a
6
+ metadata.gz: 698f9775c3af56b6fb836e4db5a82cc9b35adfc50d60b2290124a12c77db3d59132c527e727ba75aaf6bf21ed32172ed76f4925f3d3543588e15d9130e2e27ce
7
+ data.tar.gz: 8a0213dc55a40cbf3761c6791213356ddc9a4849e9780d70575239d052d0564c3028cc08070e551429ae8b4ea9bf488fa2d71206e3f7d0971048c1d0af43ab79
data/Gemfile.lock CHANGED
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-ripple (0.1.1)
4
+ peatio-ripple (0.1.2)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
7
  faraday (~> 0.15.4)
8
8
  memoist (~> 0.16.0)
9
- peatio (~> 0.6.1)
9
+ net-http-persistent (~> 3.0.1)
10
+ peatio (~> 0.6.3)
10
11
 
11
12
  GEM
12
13
  remote: https://rubygems.org/
@@ -24,15 +25,16 @@ GEM
24
25
  amqp (1.8.0)
25
26
  amq-protocol (>= 2.2.0)
26
27
  eventmachine
27
- better-faraday (1.0.6)
28
+ better-faraday (1.0.8)
28
29
  activesupport (>= 4.0, < 6.0)
29
30
  faraday (~> 0.12)
30
- bunny (2.14.2)
31
+ bunny (2.14.3)
31
32
  amq-protocol (~> 2.3, >= 2.3.0)
32
33
  byebug (11.0.1)
33
34
  clamp (1.3.1)
34
35
  coderay (1.1.2)
35
36
  concurrent-ruby (1.1.5)
37
+ connection_pool (2.2.2)
36
38
  crack (0.4.3)
37
39
  safe_yaml (~> 1.0.0)
38
40
  diff-lcs (1.3)
@@ -44,19 +46,21 @@ GEM
44
46
  multipart-post (>= 1.2, < 3)
45
47
  hashdiff (0.3.9)
46
48
  http_parser.rb (0.6.0)
47
- i18n (1.6.0)
49
+ i18n (1.7.0)
48
50
  concurrent-ruby (~> 1.0)
49
51
  jwt (2.2.1)
50
- memoist (0.16.0)
52
+ memoist (0.16.1)
51
53
  metaclass (0.0.4)
52
54
  method_source (0.9.2)
53
- minitest (5.11.3)
55
+ minitest (5.13.0)
54
56
  mocha (1.8.0)
55
57
  metaclass (~> 0.0.1)
56
58
  multipart-post (2.1.1)
57
59
  mysql2 (0.5.2)
58
- peatio (0.6.1)
59
- activemodel (~> 5.2.3)
60
+ net-http-persistent (3.0.1)
61
+ connection_pool (~> 2.2)
62
+ peatio (0.6.3)
63
+ activemodel (> 5.2, <= 6.0.0)
60
64
  amqp
61
65
  bunny
62
66
  clamp
@@ -107,4 +111,4 @@ DEPENDENCIES
107
111
  webmock (~> 3.5)
108
112
 
109
113
  BUNDLED WITH
110
- 1.17.2
114
+ 1.17.3
@@ -79,7 +79,7 @@ module Peatio
79
79
  to_address: address,
80
80
  status: check_status(tx_hash),
81
81
  currency_id: currency[:id],
82
- amount: convert_from_base_unit(tx_hash.fetch('Amount'), currency) }
82
+ amount: convert_from_base_unit(tx_hash.dig('metaData', 'delivered_amount'), currency) }
83
83
  end
84
84
  end
85
85
 
@@ -94,7 +94,7 @@ module Peatio
94
94
  def valid_transaction?(tx)
95
95
  inspect_address!(tx['Account'])[:is_valid] &&
96
96
  tx['TransactionType'].to_s == 'Payment' &&
97
- String === tx['Amount']
97
+ String === tx.dig('metaData', 'delivered_amount')
98
98
  end
99
99
 
100
100
  def inspect_address!(address)
@@ -55,14 +55,15 @@ module Peatio
55
55
  end
56
56
 
57
57
  def connection
58
- Faraday.new(@json_rpc_endpoint).tap do |connection|
58
+ @connection ||= Faraday.new(@json_rpc_endpoint) do |f|
59
+ f.adapter :net_http_persistent, pool_size: 5
60
+ end.tap do |connection|
59
61
  unless @json_rpc_endpoint.user.blank?
60
62
  connection.basic_auth(@json_rpc_endpoint.user,
61
63
  @json_rpc_endpoint.password)
62
64
  end
63
65
  end
64
66
  end
65
- memoize :connection
66
67
  end
67
68
  end
68
69
  end
@@ -1,5 +1,5 @@
1
1
  module Peatio
2
2
  module Ripple
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -24,10 +24,11 @@ Gem::Specification.new do |spec|
24
24
  spec.require_paths = ["lib"]
25
25
 
26
26
  spec.add_dependency "activesupport", "~> 5.2.3"
27
- spec.add_dependency "peatio", "~> 0.6.1"
27
+ spec.add_dependency "peatio", "~> 0.6.3"
28
28
  spec.add_dependency "faraday", "~> 0.15.4"
29
29
  spec.add_dependency "memoist", "~> 0.16.0"
30
30
  spec.add_dependency "better-faraday", "~> 1.0.5"
31
+ spec.add_dependency 'net-http-persistent', '~> 3.0.1'
31
32
 
32
33
  spec.add_development_dependency "bundler", "~> 1.17"
33
34
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-ripple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maksym N.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-05 00:00:00.000000000 Z
11
+ date: 2019-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.6.1
33
+ version: 0.6.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.6.1
40
+ version: 0.6.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.0.5
83
+ - !ruby/object:Gem::Dependency
84
+ name: net-http-persistent
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.0.1
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.0.1
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement