JS: Factored server-related logic out into separate Server class.

This commit is contained in:
Stefan Thomas
2013-02-19 17:33:36 +01:00
parent 9a7a710334
commit decd020c59
3 changed files with 353 additions and 265 deletions

View File

@@ -52,12 +52,8 @@ var Account = function (remote, account) {
}
});
this._remote.on('connect', function () {
if (self._subs) {
self._remote.request_subscribe()
.accounts(self._account_id)
.request();
}
this._remote.on('prepare_subscribe', function (request) {
if (self._subs) request.accounts(self._account_id);
});
this.on('transaction', function (msg) {