From 042dc3d1cec99b0f15a6f7b3466ad8d1311401d1 Mon Sep 17 00:00:00 2001 From: Stefan Thomas Date: Wed, 6 Mar 2013 16:45:20 +0100 Subject: [PATCH] JS: Correctly route account events after change from account -> transaction. --- src/js/remote.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/js/remote.js b/src/js/remote.js index c241a8b3..e0906e7d 100644 --- a/src/js/remote.js +++ b/src/js/remote.js @@ -617,9 +617,14 @@ Remote.prototype._connect_message = function (ws, json) { this.emit('ledger_closed', message); 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. - 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 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); break;