Skip to content

Commit adfb853

Browse files
authored
Merge pull request #18 from curvefi/fix/_getUserCollateral-url
Fix: _getUserCollateral url
2 parents ae1d428 + 4e74335 commit adfb853

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@curvefi/stablecoin-api",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "JavaScript library for Curve Stablecoin",
55
"main": "lib/index.js",
66
"author": "Macket",

src/external-api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const _getPoolsFromApi = memoize(
1717

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

0 commit comments

Comments
 (0)