aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-08-30 00:41:29 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-08-30 00:41:29 +0800
commit7d82d14a7d57566c5220a2342e21c755a9dc6a4a (patch)
tree891c78a585ae4b760c0e1e45210fed0f267347e2 /test
parente5bb3bc75eb2fe0e2a4adbd99d64362c305bdd3e (diff)
downloaddexon-0x-contracts-7d82d14a7d57566c5220a2342e21c755a9dc6a4a.tar.gz
dexon-0x-contracts-7d82d14a7d57566c5220a2342e21c755a9dc6a4a.tar.zst
dexon-0x-contracts-7d82d14a7d57566c5220a2342e21c755a9dc6a4a.zip
Use zeroEx.getAvailableAddressesAsync instead of web3.eth.getAccounts
Diffstat (limited to 'test')
-rw-r--r--test/ether_token_wrapper_test.ts2
-rw-r--r--test/exchange_wrapper_test.ts2
-rw-r--r--test/order_validation_test.ts2
-rw-r--r--test/token_wrapper_test.ts2
4 files changed, 4 insertions, 4 deletions
diff --git a/test/ether_token_wrapper_test.ts b/test/ether_token_wrapper_test.ts
index b40061a41..601800cd1 100644
--- a/test/ether_token_wrapper_test.ts
+++ b/test/ether_token_wrapper_test.ts
@@ -33,7 +33,7 @@ describe('EtherTokenWrapper', () => {
before(async () => {
web3 = web3Factory.create();
zeroEx = new ZeroEx(web3.currentProvider, zeroExConfig);
- userAddresses = await promisify(web3.eth.getAccounts)();
+ userAddresses = await zeroEx.getAvailableAddressesAsync();
addressWithETH = userAddresses[0];
wethContractAddress = await zeroEx.etherToken.getContractAddressAsync();
depositWeiAmount = (zeroEx as any)._web3Wrapper.toWei(new BigNumber(5));
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 080be774a..90ac37387 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -44,7 +44,7 @@ describe('ExchangeWrapper', () => {
web3 = web3Factory.create();
zeroEx = new ZeroEx(web3.currentProvider);
exchangeContractAddress = await zeroEx.exchange.getContractAddressAsync();
- userAddresses = await promisify(web3.eth.getAccounts)();
+ userAddresses = await zeroEx.getAvailableAddressesAsync();
tokens = await zeroEx.tokenRegistry.getTokensAsync();
tokenUtils = new TokenUtils(tokens);
zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address;
diff --git a/test/order_validation_test.ts b/test/order_validation_test.ts
index 8a6303f3a..93bcfcce0 100644
--- a/test/order_validation_test.ts
+++ b/test/order_validation_test.ts
@@ -37,7 +37,7 @@ describe('OrderValidation', () => {
web3 = web3Factory.create();
zeroEx = new ZeroEx(web3.currentProvider);
exchangeContractAddress = await zeroEx.exchange.getContractAddressAsync();
- userAddresses = await promisify(web3.eth.getAccounts)();
+ userAddresses = await zeroEx.getAvailableAddressesAsync();
[coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses;
tokens = await zeroEx.tokenRegistry.getTokensAsync();
tokenUtils = new TokenUtils(tokens);
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts
index f4653e432..88833e612 100644
--- a/test/token_wrapper_test.ts
+++ b/test/token_wrapper_test.ts
@@ -34,7 +34,7 @@ describe('TokenWrapper', () => {
before(async () => {
web3 = web3Factory.create();
zeroEx = new ZeroEx(web3.currentProvider);
- userAddresses = await promisify(web3.eth.getAccounts)();
+ userAddresses = await zeroEx.getAvailableAddressesAsync();
tokens = await zeroEx.tokenRegistry.getTokensAsync();
tokenUtils = new TokenUtils(tokens);
coinbase = userAddresses[0];