mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +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);
|
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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user