aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-06-19 23:42:25 +0800
committerFabio Berger <me@fabioberger.com>2017-06-19 23:42:25 +0800
commita8f706c79fb4244119a6d4ad03ea666689cc63fc (patch)
treef370ede530e5ae6f9b3530f7983c3e71e164156c /test
parentfe63a81f6a15a521c643b74f4442cdbf037202cf (diff)
parent36fe4c01aa5a86ef820c11bb0b2e4724c68e40b5 (diff)
downloaddexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.tar
dexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.tar.gz
dexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.tar.bz2
dexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.tar.lz
dexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.tar.xz
dexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.tar.zst
dexon-sol-tools-a8f706c79fb4244119a6d4ad03ea666689cc63fc.zip
Merge branch 'master' of github.com:0xProject/0x.js
Diffstat (limited to 'test')
-rw-r--r--test/0x.js_test.ts8
-rw-r--r--test/assert_test.ts2
-rw-r--r--test/exchange_wrapper_test.ts2
-rw-r--r--test/token_registry_wrapper_test.ts2
-rw-r--r--test/token_wrapper_test.ts2
5 files changed, 8 insertions, 8 deletions
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index 58f5c8533..9ec0a0c8e 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -15,7 +15,7 @@ describe('ZeroEx library', () => {
describe('#setProvider', () => {
it('overrides provider in nested web3s and invalidates contractInstances', async () => {
const web3 = web3Factory.create();
- const zeroEx = new ZeroEx(web3);
+ const zeroEx = new ZeroEx(web3.currentProvider);
// Instantiate the contract instances with the current provider
await (zeroEx.exchange as any)._getExchangeContractAsync();
await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
@@ -51,7 +51,7 @@ describe('ZeroEx library', () => {
};
const address = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
const web3 = web3Factory.create();
- const zeroEx = new ZeroEx(web3);
+ const zeroEx = new ZeroEx(web3.currentProvider);
it('should return false if the data doesn\'t pertain to the signature & address', async () => {
expect(ZeroEx.isValidSignature('0x0', signature, address)).to.be.false();
return expect(
@@ -149,7 +149,7 @@ describe('ZeroEx library', () => {
});
it('calculates the order hash', async () => {
const web3 = web3Factory.create();
- const zeroEx = new ZeroEx(web3);
+ const zeroEx = new ZeroEx(web3.currentProvider);
stubs = [
Sinon.stub((zeroEx as any), '_getExchangeAddressAsync')
@@ -164,7 +164,7 @@ describe('ZeroEx library', () => {
let stubs: Sinon.SinonStub[] = [];
let makerAddress: string;
const web3 = web3Factory.create();
- const zeroEx = new ZeroEx(web3);
+ const zeroEx = new ZeroEx(web3.currentProvider);
before(async () => {
const availableAddreses = await zeroEx.getAvailableAddressesAsync();
makerAddress = availableAddreses[0];
diff --git a/test/assert_test.ts b/test/assert_test.ts
index 25d9a8d16..6a8d30716 100644
--- a/test/assert_test.ts
+++ b/test/assert_test.ts
@@ -8,7 +8,7 @@ const expect = chai.expect;
describe('Assertion library', () => {
const web3 = web3Factory.create();
- const zeroEx = new ZeroEx(web3);
+ const zeroEx = new ZeroEx(web3.currentProvider);
describe('#isSenderAddressHexAsync', () => {
it('throws when address is invalid', async () => {
const address = '0xdeadbeef';
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index 28a5c719e..e4b2e3f86 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -39,7 +39,7 @@ describe('ExchangeWrapper', () => {
let fillScenarios: FillScenarios;
before(async () => {
web3 = web3Factory.create();
- zeroEx = new ZeroEx(web3);
+ zeroEx = new ZeroEx(web3.currentProvider);
userAddresses = await promisify(web3.eth.getAccounts)();
tokens = await zeroEx.tokenRegistry.getTokensAsync();
tokenUtils = new TokenUtils(tokens);
diff --git a/test/token_registry_wrapper_test.ts b/test/token_registry_wrapper_test.ts
index 158a02596..da436161c 100644
--- a/test/token_registry_wrapper_test.ts
+++ b/test/token_registry_wrapper_test.ts
@@ -18,7 +18,7 @@ describe('TokenRegistryWrapper', () => {
let zeroEx: ZeroEx;
before(async () => {
const web3 = web3Factory.create();
- zeroEx = new ZeroEx(web3);
+ zeroEx = new ZeroEx(web3.currentProvider);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();
diff --git a/test/token_wrapper_test.ts b/test/token_wrapper_test.ts
index 308d3b634..a1c035672 100644
--- a/test/token_wrapper_test.ts
+++ b/test/token_wrapper_test.ts
@@ -21,7 +21,7 @@ describe('TokenWrapper', () => {
let addressWithoutFunds: string;
before(async () => {
web3 = web3Factory.create();
- zeroEx = new ZeroEx(web3);
+ zeroEx = new ZeroEx(web3.currentProvider);
userAddresses = await promisify(web3.eth.getAccounts)();
tokens = await zeroEx.tokenRegistry.getTokensAsync();
coinbase = userAddresses[0];