mirror of
https://github.com/Xahau/xahau.js.git
synced 2026-08-23 08:30:51 +00:00
[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:
@@ -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') {
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user