From f077624212d9f84aa5b974bf2255c39fe4165780 Mon Sep 17 00:00:00 2001 From: Manish Jethani Date: Sat, 5 Oct 2013 07:16:29 +0530 Subject: [PATCH] Fixed issue with parsing of trade price. The + operator has higher precedence, which causes the price to be read as '' (empty string) no matter what the currency and issuer. I believe this will fix the "Last price = n/a" error in the default client as well. --- src/js/ripple/orderbook.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/ripple/orderbook.js b/src/js/ripple/orderbook.js index faf02018..d4f51d86 100644 --- a/src/js/ripple/orderbook.js +++ b/src/js/ripple/orderbook.js @@ -137,9 +137,9 @@ OrderBook.prototype.is_valid = function () { OrderBook.prototype.trade = function(type) { var tradeStr = '0' - + (this['_currency_' + type] === 'XRP') ? '' : '/' + + ((this['_currency_' + type] === 'XRP') ? '' : '/' + this['_currency_' + type ] + '/' - + this['_issuer_' + type]; + + this['_issuer_' + type]); return Amount.from_json(tradeStr); };