cryptum 0.0.277 → 0.0.278

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: c354df9fefd484e816648d7da8b39ccca19a4847d598f432f326f8d8acad0009
4
- data.tar.gz: 6fd13b14adedf7d0dc2acce933b4b7cc2ea158763709394c714e52660995bdf0
3
+ metadata.gz: 60041b70d1546198473f4cfef476cd56635ffa6d0de8581a6f051c48e837b2ef
4
+ data.tar.gz: 3c89c5fd826431cc5ee95ce5368238875fb5be4df2de38cc5cd7a9dc4d7b6e85
5
5
  SHA512:
6
- metadata.gz: 71738c751bbcdc4f8a8fffa4c0a9b65161f978de27ec9c0f8804aade9617fdf8d418cb78606f0f2aff2df3a0bf43f101ae7ae96e0e214a4e3d864f2e19707978
7
- data.tar.gz: 68c037b9705a16f3850ac637031b34604215a0994b986520184fdcc5733f6e242bd295756e8752f075084b1233fa374a8aa24874dc75c4b68647f1e79159635c
6
+ metadata.gz: d412ba56bd5bc779f923c921007730d4733adbb43c9ff8d5b94093c79e6a7538760e26c4dc7af03d753b39daca070448754d8e059d7a211e2caa9629a129a877
7
+ data.tar.gz: 39395c647bb87925cd64d74143e04c3e7b252922f7e06517692596c2945cc20d418800628204eb1bffc25774cfbc98067eceb5d373a257f30ad957230acddf8c
@@ -74,9 +74,9 @@ module Cryptum
74
74
  # Only retain past 24 hours of
75
75
  # order history meta for bought, sold, and expired
76
76
  # keep open limit sell orders indefintely
77
- before_twenty_four_hrs_ago = Time.now - 86400
78
77
  order_history = event_history.order_book[:order_history]
79
78
  order_history_meta = event_history.order_book[:order_history_meta]
79
+ before_twenty_four_hrs_ago = Time.now - 86_400
80
80
  order_history_meta.delete_if do |ohm|
81
81
  next unless ohm[:done_at]
82
82
  Time.parse(ohm[:done_at]) < before_twenty_four_hrs_ago &&
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.277'
4
+ VERSION = '0.0.278'
5
5
  end
@@ -212,11 +212,12 @@ module Cryptum
212
212
  # Ready to Submit a BUY order
213
213
  event_history.order_ready = true
214
214
 
215
- # Reload Bot Conf (i.e. Risk Allocation)
215
+ # Reload Bot Conf (i.e. Risk Allocation),
216
+ # Recalculate Order Plan, and Write to File
216
217
  terminal_win.key_press_event.key_r = true
217
218
 
218
219
  # Write Order Book to Disk
219
- terminal_win.key_press_event.key_w = true
220
+ # terminal_win.key_press_event.key_w = true
220
221
  end
221
222
  end
222
223
 
@@ -227,11 +228,15 @@ module Cryptum
227
228
  event_history: event_history,
228
229
  bot_conf: bot_conf
229
230
  )
231
+
230
232
  # Reload Bot Conf (i.e. Risk Allocation)
233
+ # Recalculate Order Plan, and Write to File
231
234
  terminal_win.key_press_event.key_r = true
232
-
233
- # Write Order Book to Disk
234
- terminal_win.key_press_event.key_w = true
235
+ # IMPORTANT:
236
+ # Wait for Order Plan recalculation to occur
237
+ # once Cryptum::UI::OrderPlan is refreshed
238
+ # in Cryptum::Event _BEFORE_ writing the order
239
+ # book to file.
235
240
  end
236
241
  end
237
242
  rescue Faye::WebSocket::API::ErrorEvent,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cryptum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.277
4
+ version: 0.0.278
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.