Factor out exchangeArtifacts variable

This commit is contained in:
Leonid Logvinov
2017-06-29 11:05:56 -07:00
parent 260def1aef
commit 3f7bdfa67a

View File

@@ -807,7 +807,8 @@ export class ExchangeWrapper extends ContractWrapper {
return this._exchangeContractByAddress[exchangeContractAddress];
}
private _getExchangeArtifactsByAddressOrThrow(exchangeContractAddress: string): ContractArtifact {
for (const exchangeArtifact of _.values<ContractArtifact>(ExchangeArtifactsByName)) {
const exchangeArtifacts = _.values<ContractArtifact>(ExchangeArtifactsByName);
for (const exchangeArtifact of exchangeArtifacts) {
const exchangeAddressesInAftifact = _.map(
_.values(exchangeArtifact.networks),
artifactsByNetwork => artifactsByNetwork.address,