Skip to content

Commit

Permalink
fix(pool): correct fees output (#653)
Browse files Browse the repository at this point in the history
Signed-off-by: james-a-morris <[email protected]>
  • Loading branch information
james-a-morris authored May 30, 2024
1 parent ee2ee68 commit 25c5cd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@across-protocol/sdk-v2",
"author": "UMA Team",
"version": "0.24.2",
"version": "0.24.3",
"license": "AGPL-3.0",
"homepage": "https://docs.across.to/reference/sdk",
"files": [
Expand Down
3 changes: 2 additions & 1 deletion src/contracts/hubPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ function reduceEvents(state: EventState, event: SerializableEvent): EventState {
case "LiquidityAdded":
case "LiquidityRemoved": {
const { amount, liquidityProvider } = args;
tokens.add(liquidityProvider, amount.toString());
if (event.event === "LiquidityAdded") {
lpTokens.add(liquidityProvider, args.lpTokensMinted.toString());
tokens.add(liquidityProvider, amount.toString());
} else {
lpTokens.sub(liquidityProvider, args.lpTokensBurnt.toString());
tokens.sub(liquidityProvider, amount.toString());
}

return {
Expand Down

0 comments on commit 25c5cd7

Please sign in to comment.