lib/cryptum/ui.rb in cryptum-0.0.421 vs lib/cryptum/ui.rb in cryptum-0.0.422
- old
+ new
@@ -16,17 +16,12 @@
require 'cryptum/ui/ticker'
# Initialize the UI
public_class_method def self.init(opts = {})
event_history = opts[:event_history]
- msg = ''
- if event_history.respond_to?('order_book')
- msg = "session: #{event_history.order_book[:path].split('/').first}, "
- msg += "symbol: #{event_history.order_book[:symbol]}"
- end
- msg += ' => Session Started.'
- Cryptum::Log.append(level: :info, msg: msg, which_self: self)
+ msg = 'Session Started.'
+ Cryptum::Log.append(level: :info, msg: msg, which_self: self, event_history: event_history)
# Initialize curses Screen
Curses.init_screen
# Ensure the cursor is invisible
@@ -55,10 +50,10 @@
# This object is used to pass all of the UI sections
# around to various Cryptum modules
Cryptum::UI::TerminalWindow.new
rescue Interrupt, StandardError => e
# Produce a Stacktrace for anything else
- Cryptum::Log.append(level: :error, msg: e, which_self: self)
+ Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history)
end
# Create New Curses Window
public_class_method def self.window(opts = {})
height = opts[:height].to_i