diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-13 23:37:33 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-13 23:37:33 +0800 |
commit | 7b6cc14b71094b0b55353400ed3a383b135605a6 (patch) | |
tree | 74aec820f1db48c7598d5b7c2fdebf167b7fb7da /packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | |
parent | ec749a40333ff8eaa723870693e36f02bd16c0d9 (diff) | |
download | dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.tar dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.gz dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.bz2 dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.lz dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.xz dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.zst dexon-0x-contracts-7b6cc14b71094b0b55353400ed3a383b135605a6.zip |
Make getZRXAssetData not async
Diffstat (limited to 'packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts')
-rw-r--r-- | packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 8b7148aed..abe373dcf 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -1,4 +1,5 @@ import { schemas } from '@0xproject/json-schemas'; +import { assetProxyUtils } from '@0xproject/order-utils'; import { AssetProxyId, Order, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; @@ -1068,9 +1069,9 @@ export class ExchangeWrapper extends ContractWrapper { * Returns the ZRX asset data used by the exchange contract. * @return ZRX asset data */ - public async getZRXAssetDataAsync(): Promise<string> { - const exchangeInstance = await this._getExchangeContractAsync(); - const zrxAssetData = exchangeInstance.ZRX_ASSET_DATA.callAsync(); + public getZRXAssetData(): string { + const zrxTokenAddress = this.getZRXTokenAddress(); + const zrxAssetData = assetProxyUtils.encodeERC20AssetData(zrxTokenAddress); return zrxAssetData; } // tslint:disable:no-unused-variable |