Split 0x.js into contract-wrappers, order-watcher but keep 0x.js as a unifying library with the same interface
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ZeroEx, ZeroExError } from '0x.js';
|
||||
import { ZeroEx, ContractWrappersError } from '0x.js';
|
||||
import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
|
||||
import { BigNumber, promisify } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
@@ -43,7 +43,7 @@ describe('EtherToken', () => {
|
||||
const ethToDeposit = initEthBalance.plus(1);
|
||||
|
||||
return expect(zeroEx.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account)).to.be.rejectedWith(
|
||||
ZeroExError.InsufficientEthBalanceForDeposit,
|
||||
ContractWrappersError.InsufficientEthBalanceForDeposit,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('EtherToken', () => {
|
||||
|
||||
return expect(
|
||||
zeroEx.etherToken.withdrawAsync(etherTokenAddress, ethTokensToWithdraw, account),
|
||||
).to.be.rejectedWith(ZeroExError.InsufficientWEthBalanceForWithdrawal);
|
||||
).to.be.rejectedWith(ContractWrappersError.InsufficientWEthBalanceForWithdrawal);
|
||||
});
|
||||
|
||||
it('should convert ether tokens to ether with sufficient balance', async () => {
|
||||
|
@@ -17,7 +17,7 @@ import { chaiSetup } from './utils/chai_setup';
|
||||
import { deployer } from './utils/deployer';
|
||||
import { provider, web3Wrapper } from './utils/web3_wrapper';
|
||||
|
||||
const MULTI_SIG_ABI = artifacts.MultiSigWalletWithTimeLockArtifact.networks[constants.TESTRPC_NETWORK_ID].abi;
|
||||
const MULTI_SIG_ABI = artifacts.MultiSigWalletWithTimeLock.networks[constants.TESTRPC_NETWORK_ID].abi;
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
|
@@ -17,9 +17,9 @@ import { ContractName, SubmissionContractEventArgs, TransactionDataParams } from
|
||||
import { chaiSetup } from './utils/chai_setup';
|
||||
import { deployer } from './utils/deployer';
|
||||
import { provider, web3Wrapper } from './utils/web3_wrapper';
|
||||
const PROXY_ABI = artifacts.TokenTransferProxyArtifact.networks[constants.TESTRPC_NETWORK_ID].abi;
|
||||
const PROXY_ABI = artifacts.TokenTransferProxy.networks[constants.TESTRPC_NETWORK_ID].abi;
|
||||
const MUTISIG_WALLET_WITH_TIME_LOCK_EXCEPT_REMOVE_AUTHORIZED_ADDRESS_ABI =
|
||||
artifacts.MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddressArtifact.networks[constants.TESTRPC_NETWORK_ID]
|
||||
artifacts.MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.networks[constants.TESTRPC_NETWORK_ID]
|
||||
.abi;
|
||||
|
||||
chaiSetup.configure();
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import { ECSignature, SignedOrder, ZeroEx } from '0x.js';
|
||||
import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
|
||||
import { ExchangeContractErrs } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
@@ -14,7 +15,7 @@ import { constants } from '../../util/constants';
|
||||
import { crypto } from '../../util/crypto';
|
||||
import { ExchangeWrapper } from '../../util/exchange_wrapper';
|
||||
import { OrderFactory } from '../../util/order_factory';
|
||||
import { BalancesByOwner, ContractName, ExchangeContractErrs } from '../../util/types';
|
||||
import { BalancesByOwner, ContractName } from '../../util/types';
|
||||
import { chaiSetup } from '../utils/chai_setup';
|
||||
import { deployer } from '../utils/deployer';
|
||||
import { provider, web3Wrapper } from '../utils/web3_wrapper';
|
||||
|
Reference in New Issue
Block a user