cryptum 0.0.294 → 0.0.296

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: f629d24751b5fa2622ffcb11732b731ca75feeb49001b67e9e42186e37763377
4
- data.tar.gz: 8328582ccc4d97cc972ed38cecdd1cf69695ab09f71e4dff71b50112e828913b
3
+ metadata.gz: bf9e8ff5a30bf0d5fec67e64e7e4129a6a27d243161f04b7ff0b6b08bbcb4461
4
+ data.tar.gz: bae6f468bb256f068bd7287f0e614776acf24bbf36543a103dba9be858b2b3ac
5
5
  SHA512:
6
- metadata.gz: 40b6f5ebf63bb13381edaa32d4a1f0cd8e514957622054036dd7d74b898f35dfa1c303cd2810da42453c16b3c91d6a607c11962e3e71d236585d62add0851669
7
- data.tar.gz: 140bbcdd5da959c5863be312ce85dd0bb1936cbddb35fd74ed47431a05ba39d828f36e05987e1fe54e38884e35aa1096e85a114afc72fc76970979d394a9fe9f
6
+ metadata.gz: 96c0366773165cc0d799e08976e3af8a9c734e6cef220dbae4ec13268102c78a5aebd0c4aafc54a1f007380c566997a08be47faa23a186acc9ad19f41e4806af
7
+ data.tar.gz: 421f86639fa6d674ba652f6ef3abc69518a5c0218ab6c57e1e4fc0a700a4f946e42c3ab3f9bd3cd5d569d73324eb3dc9977ee75ab0360960d3821e6dceec31cf
data/Gemfile CHANGED
@@ -25,7 +25,7 @@ gem 'rdoc', '6.5.0'
25
25
  gem 'require_all', '3.0.0'
26
26
  gem 'rest-client', '2.1.0'
27
27
  gem 'rspec', '3.12.0'
28
- gem 'rubocop', '1.39.0'
28
+ gem 'rubocop', '1.40.0'
29
29
  gem 'rubocop-rake', '0.6.0'
30
30
  gem 'rubocop-rspec', '2.15.0'
31
31
  gem 'ruby-prof', '1.4.3'
data/lib/cryptum/event.rb CHANGED
@@ -38,7 +38,7 @@ module Cryptum
38
38
  fiat_portfolio_file = "#{option_choice.repo_root}/order_books/#{fiat}_PORTFOLIO.json"
39
39
 
40
40
  # Determine if Summary UI needs updated data
41
- Cryptum::Portfolio::Balance.refresh(
41
+ event_history = Cryptum::Portfolio::Balance.refresh(
42
42
  env: env,
43
43
  option_choice: option_choice,
44
44
  terminal_win: terminal_win,
@@ -53,7 +53,7 @@ module Cryptum
53
53
  terminal_win.market_trend_ui_resize = true
54
54
  end
55
55
 
56
- Cryptum::UI::Portfolio.refresh(
56
+ event_history = Cryptum::UI::Portfolio.refresh(
57
57
  option_choice: option_choice,
58
58
  portfolio_win: terminal_win.portfolio_section,
59
59
  event_history: event_history,
@@ -91,7 +91,7 @@ module Cryptum
91
91
 
92
92
  market_trend_event = event_history.market_trend_event = event_history.event if event_history.event_type == :l2update
93
93
  market_trend_event = event_history.market_trend_event if terminal_win.market_trend_ui_resize
94
- Cryptum::UI::MarketTrend.refresh(
94
+ event_history = Cryptum::UI::MarketTrend.refresh(
95
95
  option_choice: option_choice,
96
96
  market_trend_win: terminal_win.market_trend_section,
97
97
  event_history: event_history,
@@ -113,7 +113,7 @@ module Cryptum
113
113
  )
114
114
 
115
115
  unless event_history.order_plan_details_win_active
116
- Cryptum::UI::OrderPlan.refresh(
116
+ event_history = Cryptum::UI::OrderPlan.refresh(
117
117
  option_choice: option_choice,
118
118
  order_plan_win: terminal_win.order_plan_section,
119
119
  env: env,
@@ -130,7 +130,7 @@ module Cryptum
130
130
  end
131
131
 
132
132
  if event_history.order_plan_details_win_active
133
- Cryptum::UI::OrderPlanDetails.refresh(
133
+ event_history = Cryptum::UI::OrderPlanDetails.refresh(
134
134
  option_choice: option_choice,
135
135
  order_plan_details_win: terminal_win.order_plan_details_section,
136
136
  event_history: event_history,
@@ -152,7 +152,7 @@ module Cryptum
152
152
  end
153
153
 
154
154
  if event_history.order_execute_details_win_active
155
- Cryptum::UI::OrderExecuteDetails.refresh(
155
+ event_history = Cryptum::UI::OrderExecuteDetails.refresh(
156
156
  option_choice: option_choice,
157
157
  order_execute_details_win: terminal_win.order_execute_details_section,
158
158
  event_history: event_history,
@@ -90,6 +90,8 @@ module Cryptum
90
90
  )
91
91
 
92
92
  market_trend_win.refresh
93
+
94
+ event_history
93
95
  rescue Interrupt
94
96
  # Exit Gracefully if CTRL+C is Pressed During Session
95
97
  Cryptum.exit_gracefully(which_self: self)
@@ -290,6 +290,8 @@ module Cryptum
290
290
  )
291
291
 
292
292
  order_execute_details_win.refresh
293
+
294
+ event_history
293
295
  rescue Interrupt
294
296
  # Exit Gracefully if CTRL+C is Pressed During Session
295
297
  Cryptum.exit_gracefully(which_self: self)
@@ -414,8 +414,8 @@ module Cryptum
414
414
  # ROWS 3-10
415
415
  first_row = event_history.order_execute_index_offset
416
416
  last_row = first_row + event_history.order_execute_max_rows_to_display
417
+ last_row = first_row if last_row < first_row
417
418
  if last_row >= order_history_meta.length
418
- last_row = order_history_meta.length - 1
419
419
  first_row = last_row - event_history.order_execute_max_rows_to_display
420
420
  event_history.order_execute_index_offset = first_row
421
421
  end
@@ -22,7 +22,7 @@ module Cryptum
22
22
  fiat_portfolio_file = opts[:fiat_portfolio_file]
23
23
 
24
24
  ticker_price = event_history.order_book[:ticker_price].to_f
25
- return unless ticker_price.positive?
25
+ return event_history unless ticker_price.positive?
26
26
 
27
27
  market_trend_color = plan_color = :white
28
28
 
@@ -435,6 +435,8 @@ module Cryptum
435
435
  )
436
436
 
437
437
  order_plan_win.refresh
438
+
439
+ event_history
438
440
  rescue Interrupt
439
441
  # Exit Gracefully if CTRL+C is Pressed During Session
440
442
  Cryptum.exit_gracefully(which_self: self)
@@ -215,6 +215,8 @@ module Cryptum
215
215
  )
216
216
 
217
217
  order_plan_details_win.refresh
218
+
219
+ event_history
218
220
  rescue Interrupt
219
221
  # Exit Gracefully if CTRL+C is Pressed During Session
220
222
  Cryptum.exit_gracefully(which_self: self)
@@ -204,6 +204,8 @@ module Cryptum
204
204
  )
205
205
 
206
206
  portfolio_win.refresh
207
+
208
+ event_history
207
209
  rescue Interrupt
208
210
  # Exit Gracefully if CTRL+C is Pressed During Session
209
211
  Cryptum.exit_gracefully(which_self: self)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cryptum
4
- VERSION = '0.0.294'
4
+ VERSION = '0.0.296'
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.294
4
+ version: 0.0.296
5
5
  platform: ruby
6
6
  authors:
7
7
  - 0day Inc.
@@ -212,14 +212,14 @@ dependencies:
212
212
  requirements:
213
213
  - - '='
214
214
  - !ruby/object:Gem::Version
215
- version: 1.39.0
215
+ version: 1.40.0
216
216
  type: :runtime
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - '='
221
221
  - !ruby/object:Gem::Version
222
- version: 1.39.0
222
+ version: 1.40.0
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: rubocop-rake
225
225
  requirement: !ruby/object:Gem::Requirement