mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 05:05:48 +00:00
BREAKING CHANGE: Change error event format and fix crash due to error event on websocket
This commit is contained in:
@@ -85,8 +85,8 @@ class RippleAPI extends EventEmitter {
|
||||
this.connection.on('ledgerClosed', message => {
|
||||
this.emit('ledger', server.formatLedgerClose(message));
|
||||
});
|
||||
this.connection.on('error', (type, info) => {
|
||||
this.emit('error', type, info);
|
||||
this.connection.on('error', (errorCode, errorMessage, data) => {
|
||||
this.emit('error', errorCode, errorMessage, data);
|
||||
});
|
||||
} else {
|
||||
// use null object pattern to provide better error message if user
|
||||
|
||||
Reference in New Issue
Block a user