mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-25 22:55:49 +00:00
events lib update
This commit is contained in:
committed by
Stefan Thomas
parent
2702ec906b
commit
69c5caa0c7
22
js/remote.js
22
js/remote.js
@@ -16,11 +16,11 @@
|
||||
|
||||
// Node
|
||||
var util = require('util');
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
|
||||
// npm
|
||||
var WebSocket = require('ws');
|
||||
|
||||
var EventEmitter = require('./events').EventEmitter;
|
||||
var Amount = require('./amount.js').Amount;
|
||||
var UInt160 = require('./amount.js').UInt160;
|
||||
|
||||
@@ -50,19 +50,6 @@ var Request = function (remote, command) {
|
||||
|
||||
Request.prototype = new EventEmitter;
|
||||
|
||||
// Return this. node EventEmitter's on doesn't return this.
|
||||
Request.prototype.on = function (e, c) {
|
||||
EventEmitter.prototype.on.call(this, e, c);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Request.prototype.once = function (e, c) {
|
||||
EventEmitter.prototype.once.call(this, e, c);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
// Send the request to a remote.
|
||||
Request.prototype.request = function (remote) {
|
||||
this.emit('request', remote);
|
||||
@@ -884,13 +871,6 @@ var Transaction = function (remote) {
|
||||
|
||||
Transaction.prototype = new EventEmitter;
|
||||
|
||||
// Return this. node EventEmitter's on doesn't return this.
|
||||
Transaction.prototype.on = function (e, c) {
|
||||
EventEmitter.prototype.on.call(this, e, c);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
Transaction.prototype.consts = {
|
||||
'telLOCAL_ERROR' : -399,
|
||||
'temMALFORMED' : -299,
|
||||
|
||||
Reference in New Issue
Block a user