Skip to content

Commit

Permalink
fix: value loss calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
chybisov committed Oct 10, 2022
1 parent 68f4f06 commit 02ee277
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/widget/src/pages/SwapPage/TokenValueBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ const TokenValueBottomSheetContent: React.FC<TokenValueBottomSheetProps> = ({
<Typography fontWeight={600}>
{Big(route.toAmountUSD || 0)
.div(Big(route.fromAmountUSD || 0).plus(Big(route.gasCostUSD || 0)))
.mul(-100)
.minus(1)
.mul(100)
.toFixed(1)}
%
</Typography>
Expand Down

0 comments on commit 02ee277

Please sign in to comment.