Skip to content

Commit

Permalink
fix: documented error in removeLiquidityOneCoinWrappedExpected
Browse files Browse the repository at this point in the history
  • Loading branch information
Makeev Ivan committed Oct 5, 2021
1 parent b898ad7 commit 8fff0b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@curvefi/api",
"version": "1.5.0",
"version": "1.5.1",
"description": "JavaScript library for curve.fi",
"main": "lib/index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions src/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,10 @@ export class Pool {
}

public removeLiquidityOneCoinWrappedExpected = async (lpTokenAmount: string, coin: string | number): Promise<string> => {
if (['compound', 'usdt', 'y', 'busd', 'pax'].includes(this.name)) {
throw Error(`${this.name} pool doesn't have remove_liquidity_one_coin method for wrapped tokens`);
}

const i = this._getCoinIdx(coin, false);
const _lpTokenAmount = ethers.utils.parseUnits(lpTokenAmount);

Expand Down

0 comments on commit 8fff0b4

Please sign in to comment.