diff options
Diffstat (limited to 'packages/0x.js/test')
-rw-r--r-- | packages/0x.js/test/0x.js_test.ts | 4 | ||||
-rw-r--r-- | packages/0x.js/test/event_watcher_test.ts | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index d61847d1d..70e85aa52 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -216,7 +216,7 @@ describe('ZeroEx library', () => { s: '0x050aa3cc1f2c435e67e114cdce54b9527b4f50548342401bc5d2b77adbdacb02', }; stubs = [ - Sinon.stub((zeroEx as any)._web3Wrapper, 'signTransactionAsync').returns(Promise.resolve(signature)), + Sinon.stub((zeroEx as any)._web3Wrapper, 'signMessageAsync').returns(Promise.resolve(signature)), Sinon.stub(ZeroEx, 'isValidSignature').returns(true), ]; @@ -237,7 +237,7 @@ describe('ZeroEx library', () => { s: '0x2dea66f25a608bbae457e020fb6decb763deb8b7192abab624997242da248960', }; stubs = [ - Sinon.stub((zeroEx as any)._web3Wrapper, 'signTransactionAsync').returns(Promise.resolve(signature)), + Sinon.stub((zeroEx as any)._web3Wrapper, 'signMessageAsync').returns(Promise.resolve(signature)), Sinon.stub(ZeroEx, 'isValidSignature').returns(true), ]; diff --git a/packages/0x.js/test/event_watcher_test.ts b/packages/0x.js/test/event_watcher_test.ts index 93ee9cd1c..2fa6c0580 100644 --- a/packages/0x.js/test/event_watcher_test.ts +++ b/packages/0x.js/test/event_watcher_test.ts @@ -1,4 +1,5 @@ import { web3Factory } from '@0xproject/dev-utils'; +import { LogEntry } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; import * as _ from 'lodash'; @@ -21,7 +22,7 @@ describe('EventWatcher', () => { let stubs: Sinon.SinonStub[] = []; let eventWatcher: EventWatcher; let web3Wrapper: Web3Wrapper; - const logA: Web3.LogEntry = { + const logA: LogEntry = { address: '0x71d271f8b14adef568f8f28f1587ce7271ac4ca5', blockHash: null, blockNumber: null, @@ -31,7 +32,7 @@ describe('EventWatcher', () => { transactionHash: '0x004881d38cd4a8f72f1a0d68c8b9b8124504706041ff37019c1d1ed6bfda8e17', transactionIndex: 0, }; - const logB: Web3.LogEntry = { + const logB: LogEntry = { address: '0x8d12a197cb00d4747a1fe03395095ce2a5cc6819', blockHash: null, blockNumber: null, @@ -41,7 +42,7 @@ describe('EventWatcher', () => { transactionHash: '0x01ef3c048b18d9b09ea195b4ed94cf8dd5f3d857a1905ff886b152cfb1166f25', transactionIndex: 0, }; - const logC: Web3.LogEntry = { + const logC: LogEntry = { address: '0x1d271f8b174adef58f1587ce68f8f27271ac4ca5', blockHash: null, blockNumber: null, @@ -64,7 +65,7 @@ describe('EventWatcher', () => { eventWatcher.unsubscribe(); }); it('correctly emits initial log events', (done: DoneCallback) => { - const logs: Web3.LogEntry[] = [logA, logB]; + const logs: LogEntry[] = [logA, logB]; const expectedLogEvents = [ { removed: false, @@ -89,8 +90,8 @@ describe('EventWatcher', () => { eventWatcher.subscribe(callback); }); it('correctly computes the difference and emits only changes', (done: DoneCallback) => { - const initialLogs: Web3.LogEntry[] = [logA, logB]; - const changedLogs: Web3.LogEntry[] = [logA, logC]; + const initialLogs: LogEntry[] = [logA, logB]; + const changedLogs: LogEntry[] = [logA, logC]; const expectedLogEvents = [ { removed: false, |