Skip to content

Commit

Permalink
fix(swap): don't crash app when token decimals eq 0
Browse files Browse the repository at this point in the history
  • Loading branch information
shoom3301 committed Oct 16, 2023
1 parent b4f9f37 commit 1221ca9
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 1221ca9

Please sign in to comment.