peatio-bitgo 2.6.5 → 2.6.6

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: af28c5fe41488709946c6b6605b89cc57685edc7dcdf27031eb452b81dbf3bb1
4
- data.tar.gz: 566d20452432523045c9e16eedf0b02db1e724ac52dcbe8cace1348bc067c38b
3
+ metadata.gz: 71849263a007093ed7c9c53d013db6491856d5ea004017d060bec892c4a271fa
4
+ data.tar.gz: 10ee3a2cd730999d82bf904c24175e7d2a14a9fa120f12840131f705dda39a6a
5
5
  SHA512:
6
- metadata.gz: f2fafca0f648009a3fa035e311a90e180cee285e2b88fd7c71c8ac0916b105369bcea5f43d61fb7ec4510550828cc9f5d1c9534c70ced3549723b8e049abc95f
7
- data.tar.gz: bb06a8d50dae6bb682669d416fd8a5469654e531dd8f91e5f841a3a669ca67c399056bb846676ec62279ab9870d64758c585b5d22b30cd6a8399749b2ea8d111
6
+ metadata.gz: afb277f1e26cf4f8de413545c9c433dc6225f5f22ea87190d268aa1b109fb0e1bdc477c2fbc3acca75dee38f1ede75cd6f995d984c4006a960dedab0e22b5a2a
7
+ data.tar.gz: 4f2b8fc5fe38426fbe2f6c2ec214bad40bd8430302b095758529f9c07ac6be0cbd102509a119874a3eae529bae35e145e60025216eb46cbd7c7827ec8a75dc09
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-bitgo (2.6.5)
4
+ peatio-bitgo (2.6.6)
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.5)
16
- activesupport (= 5.2.4.5)
17
- activesupport (5.2.4.5)
15
+ activemodel (5.2.5)
16
+ activesupport (= 5.2.5)
17
+ activesupport (5.2.5)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 0.7, < 2)
20
20
  minitest (~> 5.1)
@@ -34,7 +34,7 @@ GEM
34
34
  clamp (1.3.2)
35
35
  coderay (1.1.3)
36
36
  concurrent-ruby (1.1.8)
37
- connection_pool (2.2.3)
37
+ connection_pool (2.2.5)
38
38
  cookiejar (0.3.3)
39
39
  crack (0.4.3)
40
40
  safe_yaml (~> 1.0.0)
@@ -71,7 +71,7 @@ GEM
71
71
  websocket-driver (>= 0.5.1)
72
72
  hashdiff (1.0.1)
73
73
  http_parser.rb (0.6.0)
74
- i18n (1.8.9)
74
+ i18n (1.8.10)
75
75
  concurrent-ruby (~> 1.0)
76
76
  jwt (2.2.2)
77
77
  memoist (0.16.2)
@@ -1,5 +1,5 @@
1
1
  module Peatio
2
2
  module Bitgo
3
- VERSION = "2.6.5".freeze
3
+ VERSION = "2.6.6".freeze
4
4
  end
5
5
  end
@@ -119,16 +119,21 @@ module Peatio
119
119
  raise Peatio::Wallet::ClientError, e
120
120
  end
121
121
 
122
- def trigger_webhook_event(event)
122
+ def trigger_webhook_event(request)
123
123
  currency = @wallet.fetch(:testnet).present? ? 't' + @currency.fetch(:id) : @currency.fetch(:id)
124
- return unless currency == event['coin'] && @wallet.fetch(:wallet_id) == event['wallet']
125
-
126
- if event['type'] == 'transfer'
127
- transactions = fetch_transfer!(event['transfer'])
128
- return { transfers: transactions }
129
- elsif event['type'] == 'address_confirmation'
130
- address_id = fetch_address_id(event['address'])
131
- return { address_id: address_id, currency_id: currency_id }
124
+ if request.params['type'] == 'transfer'
125
+ return unless currency == request.params['coin'] &&
126
+ @wallet.fetch(:wallet_id) == request.params['wallet']
127
+ else
128
+ return unless @wallet.fetch(:wallet_id) == request.params['walletId']
129
+ end
130
+
131
+ if request.params['type'] == 'transfer'
132
+ transactions = fetch_transfer!(request.params['transfer'])
133
+ return transactions
134
+ elsif request.params['type'] == 'address_confirmation'
135
+ address_id = fetch_address_id(request.params['address'])
136
+ return { address_id: address_id, address: request.params['address'], currency_id: currency_id }
132
137
  end
133
138
  end
134
139
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peatio-bitgo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.5
4
+ version: 2.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nadia Ch., Maksym N.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-16 00:00:00.000000000 Z
11
+ date: 2021-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.0.3
242
+ rubygems_version: 3.0.3.1
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: Gem for extending Peatio plugable system with Bitgo implementation.