diff --git a/frontend/src/components/BookPage.js b/frontend/src/components/BookPage.js index eac6186f..4331abbe 100644 --- a/frontend/src/components/BookPage.js +++ b/frontend/src/components/BookPage.js @@ -49,7 +49,7 @@ class BookPage extends Component { handleCurrencyChange=(e)=>{ var currency = e.target.value; this.props.setAppState({ - bookCurrency: currency, + currency: currency, bookCurrencyCode: this.getCurrencyCode(currency), }) } @@ -85,8 +85,8 @@ class BookPage extends Component {
order.type == this.props.bookType || this.props.bookType == 2) - .filter(order => order.currency == this.props.bookCurrency || this.props.bookCurrency == 0) + this.props.bookOrders.filter(order => order.type == this.props.type || this.props.type == 2) + .filter(order => order.currency == this.props.currency || this.props.currency == 0) .map((order) => ({id: order.id, avatar: window.location.origin +'/static/assets/avatars/' + order.maker_nick + '.png', @@ -186,8 +186,8 @@ class BookPage extends Component { order.type == this.props.bookType || this.props.bookType == 2) - .filter(order => order.currency == this.props.bookCurrency || this.props.bookCurrency == 0) + this.props.bookOrders.filter(order => order.type == this.props.type || this.props.type == 2) + .filter(order => order.currency == this.props.currency || this.props.currency == 0) .map((order) => ({id: order.id, avatar: window.location.origin +'/static/assets/avatars/' + order.maker_nick + '.png', @@ -294,7 +294,7 @@ class BookPage extends Component { } else if (sellChecked) { var type = 0 } - this.props.setAppState({bookType: type}) + this.props.setAppState({type: type}) } handleClickBuy=(e)=>{ @@ -316,7 +316,7 @@ class BookPage extends Component { - {this.props.bookType == 0 ? + {this.props.type == 0 ? t("No orders found to sell BTC for {{currencyCode}}",{currencyCode:this.props.bookCurrencyCode}) : t("No orders found to buy BTC for {{currencyCode}}",{currencyCode:this.props.bookCurrencyCode}) @@ -328,7 +328,7 @@ class BookPage extends Component { - {t("Be the first one to create an order")} + {t("Be the first one to create an order")}

@@ -389,14 +389,14 @@ class BookPage extends Component { - {this.props.bookType == 0 ? t("and receive") : (this.props.bookType == 1 ? t("and pay with") : t("and use") )} + {this.props.type == 0 ? t("and receive") : (this.props.type == 1 ? t("and pay with") : t("and use") )}