peatio-bitgo 2.5.2 → 2.6.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/bitgo/client.rb +2 -4
- data/lib/peatio/bitgo/hooks.rb +2 -2
- data/lib/peatio/bitgo/version.rb +1 -1
- data/lib/peatio/bitgo/wallet.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1515fca85406f5b59cb6e89eab685278a2f5c44a858579de915805f93fecc07
|
4
|
+
data.tar.gz: f92854ebb36d43f171781c8ec38b514083d017281973c3cead917050821e9433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f886bc0ae67b72687683cf64fd09931d186394d8b041ba8f6fbdd7dcf63ae536eeafaaf34684f4b798ad848d3135e35ea3285e8a2a9eedbfa62c07dc40d9519d
|
7
|
+
data.tar.gz: e9d6a6f7687e031b8ee59ff2b8d9a4dc3461af768fc5752ee39753944cf564d3a980657182f1098799d15e8e9ae0d48dd790d32d1b89d876877112681d3a75b5
|
data/Gemfile.lock
CHANGED
data/lib/peatio/bitgo/client.rb
CHANGED
@@ -5,7 +5,7 @@ module Peatio
|
|
5
5
|
module Bitgo
|
6
6
|
class Client
|
7
7
|
Error = Class.new(StandardError)
|
8
|
-
|
8
|
+
ConnectionError = Class.new(Error)
|
9
9
|
|
10
10
|
class ResponseError < Error
|
11
11
|
def initialize(msg)
|
@@ -22,7 +22,7 @@ module Peatio
|
|
22
22
|
args = [@endpoint.to_s + path]
|
23
23
|
|
24
24
|
if data
|
25
|
-
if %i[
|
25
|
+
if %i[post put patch].include?(verb)
|
26
26
|
args << data.compact.to_json
|
27
27
|
args << { 'Content-Type' => 'application/json' }
|
28
28
|
else
|
@@ -48,8 +48,6 @@ module Peatio
|
|
48
48
|
else
|
49
49
|
raise ConnectionError, JSON.parse(e.response.body)['message']
|
50
50
|
end
|
51
|
-
rescue StandardError => e
|
52
|
-
raise Error, e
|
53
51
|
end
|
54
52
|
end
|
55
53
|
end
|
data/lib/peatio/bitgo/hooks.rb
CHANGED
@@ -9,7 +9,7 @@ module Peatio
|
|
9
9
|
unless Gem::Requirement.new(BLOCKCHAIN_VERSION_REQUIREMENT)
|
10
10
|
.satisfied_by?(Gem::Version.new(Peatio::Blockchain::VERSION))
|
11
11
|
[
|
12
|
-
"Bitgo blockchain version
|
12
|
+
"Bitgo blockchain version requirement was not satisfied by Peatio::Blockchain.",
|
13
13
|
"Bitgo blockchain requires #{BLOCKCHAIN_VERSION_REQUIREMENT}.",
|
14
14
|
"Peatio::Blockchain version is #{Peatio::Blockchain::VERSION}"
|
15
15
|
].join('\n').tap { |s| Kernel.abort s }
|
@@ -18,7 +18,7 @@ module Peatio
|
|
18
18
|
unless Gem::Requirement.new(WALLET_VERSION_REQUIREMENT)
|
19
19
|
.satisfied_by?(Gem::Version.new(Peatio::Wallet::VERSION))
|
20
20
|
[
|
21
|
-
"Bitgo wallet version
|
21
|
+
"Bitgo wallet version requirement was not satisfied by Peatio::Wallet.",
|
22
22
|
"Bitgo wallet requires #{WALLET_VERSION_REQUIREMENT}.",
|
23
23
|
"Peatio::Wallet version is #{Peatio::Wallet::VERSION}"
|
24
24
|
].join('\n').tap { |s| Kernel.abort s }
|
data/lib/peatio/bitgo/version.rb
CHANGED
data/lib/peatio/bitgo/wallet.rb
CHANGED
@@ -4,8 +4,11 @@ module Peatio
|
|
4
4
|
TIME_DIFFERENCE_IN_MINUTES = 10
|
5
5
|
XLM_MEMO_TYPES = { 'memoId': 'id', 'memoText': 'text', 'memoHash': 'hash', 'memoReturn': 'return' }
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
DEFAULT_FEATURES = { skip_deposit_collection: false }.freeze
|
8
|
+
|
9
|
+
def initialize(custom_features = {})
|
10
|
+
@features = DEFAULT_FEATURES.merge(custom_features).slice(*SUPPORTED_FEATURES)
|
11
|
+
@settings = {}
|
9
12
|
end
|
10
13
|
|
11
14
|
def configure(settings = {})
|