JS: Correctly route account events after change from account -> transaction.

This commit is contained in:
Stefan Thomas
2013-03-06 16:45:20 +01:00
parent f9a34f8404
commit 042dc3d1ce

View File

@@ -617,9 +617,14 @@ Remote.prototype._connect_message = function (ws, json) {
this.emit('ledger_closed', message); this.emit('ledger_closed', message);
break; break;
case 'account': case 'transaction':
// To get these events, just subscribe to them. A subscribes and
// unsubscribes will be added as needed.
// XXX If not trusted, need proof. // XXX If not trusted, need proof.
if (this.trace) utils.logObject("remote: account: %s", message);
// XXX Should de-duplicate transaction events
if (this.trace) utils.logObject("remote: tx: %s", message);
// Process metadata // Process metadata
message.mmeta = new Meta(message.meta); message.mmeta = new Meta(message.meta);
@@ -637,14 +642,6 @@ Remote.prototype._connect_message = function (ws, json) {
} }
} }
this.emit('account', message);
break;
case 'transaction':
// To get these events, just subscribe to them. A subscribes and
// unsubscribes will be added as needed.
// XXX If not trusted, need proof.
this.emit('transaction', message); this.emit('transaction', message);
break; break;