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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 475f4256d5ef764ff5fa64350cc0493540d1d2ac
4
- data.tar.gz: ea44e83274d855689011a8a2e5195ec9ee1b6114
3
+ metadata.gz: cf8f7d12fa21c1ec6a442308e8cd63c156783d3e
4
+ data.tar.gz: 7588adf292d1fbb72565f859d42fb256134c9364
5
5
  SHA512:
6
- metadata.gz: 77b6168955f5003020add7016f54400d567e0865cc9b8cb0318a428655938ef964effd1e0c2b16276961e8561227e87336fc982c9cf9e545208a706f4a342595
7
- data.tar.gz: e0add242770dc851fab4453f47ed767a38afb8816635c7e5149f6217ca731776815ea0be2c6cfe961dd16be362943c21711218fed62694c0be106c32d95dc383
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
 
@@ -1,3 +1,3 @@
1
1
  module MercadoBitcoin
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mercado_bitcoin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Carvalho