diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-01 05:14:34 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2017-07-01 05:14:34 +0800 |
commit | fc3b0ce553574502fa23e63ec47e9500ba69283c (patch) | |
tree | 4888552f6e72d2143af9f119bb501241fcecabc0 /src/contract_wrappers | |
parent | a85c2b61ceac198e822074e1670140924aa0e9f5 (diff) | |
download | dexon-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/contract_wrappers')
-rw-r--r-- | src/contract_wrappers/exchange_wrapper.ts | 9 |
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; } /** |