mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
JS: Orderbook: Get current state when subscribing.
This commit is contained in:
@@ -203,7 +203,7 @@ Request.prototype.rt_accounts = function (accounts) {
|
||||
return this.accounts(accounts, true);
|
||||
};
|
||||
|
||||
Request.prototype.books = function (books) {
|
||||
Request.prototype.books = function (books, state) {
|
||||
var procBooks = [];
|
||||
|
||||
for (var i = 0, l = books.length; i < l; i++) {
|
||||
@@ -221,6 +221,8 @@ Request.prototype.books = function (books) {
|
||||
json["IssuerIn"] = UInt160.json_rewrite(book["IssuerIn"]);
|
||||
}
|
||||
|
||||
if (state || book["StateNow"]) json["StateNow"] = true;
|
||||
|
||||
procBooks.push(json);
|
||||
}
|
||||
this.message.books = procBooks;
|
||||
|
||||
Reference in New Issue
Block a user