Skip to content

Commit

Permalink
Merge pull request #18 from curvefi/fix/_getUserCollateral-url
Browse files Browse the repository at this point in the history
Fix: _getUserCollateral url
  • Loading branch information
Macket authored Oct 27, 2023
2 parents ae1d428 + 4e74335 commit adfb853
Show file tree
Hide file tree
Showing 2 changed files with 2 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.5.0",
"version": "1.5.1",
"description": "JavaScript library for Curve Stablecoin",
"main": "lib/index.js",
"author": "Macket",
Expand Down
2 changes: 1 addition & 1 deletion src/external-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const _getPoolsFromApi = memoize(

export const _getUserCollateral = memoize(
async (network: INetworkName, controller: string, user: string, collateralDecimals = 18): Promise<string> => {
const url = `https://prices.curve.fi/v1/stablecoin/controller/events/${network}/${controller}/${user}`;
const url = `https://prices.curve.fi/v1/crvusd/collateral_events/${network}/${controller}/${user}`;
const response = await axios.get(url, { validateStatus: () => true });
return crvusd.formatUnits(crvusd.parseUnits(response.data.total_collateral ?? "0.0", 0), collateralDecimals);
},
Expand Down

0 comments on commit adfb853

Please sign in to comment.