diff --git a/web/app/assets/locales/locale-en.js b/web/app/assets/locales/locale-en.js
index e1a76acec..2ca93ee4f 100644
--- a/web/app/assets/locales/locale-en.js
+++ b/web/app/assets/locales/locale-en.js
@@ -646,8 +646,8 @@
market: "Market",
price_history: "Price Chart",
order_depth: "Market Depth",
- history: "All History",
- my_history: "My History",
+ history: "Market trades",
+ my_history: "My trades",
balance: "Balance",
lowest_ask: "Lowest ask",
highest_bid: "Highest bid",
@@ -690,7 +690,7 @@
index: "Index",
my_bids: "My bids",
my_asks: "My asks",
- my_orders: "My orders",
+ my_orders: "My open orders",
settle_orders: "Settle orders",
asks: "Sell orders",
bids: "Buy orders",
diff --git a/web/app/components/Exchange/Exchange.jsx b/web/app/components/Exchange/Exchange.jsx
index 0a721ad1c..a1e424c7c 100644
--- a/web/app/components/Exchange/Exchange.jsx
+++ b/web/app/components/Exchange/Exchange.jsx
@@ -658,9 +658,11 @@ class Exchange extends React.Component {
return ((satAmount / price.quote.amount) * price.base.amount) / totalPrecision;
}
- getBuyAmount(price, total = 0) {
+ getBuyAmount(price, total = 0, satAmount) {
let amountPrecision = utils.get_asset_precision(this.props.quoteAsset.get("precision"));
- let satAmount = utils.get_satoshi_amount(total, this.props.baseAsset);
+ if (!satAmount) {
+ satAmount = utils.get_satoshi_amount(total, this.props.baseAsset);
+ }
return ((satAmount / price.quote.amount) * price.base.amount) / amountPrecision;
}
@@ -739,27 +741,41 @@ class Exchange extends React.Component {
if (type === "bid") {
let displaySellPrice = this._getDisplayPrice("ask", order.sell_price);
- let sellAmount = this.getSellAmount(order.sell_price, null, order.for_sale);
+ let sellAmount = market_utils.limitByPrecision(this.getSellAmount(order.sell_price, null, order.totalForSale), quote);
this.setState({
displaySellPrice: displaySellPrice,
sellPrice: order.sell_price,
- sellAmount: value,
- sellTotal: utils.get_asset_amount(order.for_sale, base)
+ sellAmount: sellAmount,
+ sellTotal: utils.get_asset_amount(order.totalForSale, base),
+ displayBuyPrice: displaySellPrice,
+ buyPrice: {
+ quote: order.sell_price.base,
+ base: order.sell_price.quote
+ },
+ buyAmount: null,
+ buyTotal: null
});
} else if (type === "ask") {
let displayBuyPrice = this._getDisplayPrice("bid", order.sell_price);
-
// Calculate total
- let total = this.getBuyTotal(order.sell_price, null, order.for_sale);
+ // let total = this.getBuyTotal(order.sell_price, null, order.totalForSale);
+ let buyAmount = market_utils.limitByPrecision(this.getBuyAmount(order.sell_price, null, order.totalValue), quote);
this.setState({
displayBuyPrice: displayBuyPrice,
buyPrice: order.sell_price,
- buyAmount: utils.get_asset_amount(order.for_sale, quote),
- buyTotal: market_utils.limitByPrecision(total, base)
+ buyAmount: buyAmount,
+ buyTotal: utils.get_asset_amount(order.totalValue, base),
+ displaySellPrice: displayBuyPrice,
+ sellPrice: {
+ quote: order.sell_price.base,
+ base: order.sell_price.quote
+ },
+ sellAmount: null,
+ sellTotal: null
});
}
}
diff --git a/web/app/components/Exchange/MyOpenOrders.jsx b/web/app/components/Exchange/MyOpenOrders.jsx
index f92bbb975..1174eb6fb 100644
--- a/web/app/components/Exchange/MyOpenOrders.jsx
+++ b/web/app/components/Exchange/MyOpenOrders.jsx
@@ -126,7 +126,8 @@ class MyOpenOrders extends React.Component {
return b_price.full - a_price.full;
}).map((order, index) => {
- return