aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts1
-rw-r--r--test/subscription_test.ts10
2 files changed, 2 insertions, 9 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 4fd2b23a8..711d883ef 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -827,7 +827,6 @@ export class ExchangeWrapper extends ContractWrapper {
const ZRXtokenAddress = await exchangeInstance.ZRX_TOKEN_CONTRACT.callAsync();
return ZRXtokenAddress;
}
-
private async _invalidateContractInstancesAsync(): Promise<void> {
this.unsubscribeAll();
delete this._exchangeContractIfExists;
diff --git a/test/subscription_test.ts b/test/subscription_test.ts
index 9a2198e10..64e9acf0d 100644
--- a/test/subscription_test.ts
+++ b/test/subscription_test.ts
@@ -11,13 +11,8 @@ import {
ZeroEx,
ZeroExError,
Token,
- SubscriptionOpts,
- TokenEvents,
- ContractEvent,
- TransferContractEventArgs,
ApprovalContractEventArgs,
- TokenContractEventArgs,
- LogWithDecodedArgs,
+ TokenEvents,
LogEvent,
} from '../src';
import {BlockchainLifecycle} from './utils/blockchain_lifecycle';
@@ -51,7 +46,6 @@ describe('SubscriptionTest', () => {
afterEach(async () => {
await blockchainLifecycle.revertAsync();
});
-
describe('#subscribe', () => {
const indexFilterValues = {};
const shouldThrowOnInsufficientBalanceOrAllowance = true;
@@ -72,6 +66,7 @@ describe('SubscriptionTest', () => {
(async () => {
const callback = (err: Error, logEvent: LogEvent<ApprovalContractEventArgs>) => {
expect(err).to.not.be.undefined();
+ expect(err).to.not.be.null();
expect(logEvent).to.be.undefined();
done();
};
@@ -89,7 +84,6 @@ describe('SubscriptionTest', () => {
const callback = (err: Error, logEvent: LogEvent<ApprovalContractEventArgs>) => { };
zeroEx.token.subscribe(
tokenAddress, TokenEvents.Approval, indexFilterValues, callback);
- await zeroEx.token.setAllowanceAsync(tokenAddress, coinbase, addressWithoutFunds, allowanceAmount);
stubs = [
Sinon.stub((zeroEx as any)._web3Wrapper, 'getBlockAsync')
.throws("JSON RPC error")