-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pipes - Sairagul - AdaTrader #45
base: master
Are you sure you want to change the base?
Conversation
Ada TraderWhat We're Looking For
|
// console.log('target price should be higher than current price'); | ||
// Do validation on the order | ||
//orders.append(order); | ||
this.bus.trigger('newOrder', order); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a little round-about to trigger an event on the bus here. Might be cleaner for the OrderFormView
to know about the OrderList
, and to add the new orders directly.
initialize(params){ | ||
this.template = params.template; | ||
this.bus = params.bus; | ||
this.quotesList = params.quotesList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that the OrderFormView
knows about the QuoteList
so it can associate the quote with a new order.
else{ | ||
if(this.model.sellIt()){ | ||
if(this.model.sellIt()){ | ||
this.model.destroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have the same condition here twice! I suspect this is why sell orders don't clear themselves.
Ada Trader
Congratulations! You're submitting your assignment!
Comprehension Questions