From e01468b49265c1cad9a4d81873584a7e89169aa1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 23 Nov 2017 10:01:23 -0600 Subject: Make DecodedLogEvent contain web3 log under a log subkey --- packages/0x.js/test/exchange_wrapper_test.ts | 6 +++--- packages/0x.js/test/token_wrapper_test.ts | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/exchange_wrapper_test.ts b/packages/0x.js/test/exchange_wrapper_test.ts index add89a3b2..4ea17ec26 100644 --- a/packages/0x.js/test/exchange_wrapper_test.ts +++ b/packages/0x.js/test/exchange_wrapper_test.ts @@ -649,7 +649,7 @@ describe('ExchangeWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { - expect(logEvent.event).to.be.equal(ExchangeEvents.LogFill); + expect(logEvent.log.event).to.be.equal(ExchangeEvents.LogFill); done(); }; await zeroEx.exchange.subscribeAsync( @@ -665,7 +665,7 @@ describe('ExchangeWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { - expect(logEvent.event).to.be.equal(ExchangeEvents.LogCancel); + expect(logEvent.log.event).to.be.equal(ExchangeEvents.LogCancel); done(); }; await zeroEx.exchange.subscribeAsync( @@ -688,7 +688,7 @@ describe('ExchangeWrapper', () => { await zeroEx.setProviderAsync(newProvider); const callback = (err: Error, logEvent: DecodedLogEvent) => { - expect(logEvent.event).to.be.equal(ExchangeEvents.LogFill); + expect(logEvent.log.event).to.be.equal(ExchangeEvents.LogFill); done(); }; await zeroEx.exchange.subscribeAsync( diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index 1a7cb9e40..d44bf603c 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -361,10 +361,11 @@ 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); - expect(logEvent.blockNumber).to.be.a('number'); - const args = logEvent.args; + expect(logEvent.removed).to.be.false(); + expect(logEvent.log.logIndex).to.be.equal(0); + expect(logEvent.log.transactionIndex).to.be.equal(0); + expect(logEvent.log.blockNumber).to.be.a('number'); + const args = logEvent.log.args; expect(args._from).to.be.equal(coinbase); expect(args._to).to.be.equal(addressWithoutFunds); expect(args._value).to.be.bignumber.equal(transferAmount); @@ -379,7 +380,8 @@ describe('TokenWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { expect(logEvent).to.not.be.undefined(); - const args = logEvent.args; + expect(logEvent.removed).to.be.false(); + const args = logEvent.log.args; expect(args._owner).to.be.equal(coinbase); expect(args._spender).to.be.equal(addressWithoutFunds); expect(args._value).to.be.bignumber.equal(allowanceAmount); -- cgit v1.2.3 From fcd37808d46d162b183b7c6d9aeb58ebc431caba Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 23 Nov 2017 15:12:15 -0600 Subject: Rename removed to isRemoved --- packages/0x.js/test/token_wrapper_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/0x.js/test') diff --git a/packages/0x.js/test/token_wrapper_test.ts b/packages/0x.js/test/token_wrapper_test.ts index d44bf603c..882913793 100644 --- a/packages/0x.js/test/token_wrapper_test.ts +++ b/packages/0x.js/test/token_wrapper_test.ts @@ -361,7 +361,7 @@ describe('TokenWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { expect(logEvent).to.not.be.undefined(); - expect(logEvent.removed).to.be.false(); + expect(logEvent.isRemoved).to.be.false(); expect(logEvent.log.logIndex).to.be.equal(0); expect(logEvent.log.transactionIndex).to.be.equal(0); expect(logEvent.log.blockNumber).to.be.a('number'); @@ -380,7 +380,7 @@ describe('TokenWrapper', () => { (async () => { const callback = (err: Error, logEvent: DecodedLogEvent) => { expect(logEvent).to.not.be.undefined(); - expect(logEvent.removed).to.be.false(); + expect(logEvent.isRemoved).to.be.false(); const args = logEvent.log.args; expect(args._owner).to.be.equal(coinbase); expect(args._spender).to.be.equal(addressWithoutFunds); -- cgit v1.2.3