aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/ether_token.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-05 20:06:58 +0800
committerFabio Berger <me@fabioberger.com>2018-04-05 20:06:58 +0800
commit89a72ebf0dbff606d511ae51bfee7ffc0a5df18f (patch)
tree65c935c4c372d2c497bec08164b314866050192b /packages/contracts/test/ether_token.ts
parent20aaab0847d0ec8b2a44f392ddd467f0c475cfb5 (diff)
parent7f7ddee0f95f3ed3e903c230088dbee4648771bd (diff)
downloaddexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.gz
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.bz2
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.lz
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.xz
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.tar.zst
dexon-sol-tools-89a72ebf0dbff606d511ae51bfee7ffc0a5df18f.zip
Merge branch 'development' into removeMigrateStep
* development: Fix tests Call static functions as static Address feedback Move our contract templates to accept Provider instead of Web3Wrapper
Diffstat (limited to 'packages/contracts/test/ether_token.ts')
-rw-r--r--packages/contracts/test/ether_token.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts
index 6c7354c2b..4023abad0 100644
--- a/packages/contracts/test/ether_token.ts
+++ b/packages/contracts/test/ether_token.ts
@@ -9,7 +9,7 @@ import { ContractName } from '../util/types';
import { chaiSetup } from './utils/chai_setup';
import { deployer } from './utils/deployer';
-import { web3, web3Wrapper } from './utils/web3_wrapper';
+import { provider, web3Wrapper } from './utils/web3_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -26,7 +26,7 @@ describe('EtherToken', () => {
const etherToken = await deployer.deployAsync(ContractName.EtherToken);
etherTokenAddress = etherToken.address;
- zeroEx = new ZeroEx(web3.currentProvider, {
+ zeroEx = new ZeroEx(provider, {
gasPrice,
networkId: constants.TESTRPC_NETWORK_ID,
});
@@ -51,7 +51,7 @@ describe('EtherToken', () => {
const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
const initEthTokenBalance = await zeroEx.token.getBalanceAsync(etherTokenAddress, account);
- const ethToDeposit = new BigNumber(web3.toWei(1, 'ether'));
+ const ethToDeposit = new BigNumber(Web3Wrapper.toWei(new BigNumber(1)));
const txHash = await zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account);
const receipt = await zeroEx.awaitTransactionMinedAsync(txHash);
@@ -76,7 +76,7 @@ describe('EtherToken', () => {
});
it('should convert ether tokens to ether with sufficient balance', async () => {
- const ethToDeposit = new BigNumber(web3.toWei(1, 'ether'));
+ const ethToDeposit = new BigNumber(Web3Wrapper.toWei(new BigNumber(1)));
await zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account);
const initEthTokenBalance = await zeroEx.token.getBalanceAsync(etherTokenAddress, account);
const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);