Skip to content

Commit

Permalink
fix(swap): don't crash app when token decimals eq 0 (#3228)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 authored and alfetopito committed Oct 17, 2023
1 parent 4f4b7d5 commit aad09c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/cowswap-frontend/src/modules/swap/pure/warnings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const SwapWarningsTop = React.memo(function (props: SwapWarningsTopProps)
priceImpact={priceImpact}
buyingFiatAmount={buyingFiatAmount}
tradeUrlParams={tradeUrlParams}
sellAmount={trade?.inputAmount.toFixed(trade?.inputAmount?.currency?.decimals || 18)}
sellAmount={trade?.inputAmount.toExact()}
/>
</>
)
Expand Down

0 comments on commit aad09c6

Please sign in to comment.