cryptum 0.0.295 → 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: 2b8a973520cc84bc4c4b0863483876ebb7ef56c57074a689c39274e307d80901
4
- data.tar.gz: 61a524bfd3fbd7c6c30e947ef39d51d9c5ac651233bb4283c007df39e740351d
3
+ metadata.gz: bf9e8ff5a30bf0d5fec67e64e7e4129a6a27d243161f04b7ff0b6b08bbcb4461
4
+ data.tar.gz: bae6f468bb256f068bd7287f0e614776acf24bbf36543a103dba9be858b2b3ac
5
5
  SHA512:
6
- metadata.gz: 8edfe820abd1bb769bc3497e23d199bd3e989e82bd0d67b281c547a1da8dd2acb8d7f349825fa183b91c8714f60257f5054731e4e02c65bfbc418b533d90e189
7
- data.tar.gz: 26c845aa5fa48831c6a53c43b391212b6dcdcd87f4f8583d05a51bbfb823e8d7970f8b560eee7d93834efd98f9382d6ebe4e525d22bda441d65fbc2cc836cb98
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,
@@ -139,7 +139,7 @@ module Cryptum
139
139
  end
140
140
 
141
141
  unless event_history.order_execute_details_win_active
142
- Cryptum::UI::OrderExecution.refresh(
142
+ event_history = Cryptum::UI::OrderExecution.refresh(
143
143
  option_choice: option_choice,
144
144
  order_execute_win: terminal_win.order_execute_section,
145
145
  env: env,
@@ -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
@@ -521,6 +521,8 @@ module Cryptum
521
521
 
522
522
  # Reset Order Ready Boolean
523
523
  event_history.order_ready = false
524
+
525
+ event_history
524
526
  rescue Interrupt
525
527
  # Exit Gracefully if CTRL+C is Pressed During Session
526
528
  Cryptum.exit_gracefully(which_self: self)
@@ -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.295'
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.295
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