[FIX] force hex for orderbook requests

interest bearing currencies would be sent down malformed `XAU (0.5%pa)` when rippled would be expecting either hex or iso
This commit is contained in:
Geert Weening
2014-06-23 14:49:48 -07:00
parent 71d8b6c9bf
commit ddf7ca78ee
2 changed files with 3 additions and 3 deletions

View File

@@ -1436,7 +1436,7 @@ Remote.prototype.requestBookOffers = function(gets, pays, taker, callback) {
var request = new Request(this, 'book_offers');
request.message.taker_gets = {
currency: Currency.json_rewrite(gets.currency)
currency: Currency.json_rewrite(gets.currency, {force_hex:true})
};
if (request.message.taker_gets.currency !== 'XRP') {
@@ -1444,7 +1444,7 @@ Remote.prototype.requestBookOffers = function(gets, pays, taker, callback) {
}
request.message.taker_pays = {
currency: Currency.json_rewrite(pays.currency)
currency: Currency.json_rewrite(pays.currency, {force_hex:true})
};
if (request.message.taker_pays.currency !== 'XRP') {

View File

@@ -340,7 +340,7 @@ Request.prototype.addBook = function(book, snapshot) {
}
var obj = json[side] = {
currency: Currency.json_rewrite(book[side].currency)
currency: Currency.json_rewrite(book[side].currency, {force_hex: true})
};
if (obj.currency !== 'XRP') {