Fixed some concerns of eslint.

This commit is contained in:
Richard Moore 2018-07-17 16:09:06 -04:00
parent 960919d00a
commit 26f5a558d6
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

@ -619,9 +619,10 @@ export class Provider extends MinimalProvider {
case 'tx': { case 'tx': {
let hash = comps[1]; let hash = comps[1];
this.getTransactionReceipt(hash).then((receipt) => { this.getTransactionReceipt(hash).then((receipt) => {
if (!receipt || receipt.blockNumber == null) { return; } if (!receipt || receipt.blockNumber == null) { return null; }
this._emitted['t:' + hash] = receipt.blockNumber; this._emitted['t:' + hash] = receipt.blockNumber;
this.emit(hash, receipt); this.emit(hash, receipt);
return null;
}).catch((error: Error) => { this.emit('error', error); }); }).catch((error: Error) => { this.emit('error', error); });
break; break;
} }
@ -636,6 +637,7 @@ export class Provider extends MinimalProvider {
if (lastBalance && balance.eq(lastBalance)) { return; } if (lastBalance && balance.eq(lastBalance)) { return; }
this._balances[address] = balance; this._balances[address] = balance;
this.emit(address, balance); this.emit(address, balance);
return null;
}).catch((error: Error) => { this.emit('error', error); }); }).catch((error: Error) => { this.emit('error', error); });
break; break;
} }
@ -656,6 +658,7 @@ export class Provider extends MinimalProvider {
this._emitted['t:' + log.transactionHash] = log.blockNumber; this._emitted['t:' + log.transactionHash] = log.blockNumber;
this.emit(filter, log); this.emit(filter, log);
}); });
return null;
}).catch((error: Error) => { this.emit('error', error); }); }).catch((error: Error) => { this.emit('error', error); });
break; break;
} }