mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
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.
This commit is contained in:
@@ -137,9 +137,9 @@ OrderBook.prototype.is_valid = function () {
|
|||||||
|
|
||||||
OrderBook.prototype.trade = function(type) {
|
OrderBook.prototype.trade = function(type) {
|
||||||
var tradeStr = '0'
|
var tradeStr = '0'
|
||||||
+ (this['_currency_' + type] === 'XRP') ? '' : '/'
|
+ ((this['_currency_' + type] === 'XRP') ? '' : '/'
|
||||||
+ this['_currency_' + type ] + '/'
|
+ this['_currency_' + type ] + '/'
|
||||||
+ this['_issuer_' + type];
|
+ this['_issuer_' + type]);
|
||||||
return Amount.from_json(tradeStr);
|
return Amount.from_json(tradeStr);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user