From c8c95b4bd2e57be11bd250c652babbad9d6ffd35 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:09:23 -0600 Subject: Add postFormatter for logs --- packages/0x.js/src/web3_wrapper.ts | 34 ++++++++++++++++++++++++++++--- packages/0x.js/test/token_wrapper_test.ts | 2 ++ 2 files changed, 33 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/src/web3_wrapper.ts b/packages/0x.js/src/web3_wrapper.ts index c937f9288..af96c7650 100644 --- a/packages/0x.js/src/web3_wrapper.ts +++ b/packages/0x.js/src/web3_wrapper.ts @@ -5,6 +5,17 @@ import promisify = require('es6-promisify'); import {ZeroExError, Artifact, TransactionReceipt} from './types'; import {Contract} from './contract'; +interface RawLogEntry { + logIndex: string|null; + transactionIndex: string|null; + transactionHash: string; + blockHash: string|null; + blockNumber: string|null; + address: string; + data: string; + topics: string[]; +} + export class Web3Wrapper { private web3: Web3; private defaults: Partial; @@ -137,8 +148,9 @@ export class Web3Wrapper { method: 'eth_getLogs', params: [serializedFilter], }; - const logs = await this.sendRawPayloadAsync(payload); - return logs; + const rawLogs = await this.sendRawPayloadAsync(payload); + const formattedLogs = _.map(rawLogs, this.formatLog.bind(this)); + return formattedLogs; } private getContractInstance(abi: Web3.ContractAbi, address: string): A { const web3ContractInstance = this.web3.eth.contract(abi).at(address); @@ -149,7 +161,7 @@ export class Web3Wrapper { const networkId = await promisify(this.web3.version.getNetwork)(); return networkId; } - private async sendRawPayloadAsync(payload: Web3.JSONRPCRequestPayload): Promise { + private async sendRawPayloadAsync(payload: Web3.JSONRPCRequestPayload): Promise { const sendAsync = this.web3.currentProvider.sendAsync.bind(this.web3.currentProvider); const response = await promisify(sendAsync)(payload); const result = response.result; @@ -169,4 +181,20 @@ export class Web3Wrapper { return status; } } + private formatLog(rawLog: RawLogEntry): Web3.LogEntry { + const formattedLog = { + ...rawLog, + logIndex: this.toDecimal(rawLog.logIndex), + blockNumber: this.toDecimal(rawLog.blockNumber), + transactionIndex: this.toDecimal(rawLog.transactionIndex), + }; + return formattedLog; + } + private toDecimal(hex: string|null): number|null { + if (_.isNull(hex)) { + return null; + } + const decimal = this.web3.toDecimal(hex); + return decimal; + } } diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index b30762e8c..07276877d 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -361,6 +361,8 @@ describe('TokenWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { expect(logEvent).to.not.be.undefined(); + expect(logEvent.logIndex).to.be.equal(0); + expect(logEvent.transactionIndex).to.be.equal(0); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); -- cgit v1.2.3 From 173a707a2e1f5667500e1a8ea6eb1a775a584291 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:15:05 -0600 Subject: Add PR numbers --- packages/0x.js/CHANGELOG.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 6245308c3..26e5f528b 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -2,18 +2,19 @@ vx.x.x ------------------------ - * Remove support for Async callback types when used in Subscribe functions + * Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers (#231) + * Remove support for Async callback types when used in Subscribe functions (#222) * In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different (#225) v0.25.1 - _November 13, 2017_ ------------------------ - * Standardise on Cancelled over Canceled - * Add missing `DecodedLogEvent` type to exported types - * Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction. + * Standardise on Cancelled over Canceled (#217) + * Add missing `DecodedLogEvent` type to exported types (#205) + * Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction. (#200) v0.23.0 - _November 12, 2017_ ------------------------ - * Fixed unhandled promise rejection error in subscribe methods (#209) + * Fixed unhandled promise rejection error in subscribe methods (#209) * Subscribe callbacks now receive an error object as their first argument v0.22.6 - _November 10, 2017_ -- cgit v1.2.3 From 8d6ba6ee7a73cdc00e089f0c493864cd02e5a833 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:16:55 -0600 Subject: Rename toDecimal to hexToDecimal --- packages/0x.js/src/web3_wrapper.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/src/web3_wrapper.ts b/packages/0x.js/src/web3_wrapper.ts index af96c7650..f6b6ca09a 100644 --- a/packages/0x.js/src/web3_wrapper.ts +++ b/packages/0x.js/src/web3_wrapper.ts @@ -184,13 +184,13 @@ export class Web3Wrapper { private formatLog(rawLog: RawLogEntry): Web3.LogEntry { const formattedLog = { ...rawLog, - logIndex: this.toDecimal(rawLog.logIndex), - blockNumber: this.toDecimal(rawLog.blockNumber), - transactionIndex: this.toDecimal(rawLog.transactionIndex), + logIndex: this.hexToDecimal(rawLog.logIndex), + blockNumber: this.hexToDecimal(rawLog.blockNumber), + transactionIndex: this.hexToDecimal(rawLog.transactionIndex), }; return formattedLog; } - private toDecimal(hex: string|null): number|null { + private hexToDecimal(hex: string|null): number|null { if (_.isNull(hex)) { return null; } -- cgit v1.2.3 From 0747e162fa41a281d1fdce60cad494e265d09bb0 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:18:29 -0600 Subject: Add instanceOf assertion --- packages/0x.js/test/token_wrapper_test.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages') diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index 07276877d..c32c528e6 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -363,6 +363,7 @@ describe('TokenWrapper', () => { expect(logEvent).to.not.be.undefined(); expect(logEvent.logIndex).to.be.equal(0); expect(logEvent.transactionIndex).to.be.equal(0); + expect(logEvent.blockNumber).to.be.instanceOf(Number); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); -- cgit v1.2.3 From 41315827c145fec564152e2f0cb3e986cb06c696 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:27:42 -0600 Subject: Publish - 0x.js@0.26.0 - @0xproject/assert@0.0.5 - @0xproject/connect@0.0.1 - @0xproject/json-schemas@0.6.8 - @0xproject/tslint-config@0.1.1 --- packages/0x.js/package.json | 8 ++++---- packages/assert/package.json | 6 +++--- packages/connect/package.json | 10 +++++----- packages/json-schemas/package.json | 4 ++-- packages/tslint-config/package.json | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 7aa360954..b439a58ef 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.25.1", + "version": "0.26.0", "description": "A javascript library for interacting with the 0x protocol", "keywords": [ "0x.js", @@ -44,7 +44,7 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/jsonschema": "^1.1.1", "@types/lodash": "^4.14.64", "@types/mocha": "^2.2.41", @@ -82,8 +82,8 @@ "webpack": "^3.1.0" }, "dependencies": { - "@0xproject/assert": "^0.0.4", - "@0xproject/json-schemas": "^0.6.7", + "@0xproject/assert": "^0.0.5", + "@0xproject/json-schemas": "^0.6.8", "bignumber.js": "~4.1.0", "bn.js": "4.11.8", "compare-versions": "^3.0.1", diff --git a/packages/assert/package.json b/packages/assert/package.json index ed1d2a98b..d0f40c66e 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/assert", - "version": "0.0.4", + "version": "0.0.5", "description": "Provides a standard way of performing type and schema validation across 0x projects", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", "devDependencies": { - "@0xproject/tslint-config": "^0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/lodash": "^4.14.78", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", @@ -37,7 +37,7 @@ "typescript": "^2.4.2" }, "dependencies": { - "@0xproject/json-schemas": "^0.6.7", + "@0xproject/json-schemas": "^0.6.8", "bignumber.js": "~4.1.0", "ethereum-address": "^0.0.4", "lodash": "^4.17.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index d26594b5d..ff6253fb6 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/connect", - "version": "0.0.0", + "version": "0.0.1", "description": "A javascript library for interacting with the standard relayer api", "keywords": [ "0x-connect", @@ -35,9 +35,9 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", "dependencies": { - "@0xproject/assert": "0.0.4", - "@0xproject/json-schemas": "0.6.7", - "0x.js": "~0.25.1", + "0x.js": "^0.26.0", + "@0xproject/assert": "^0.0.5", + "@0xproject/json-schemas": "^0.6.8", "bignumber.js": "~4.1.0", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.4", @@ -45,7 +45,7 @@ "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/tslint-config": "0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/fetch-mock": "^5.12.1", "@types/lodash": "^4.14.77", "@types/mocha": "^2.2.42", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 07ed20551..89c0d25f7 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/json-schemas", - "version": "0.6.7", + "version": "0.6.8", "description": "0x-related json schemas", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -28,7 +28,7 @@ "lodash.values": "^4.3.0" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index ca46d63fc..7ee3f1f71 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/tslint-config", - "version": "0.1.0", + "version": "0.1.1", "description": "Lint rules related to 0xProject for TSLint", "main": "tslint.json", "files": [ -- cgit v1.2.3 From 06cd2f1eb3f1c9a2db578d624eb62ae30838b8c6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:31:47 -0600 Subject: Revert "Publish" This reverts commit 41315827c145fec564152e2f0cb3e986cb06c696. --- packages/0x.js/package.json | 8 ++++---- packages/assert/package.json | 6 +++--- packages/connect/package.json | 10 +++++----- packages/json-schemas/package.json | 4 ++-- packages/tslint-config/package.json | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index b439a58ef..7aa360954 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.26.0", + "version": "0.25.1", "description": "A javascript library for interacting with the 0x protocol", "keywords": [ "0x.js", @@ -44,7 +44,7 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.1", + "@0xproject/tslint-config": "^0.1.0", "@types/jsonschema": "^1.1.1", "@types/lodash": "^4.14.64", "@types/mocha": "^2.2.41", @@ -82,8 +82,8 @@ "webpack": "^3.1.0" }, "dependencies": { - "@0xproject/assert": "^0.0.5", - "@0xproject/json-schemas": "^0.6.8", + "@0xproject/assert": "^0.0.4", + "@0xproject/json-schemas": "^0.6.7", "bignumber.js": "~4.1.0", "bn.js": "4.11.8", "compare-versions": "^3.0.1", diff --git a/packages/assert/package.json b/packages/assert/package.json index d0f40c66e..ed1d2a98b 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/assert", - "version": "0.0.5", + "version": "0.0.4", "description": "Provides a standard way of performing type and schema validation across 0x projects", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", "devDependencies": { - "@0xproject/tslint-config": "^0.1.1", + "@0xproject/tslint-config": "^0.1.0", "@types/lodash": "^4.14.78", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", @@ -37,7 +37,7 @@ "typescript": "^2.4.2" }, "dependencies": { - "@0xproject/json-schemas": "^0.6.8", + "@0xproject/json-schemas": "^0.6.7", "bignumber.js": "~4.1.0", "ethereum-address": "^0.0.4", "lodash": "^4.17.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index ff6253fb6..d26594b5d 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/connect", - "version": "0.0.1", + "version": "0.0.0", "description": "A javascript library for interacting with the standard relayer api", "keywords": [ "0x-connect", @@ -35,9 +35,9 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", "dependencies": { - "0x.js": "^0.26.0", - "@0xproject/assert": "^0.0.5", - "@0xproject/json-schemas": "^0.6.8", + "@0xproject/assert": "0.0.4", + "@0xproject/json-schemas": "0.6.7", + "0x.js": "~0.25.1", "bignumber.js": "~4.1.0", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.4", @@ -45,7 +45,7 @@ "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.1", + "@0xproject/tslint-config": "0.1.0", "@types/fetch-mock": "^5.12.1", "@types/lodash": "^4.14.77", "@types/mocha": "^2.2.42", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 89c0d25f7..07ed20551 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/json-schemas", - "version": "0.6.8", + "version": "0.6.7", "description": "0x-related json schemas", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -28,7 +28,7 @@ "lodash.values": "^4.3.0" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.1", + "@0xproject/tslint-config": "^0.1.0", "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index 7ee3f1f71..ca46d63fc 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/tslint-config", - "version": "0.1.1", + "version": "0.1.0", "description": "Lint rules related to 0xProject for TSLint", "main": "tslint.json", "files": [ -- cgit v1.2.3 From 9a2735d03522a5099319409d75a49b75282d64ea Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 13:34:33 -0600 Subject: Publish - 0x.js@0.26.0 - @0xproject/assert@0.0.5 - @0xproject/connect@0.0.1 - @0xproject/json-schemas@0.6.8 - @0xproject/tslint-config@0.1.1 --- packages/0x.js/package.json | 8 ++++---- packages/assert/package.json | 6 +++--- packages/connect/package.json | 10 +++++----- packages/json-schemas/package.json | 4 ++-- packages/tslint-config/package.json | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 7aa360954..b439a58ef 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.25.1", + "version": "0.26.0", "description": "A javascript library for interacting with the 0x protocol", "keywords": [ "0x.js", @@ -44,7 +44,7 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/jsonschema": "^1.1.1", "@types/lodash": "^4.14.64", "@types/mocha": "^2.2.41", @@ -82,8 +82,8 @@ "webpack": "^3.1.0" }, "dependencies": { - "@0xproject/assert": "^0.0.4", - "@0xproject/json-schemas": "^0.6.7", + "@0xproject/assert": "^0.0.5", + "@0xproject/json-schemas": "^0.6.8", "bignumber.js": "~4.1.0", "bn.js": "4.11.8", "compare-versions": "^3.0.1", diff --git a/packages/assert/package.json b/packages/assert/package.json index ed1d2a98b..d0f40c66e 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/assert", - "version": "0.0.4", + "version": "0.0.5", "description": "Provides a standard way of performing type and schema validation across 0x projects", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", "devDependencies": { - "@0xproject/tslint-config": "^0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/lodash": "^4.14.78", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", @@ -37,7 +37,7 @@ "typescript": "^2.4.2" }, "dependencies": { - "@0xproject/json-schemas": "^0.6.7", + "@0xproject/json-schemas": "^0.6.8", "bignumber.js": "~4.1.0", "ethereum-address": "^0.0.4", "lodash": "^4.17.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index d26594b5d..ff6253fb6 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/connect", - "version": "0.0.0", + "version": "0.0.1", "description": "A javascript library for interacting with the standard relayer api", "keywords": [ "0x-connect", @@ -35,9 +35,9 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", "dependencies": { - "@0xproject/assert": "0.0.4", - "@0xproject/json-schemas": "0.6.7", - "0x.js": "~0.25.1", + "0x.js": "^0.26.0", + "@0xproject/assert": "^0.0.5", + "@0xproject/json-schemas": "^0.6.8", "bignumber.js": "~4.1.0", "isomorphic-fetch": "^2.2.1", "lodash": "^4.17.4", @@ -45,7 +45,7 @@ "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/tslint-config": "0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/fetch-mock": "^5.12.1", "@types/lodash": "^4.14.77", "@types/mocha": "^2.2.42", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 07ed20551..89c0d25f7 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/json-schemas", - "version": "0.6.7", + "version": "0.6.8", "description": "0x-related json schemas", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", @@ -28,7 +28,7 @@ "lodash.values": "^4.3.0" }, "devDependencies": { - "@0xproject/tslint-config": "^0.1.0", + "@0xproject/tslint-config": "^0.1.1", "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index ca46d63fc..7ee3f1f71 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@0xproject/tslint-config", - "version": "0.1.0", + "version": "0.1.1", "description": "Lint rules related to 0xProject for TSLint", "main": "tslint.json", "files": [ -- cgit v1.2.3 From 66750f7349435dbcdb783a214e21800466ec3ac1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 21 Nov 2017 14:03:32 -0600 Subject: Fix tests --- packages/0x.js/test/token_wrapper_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index c32c528e6..1a7cb9e40 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -363,7 +363,7 @@ describe('TokenWrapper', () => { expect(logEvent).to.not.be.undefined(); expect(logEvent.logIndex).to.be.equal(0); expect(logEvent.transactionIndex).to.be.equal(0); - expect(logEvent.blockNumber).to.be.instanceOf(Number); + expect(logEvent.blockNumber).to.be.a('number'); const args = logEvent.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); -- cgit v1.2.3