JS: Orderbook: Get current state when subscribing.

This commit is contained in:
Stefan Thomas
2013-03-11 09:28:37 +01:00
parent 99c2f44cfa
commit b31c2ea601
2 changed files with 5 additions and 3 deletions

View File

@@ -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;