peatio-bitgo 2.6.4 → 2.6.5

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: d1515fca85406f5b59cb6e89eab685278a2f5c44a858579de915805f93fecc07
4
- data.tar.gz: f92854ebb36d43f171781c8ec38b514083d017281973c3cead917050821e9433
3
+ metadata.gz: af28c5fe41488709946c6b6605b89cc57685edc7dcdf27031eb452b81dbf3bb1
4
+ data.tar.gz: 566d20452432523045c9e16eedf0b02db1e724ac52dcbe8cace1348bc067c38b
5
5
  SHA512:
6
- metadata.gz: f886bc0ae67b72687683cf64fd09931d186394d8b041ba8f6fbdd7dcf63ae536eeafaaf34684f4b798ad848d3135e35ea3285e8a2a9eedbfa62c07dc40d9519d
7
- data.tar.gz: e9d6a6f7687e031b8ee59ff2b8d9a4dc3461af768fc5752ee39753944cf564d3a980657182f1098799d15e8e9ae0d48dd790d32d1b89d876877112681d3a75b5
6
+ metadata.gz: f2fafca0f648009a3fa035e311a90e180cee285e2b88fd7c71c8ac0916b105369bcea5f43d61fb7ec4510550828cc9f5d1c9534c70ced3549723b8e049abc95f
7
+ data.tar.gz: bb06a8d50dae6bb682669d416fd8a5469654e531dd8f91e5f841a3a669ca67c399056bb846676ec62279ab9870d64758c585b5d22b30cd6a8399749b2ea8d111
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- peatio-bitgo (2.6.4)
4
+ peatio-bitgo (2.6.5)
5
5
  activesupport (~> 5.2.3)
6
6
  better-faraday (~> 1.0.5)
7
7
  faraday (~> 0.17)
@@ -1,5 +1,5 @@
1
1
  module Peatio
2
2
  module Bitgo
3
- VERSION = "2.6.4".freeze
3
+ VERSION = "2.6.5".freeze
4
4
  end
5
5
  end
@@ -146,7 +146,6 @@ module Peatio
146
146
  end
147
147
 
148
148
  def fetch_transfer!(id)
149
- # TODO: Add Rspecs for this one
150
149
  response = client.rest_api(:get, "#{currency_id}/wallet/#{wallet_id}/transfer/#{id}")
151
150
  parse_entries(response['entries']).map do |entry|
152
151
  to_address = if response.dig('coinSpecific', 'memo').present?
@@ -158,13 +157,18 @@ module Peatio
158
157
  end
159
158
  state = define_transaction_state(response['state'])
160
159
 
160
+ if response['outputs'].present?
161
+ output = response['outputs'].find { |out| out['address'] == to_address }
162
+ txout = output['index'] if output.present?
163
+ end
164
+
161
165
  transaction = Peatio::Transaction.new(
162
166
  currency_id: @currency.fetch(:id),
163
167
  amount: convert_from_base_unit(entry['valueString']),
164
168
  hash: normalize_txid(response['txid']),
165
169
  to_address: to_address,
166
170
  block_number: response['height'],
167
- txout: response['index'].to_i,
171
+ txout: txout.to_i,
168
172
  status: state
169
173
  )
170
174
 
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.4
4
+ version: 2.6.5
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-15 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport