cryptum 0.0.274 → 0.0.275

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: 456e40a2bee690096338d88ddc7add455131802b7b272d799ac626f8e616d6e3
4
- data.tar.gz: a7e8ab91160b716cdc4f210ec90682cb37114fa408b7e5885dfd8a5c29e9d8c3
3
+ metadata.gz: bfa0e97a03d33ebdf5f3b3cdf06bc5b80a6315380a25ee3bf472777387e05852
4
+ data.tar.gz: 7b677b783b0beb34c32f6dd48dc5198c807f5123b30ee741252f16e1f8905221
5
5
  SHA512:
6
- metadata.gz: a12cd5a525df52d7a401b862ad784a723526ab180330a43120a8db4707d97f7eff0bf01ea02d6b46945e0d5a0967d15196a16e99a837729da0e5a5fd056757a6
7
- data.tar.gz: c9ad2167536a5d44878d1b293d59da200ee6b7620da04d21a7ad8ae05275effd458a8a090a06d2823d12144bee86d0eff8ba300ba9601b0316b4638276d69fd4
6
+ metadata.gz: 8666c51fbc50b5910334fda2c8f0faacf8b636e647f671cf604d28a5b503de97e93708f7a3dae34729a28f4180ee2faf53f767a1bcfb9c98cd6343b0c003d02f
7
+ data.tar.gz: ab5539626474fc75d0a72eac9d9046697f1dfcdb356a6cd83b6cb1d895151483917624c791e36eadcf58e6a40f9da5ffdaaebad5536892b85149831fe54bb282
@@ -72,7 +72,7 @@ module Cryptum
72
72
  gross_tpm = bot_conf[:target_profit_margin_percent].to_f
73
73
 
74
74
  # Only retain past 24 hours of
75
- # order history meta for expired and sold
75
+ # order history meta for bought, sold, and expired
76
76
  # keep open limit sell orders indefintely
77
77
  before_twenty_four_hrs_ago = Time.now - 86400
78
78
  order_history = event_history.order_book[:order_history]
@@ -81,7 +81,7 @@ module Cryptum
81
81
  next unless ohm[:done_at]
82
82
  Time.parse(ohm[:done_at]) < before_twenty_four_hrs_ago &&
83
83
  (
84
- ohm[:color].to_sym == :black ||
84
+ ohm[:color].to_sym == :white ||
85
85
  ohm[:color].to_sym == :green ||
86
86
  ohm[:color].to_sym == :cyan ||
87
87
  ohm[:color].to_sym == :red
@@ -95,7 +95,7 @@ module Cryptum
95
95
  order_history.find do |oh|
96
96
  oh[:id] == ohm[:buy_order_id] ||
97
97
  oh[:id] == ohm[:sell_order_id] ||
98
- ohm[:color].to_sym == :black ||
98
+ ohm[:color].to_sym == :white ||
99
99
  ohm[:color].to_sym == :green
100
100
  end
101
101
  end
@@ -29,7 +29,7 @@ module Cryptum
29
29
  order_id = order_meta_data[:buy_order_id]
30
30
  when :green, :magenta, :yellow
31
31
  order_id = order_meta_data[:sell_order_id]
32
- when :black
32
+ when :white
33
33
  order_id = 'Expired'
34
34
  else
35
35
  order_id = 'N/A'
@@ -215,7 +215,7 @@ module Cryptum
215
215
  oh[:id] == meta[:buy_order_id]
216
216
  end
217
217
  meta[:done_at] = Time.now.strftime('%Y-%m-%d %H:%M:%S.%N%z')
218
- meta[:color] = :black
218
+ meta[:color] = :white
219
219
  end
220
220
  end
221
221
 
@@ -291,7 +291,7 @@ module Cryptum
291
291
 
292
292
  # Reinitiate GTFO if the previous GTFO Order Expires.
293
293
  terminal_win.key_press_event.key_g = true if meta[:color] == :magenta
294
- meta[:color] = :black
294
+ meta[:color] = :white
295
295
  end
296
296
  end
297
297
 
@@ -332,7 +332,7 @@ module Cryptum
332
332
 
333
333
  # Snag all expired orders
334
334
  oh_meta_expired_arr = order_history_meta.select do |ohm|
335
- ohm[:color].to_sym == :black && ohm.key?(:done_at)
335
+ ohm[:color].to_sym == :white && ohm.key?(:done_at)
336
336
  end
337
337
 
338
338
  # Snag all expired orders within past 24 hrs
@@ -322,10 +322,10 @@ module Cryptum
322
322
  )
323
323
  end
324
324
  else
325
- color = plan_color = :white
326
- color = indicator_status.market_trend[:color] if indicator_status.market_trend
327
- plan_color = :cyan if color == :red
328
- plan_color = :green if color == :green
325
+ market_trend_color = plan_color = :white
326
+ market_trend_color = indicator_status.market_trend[:color] if indicator_status.market_trend
327
+ plan_color = :cyan if market_trend_color == :red
328
+ plan_color = :green if market_trend_color == :green
329
329
 
330
330
  first_row = event_history.order_plan_index_offset
331
331
  last_row = first_row + event_history.order_plan_max_rows_to_display
data/lib/cryptum/ui.rb CHANGED
@@ -129,8 +129,12 @@ module Cryptum
129
129
 
130
130
  case color
131
131
  when :black
132
- color_id = 0
133
- color_fg = Curses::COLOR_BLACK
132
+ # It's more Gray than Black
133
+ # color_id = 0
134
+ # color_fg = Curses::COLOR_BLACK
135
+ color_id = 256
136
+ Curses.init_color(color_id, 0, 0, 500)
137
+ color_fg = color_id
134
138
  color_bg = bg
135
139
  when :red
136
140
  color_id = 1
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.274'
4
+ VERSION = '0.0.275'
5
5
  end
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.274
4
+ version: 0.0.275
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.