Skip to content

Commit

Permalink
Merge pull request #14 from curvefi/fix/collateral-duplication
Browse files Browse the repository at this point in the history
Fix: collateral duplication 2
  • Loading branch information
Macket authored Aug 26, 2023
2 parents c5dc503 + 355bbcc commit e15eb63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curvefi/stablecoin-api",
"version": "1.3.5",
"version": "1.3.6",
"description": "JavaScript library for Curve Stablecoin",
"main": "lib/index.js",
"author": "Macket",
Expand Down
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 e15eb63

Please sign in to comment.