aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-13 23:37:33 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-13 23:37:33 +0800
commit7b6cc14b71094b0b55353400ed3a383b135605a6 (patch)
tree74aec820f1db48c7598d5b7c2fdebf167b7fb7da
parentec749a40333ff8eaa723870693e36f02bd16c0d9 (diff)
downloaddexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.tar
dexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.gz
dexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.bz2
dexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.lz
dexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.xz
dexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.tar.zst
dexon-sol-tools-7b6cc14b71094b0b55353400ed3a383b135605a6.zip
Make getZRXAssetData not async
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts7
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