aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-02 23:34:01 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-02 23:34:01 +0800
commit9756aa86b051940b88f87fbecb313bf07590eca3 (patch)
treebddd8b879949f8994b13eb484811980e3493aa66 /src
parent827a0d4e91169e338cbdc8042d158aaf7fdcf96c (diff)
downloaddexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.tar
dexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.tar.gz
dexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.tar.bz2
dexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.tar.lz
dexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.tar.xz
dexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.tar.zst
dexon-sol-tools-9756aa86b051940b88f87fbecb313bf07590eca3.zip
Add getZRXTokenAddressAsync
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index f0f6e79f7..0c7f27507 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -78,7 +78,7 @@ export class ExchangeWrapper extends ContractWrapper {
const senderAddress = await this.web3Wrapper.getSenderAddressOrThrowAsync();
const exchangeInstance = await this.getExchangeContractAsync();
- const zrxTokenAddress = await exchangeInstance.ZRX.call();
+ const zrxTokenAddress = await this.getZRXTokenAddressAsync(exchangeInstance);
await this.validateFillOrderAsync(signedOrder, fillTakerAmount, senderAddress, zrxTokenAddress);
const orderAddresses: OrderAddresses = [
@@ -226,4 +226,7 @@ export class ExchangeWrapper extends ContractWrapper {
this.exchangeContractIfExists = contractInstance as ExchangeContract;
return this.exchangeContractIfExists;
}
+ private async getZRXTokenAddressAsync(exchangeInstance: ExchangeContract): Promise<string> {
+ return exchangeInstance.ZRX.call();
+ }
}