From fc3b0ce553574502fa23e63ec47e9500ba69283c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 30 Jun 2017 14:14:34 -0700 Subject: Fix a bug in getProxyAuthorizedContractAddressesAsync --- src/contract_wrappers/exchange_wrapper.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') 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 { 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; } /** -- cgit v1.2.3