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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/peatio/bitgo/version.rb +1 -1
- data/lib/peatio/bitgo/wallet.rb +6 -2
- 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: af28c5fe41488709946c6b6605b89cc57685edc7dcdf27031eb452b81dbf3bb1
|
4
|
+
data.tar.gz: 566d20452432523045c9e16eedf0b02db1e724ac52dcbe8cace1348bc067c38b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2fafca0f648009a3fa035e311a90e180cee285e2b88fd7c71c8ac0916b105369bcea5f43d61fb7ec4510550828cc9f5d1c9534c70ced3549723b8e049abc95f
|
7
|
+
data.tar.gz: bb06a8d50dae6bb682669d416fd8a5469654e531dd8f91e5f841a3a669ca67c399056bb846676ec62279ab9870d64758c585b5d22b30cd6a8399749b2ea8d111
|
data/Gemfile.lock
CHANGED
data/lib/peatio/bitgo/version.rb
CHANGED
data/lib/peatio/bitgo/wallet.rb
CHANGED
@@ -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:
|
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
|
+
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-
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|