Skip to content

Commit

Permalink
fix: rounding decimals dependency on base asset
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Aug 28, 2024
1 parent d199986 commit f4a50eb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/web/components/place-limit-tool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,17 @@ export const PlaceLimitTool: FunctionComponent<PlaceLimitToolProps> = observer(
setAmountSafe(
"token",
tokenValue ? tokenValue.toString() : undefined,
undefined,
swapState.baseAsset?.coinDecimals,
true
);
}, [fiatAmount, setAmountSafe, focused, swapState.priceState.price, type]);
}, [
fiatAmount,
setAmountSafe,
focused,
swapState.priceState.price,
type,
swapState.baseAsset?.coinDecimals,
]);

const toggleMax = useCallback(() => {
if (tab === "buy") {
Expand Down

0 comments on commit f4a50eb

Please sign in to comment.