Skip to content

Commit

Permalink
Merge pull request #612 from liquity/fix-negative-value
Browse files Browse the repository at this point in the history
fix: negative value passed to TX when withdrawing
  • Loading branch information
danielattilasimon authored Nov 26, 2024
2 parents 24afa73 + 2eac643 commit dc08506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/app/src/tx-flows/updateBorrowPosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export const updateBorrowPosition: FlowDeclaration<Request, Step> = {
!dn.lt(debtChange, 0n),
maxUpfrontFee[0],
],
value: collChange[0],
value: dn.gt(collChange, 0n) ? collChange[0] : 0n,
}))
.with("depositColl", () => ({
...LeverageWETHZapper,
Expand Down

0 comments on commit dc08506

Please sign in to comment.