aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-01 05:14:34 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-01 05:14:34 +0800
commitfc3b0ce553574502fa23e63ec47e9500ba69283c (patch)
tree4888552f6e72d2143af9f119bb501241fcecabc0 /src
parenta85c2b61ceac198e822074e1670140924aa0e9f5 (diff)
downloaddexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.tar
dexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.tar.gz
dexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.tar.bz2
dexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.tar.lz
dexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.tar.xz
dexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.tar.zst
dexon-sol-tools-fc3b0ce553574502fa23e63ec47e9500ba69283c.zip
Fix a bug in getProxyAuthorizedContractAddressesAsync
Diffstat (limited to 'src')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 744720c3a..a276b53ad 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -630,8 +630,13 @@ export class ExchangeWrapper extends ContractWrapper {
*/
public async getProxyAuthorizedContractAddressesAsync(): Promise<string[]> {
const exchangeContractAddresses = await this.getAvailableContractAddressesAsync();
- const proxyAuthorizedExchangeContractAddresses = _.filter(
- exchangeContractAddresses, this._isExchangeContractAddressProxyAuthrizedAsync.bind(this));
+ const proxyAuthorizedExchangeContractAddresses = [];
+ for (const exchangeContractAddress of exchangeContractAddresses) {
+ const isProxyAuthorized = await this._isExchangeContractAddressProxyAuthrizedAsync(exchangeContractAddress);
+ if (isProxyAuthorized) {
+ proxyAuthorizedExchangeContractAddresses.push(exchangeContractAddress);
+ }
+ }
return proxyAuthorizedExchangeContractAddresses;
}
/**