mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
JS: Correctly route account events after change from account -> transaction.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user