aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 7f67346ce..a121d524c 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -609,9 +609,12 @@ export class ExchangeWrapper extends ContractWrapper {
if (_.isUndefined(networkId)) {
return [];
} else {
+ const exchangeArtifacts = _.values(ExchangeArtifactsByName);
+ const networkSpecificExchangeArtifacts = _.compact(_.map(
+ exchangeArtifacts, exchangeArtifact => exchangeArtifact.networks[networkId]));
const exchangeAddresses = _.map(
- _.values(ExchangeArtifactsByName),
- exchangeArtifact => exchangeArtifact.networks[networkId].address,
+ networkSpecificExchangeArtifacts,
+ networkSpecificExchangeArtifact => networkSpecificExchangeArtifact.address,
);
return exchangeAddresses;
}