mercado_bitcoin 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mercado_bitcoin/trade_api.rb +4 -3
- data/lib/mercado_bitcoin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8f7d12fa21c1ec6a442308e8cd63c156783d3e
|
4
|
+
data.tar.gz: 7588adf292d1fbb72565f859d42fb256134c9364
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4392debb609e0589fe0968ba39649032d618b241c3144c8d54780f7090eae7f1164b29a1f0f204ca2aaad4ae14b95a6673ea29e0b61c54dab7923e4d354b5c3
|
7
|
+
data.tar.gz: 02b6ea32d6b641f3dc3c795b11c0748cf775de6aa630e74cf1c7b685bb46ffd2530800d665b025cf179bafe87e53af68b2f04e0dc69cc6efc53c58b76227a91b
|
@@ -4,11 +4,12 @@ module MercadoBitcoin
|
|
4
4
|
class TradeApi
|
5
5
|
using QueryStringRefinement
|
6
6
|
|
7
|
-
attr_accessor :key, :code
|
7
|
+
attr_accessor :key, :code, :tonce_correction
|
8
8
|
|
9
|
-
def initialize(key:, code:)
|
9
|
+
def initialize(key:, code:, tonce_correction: 0)
|
10
10
|
@key = key
|
11
11
|
@code = code
|
12
|
+
@tonce_correction = tonce_correction
|
12
13
|
end
|
13
14
|
|
14
15
|
def get_info
|
@@ -73,7 +74,7 @@ module MercadoBitcoin
|
|
73
74
|
def base_params(method)
|
74
75
|
{
|
75
76
|
method: method,
|
76
|
-
tonce: Time.new.to_i + (ENV['TONCE_CORRECTION'].to_i
|
77
|
+
tonce: Time.new.to_i + (ENV['TONCE_CORRECTION'] || tonce_correction).to_i
|
77
78
|
}
|
78
79
|
end
|
79
80
|
|