Skip to content

Commit

Permalink
fix: collateral duplication (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Macket committed Aug 26, 2023
1 parent c5dc503 commit 606be52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/crvusd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ class Crvusd implements Icrvusd {
this.setContract(controllers[i], controllerABI);
const monetary_policy_address = (await this.contracts[controllers[i]].contract.monetary_policy(this.constantOptions)).toLowerCase();
this.setContract(monetary_policy_address, MonetaryPolicy2ABI);
this.constants.LLAMMAS[is_eth ? "eth" : collateral_symbol.toLowerCase()] = {
const _llammaId: string = is_eth ? "eth" : collateral_symbol.toLowerCase();
let llammaId = _llammaId
let j = 1;
while (llammaId in this.constants.LLAMMAS) llammaId = _llammaId + j++;
this.constants.LLAMMAS[llammaId] = {
amm_address: amms[i],
controller_address: controllers[i],
monetary_policy_address,
Expand Down

0 comments on commit 606be52

Please sign in to comment.