From 89ee3d0223054349b1c2dda581298d046ddf603a Mon Sep 17 00:00:00 2001 From: Griko Nibras Date: Sat, 4 Nov 2023 04:10:05 +0700 Subject: [PATCH] =?UTF-8?q?chore:=20slippage=20=E2=86=92=20max=20slippage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AssetInput.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/AssetInput.tsx b/src/components/AssetInput.tsx index 855615e9..ca439ca5 100644 --- a/src/components/AssetInput.tsx +++ b/src/components/AssetInput.tsx @@ -9,6 +9,8 @@ import { getFee, useBalancesByChain } from "@/utils/utils"; import AssetSelect from "./AssetSelect"; import ChainSelect from "./ChainSelect"; +import { useSettingsStore } from "@/context/settings"; +import { disclosure } from "@/context/disclosures"; interface Props { amount: string; @@ -77,6 +79,8 @@ const AssetInput: FC = ({ return selectedAssetBalance === "0.0"; }, [selectedAssetBalance]); + const { slippage } = useSettingsStore(); + return (
@@ -109,6 +113,14 @@ const AssetInput: FC = ({ {amount}

)} + {!onAmountChange && amount !== "0.0" && ( + + )} {onAmountChange && (