diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-11 00:22:05 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-11-13 09:03:18 +0800 |
commit | f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08 (patch) | |
tree | 57505009b1c400db4f9865ea9c593017b81095e0 /test | |
parent | 742660591f66b1bccd194803a1bf1e43a60a3b31 (diff) | |
download | dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.tar dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.tar.gz dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.tar.bz2 dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.tar.lz dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.tar.xz dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.tar.zst dexon-sol-tools-f163e6d8cc53dbbfd65168c977aa53c5ab9b3c08.zip |
Fix tests
Diffstat (limited to 'test')
-rw-r--r-- | test/exchange_transfer_simulator_test.ts | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/exchange_transfer_simulator_test.ts b/test/exchange_transfer_simulator_test.ts index 3373ebf03..99cb7fb4f 100644 --- a/test/exchange_transfer_simulator_test.ts +++ b/test/exchange_transfer_simulator_test.ts @@ -59,11 +59,10 @@ describe('ExchangeTransferSimulator', () => { await exchangeTransferSimulator.transferFromAsync( exampleTokenAddress, sender, recipient, transferAmount, TradeSide.Taker, TransferType.Trade, ); - const senderBalance = await (exchangeTransferSimulator as any).getBalanceAsync(exampleTokenAddress, sender); - const recipientBalance = await (exchangeTransferSimulator as any).getBalanceAsync( - exampleTokenAddress, recipient); - const senderProxyAllowance = await (exchangeTransferSimulator as any).getProxyAllowanceAsync( - exampleTokenAddress, sender); + const store = (exchangeTransferSimulator as any).store; + const senderBalance = await store.getBalanceAsync(exampleTokenAddress, sender); + const recipientBalance = await store.getBalanceAsync(exampleTokenAddress, recipient); + const senderProxyAllowance = await store.getProxyAllowanceAsync(exampleTokenAddress, sender); expect(senderBalance).to.be.bignumber.equal(0); expect(recipientBalance).to.be.bignumber.equal(transferAmount); expect(senderProxyAllowance).to.be.bignumber.equal(0); @@ -76,11 +75,10 @@ describe('ExchangeTransferSimulator', () => { await exchangeTransferSimulator.transferFromAsync( exampleTokenAddress, sender, recipient, transferAmount, TradeSide.Taker, TransferType.Trade, ); - const senderBalance = await (exchangeTransferSimulator as any).getBalanceAsync(exampleTokenAddress, sender); - const recipientBalance = await (exchangeTransferSimulator as any).getBalanceAsync( - exampleTokenAddress, recipient); - const senderProxyAllowance = await (exchangeTransferSimulator as any).getProxyAllowanceAsync( - exampleTokenAddress, sender); + const store = (exchangeTransferSimulator as any).store; + const senderBalance = await store.getBalanceAsync(exampleTokenAddress, sender); + const recipientBalance = await store.getBalanceAsync(exampleTokenAddress, recipient); + const senderProxyAllowance = await store.getProxyAllowanceAsync(exampleTokenAddress, sender); expect(senderBalance).to.be.bignumber.equal(0); expect(recipientBalance).to.be.bignumber.equal(transferAmount); expect(senderProxyAllowance).to.be.bignumber.equal(zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS); |