diff --git a/packages/web/components/alert/info.tsx b/packages/web/components/alert/info.tsx
index e3519d31a7..8332b6a199 100644
--- a/packages/web/components/alert/info.tsx
+++ b/packages/web/components/alert/info.tsx
@@ -7,6 +7,7 @@ export const Info: FunctionComponent<
{ size?: "large" | "subtle" } & Alert & {
data?: string;
borderClassName?: string;
+ textClassName?: string;
} & CustomClasses &
MobileProps
> = ({
@@ -15,6 +16,7 @@ export const Info: FunctionComponent<
caption,
data,
borderClassName,
+ textClassName,
className,
isMobile = false,
}) =>
@@ -25,7 +27,14 @@ export const Info: FunctionComponent<
className
)}
>
- {message}
+
+ {message}
+
) : (
{isMobile ? (
-
+
{message}
{data && ` - ${data}`}
) : (
- {message}
+
+ {message}
+
)}
{caption && (
-
+
{caption}
)}
diff --git a/packages/web/components/complex/add-liquidity.tsx b/packages/web/components/complex/add-liquidity.tsx
index 1c867bf847..d3fc05f7e6 100644
--- a/packages/web/components/complex/add-liquidity.tsx
+++ b/packages/web/components/complex/add-liquidity.tsx
@@ -94,23 +94,6 @@ export const AddLiquidity: FunctionComponent<
key={currency.coinDenom}
className="flex flex-col gap-1 w-full md:p-3 p-4 border border-osmoverse-700 md:rounded-xl rounded-2xl"
>
- {isPeggedCurrency && (
-
- currency.originCurrency!.pegMechanism!.startsWith(vowel)
- )
- ? "an"
- : "a"
- } ${
- currency.originCurrency!.pegMechanism
- }-backed stablecoin.`}
- />
- )}
{addLiquidityConfig.isSingleAmountIn ? (
+ {isPeggedCurrency && (
+
+ )}
);
})}
diff --git a/packages/web/components/navbar/index.tsx b/packages/web/components/navbar/index.tsx
index fcb714134d..7ecfd5ad06 100644
--- a/packages/web/components/navbar/index.tsx
+++ b/packages/web/components/navbar/index.tsx
@@ -137,6 +137,7 @@ const NavBarButton: FunctionComponent<
src={hovered ? hovericonurl : iconurl}
height={24}
width={24}
+ priority={true}
/>
);
diff --git a/packages/web/components/table/cells/transfer-button.tsx b/packages/web/components/table/cells/transfer-button.tsx
index c88171766d..87b8a60d3d 100644
--- a/packages/web/components/table/cells/transfer-button.tsx
+++ b/packages/web/components/table/cells/transfer-button.tsx
@@ -102,6 +102,7 @@ const TransferButton: FunctionComponent<{
src="/icons/chevron-right-rust.svg"
height={13}
width={13}
+ priority={true}
/>
) : (
)}
diff --git a/packages/web/components/trade-clipboard/index.tsx b/packages/web/components/trade-clipboard/index.tsx
index c32b87bcdb..47b65052ef 100644
--- a/packages/web/components/trade-clipboard/index.tsx
+++ b/packages/web/components/trade-clipboard/index.tsx
@@ -30,991 +30,1003 @@ export const TradeClipboard: FunctionComponent<{
containerClassName?: string;
isInModal?: boolean;
-}> = observer(({ containerClassName, pools, isInModal }) => {
- const {
- chainStore,
- accountStore,
- queriesStore,
- assetsStore: { nativeBalances, ibcBalances },
- priceStore,
- } = useStore();
- const t = useTranslation();
- const { chainId } = chainStore.osmosis;
- const { isMobile } = useWindowSize();
- const { logEvent } = useAmplitudeAnalytics();
-
- const allTokenBalances = nativeBalances.concat(ibcBalances);
-
- const account = accountStore.getAccount(chainId);
- const queries = queriesStore.get(chainId);
-
- const [isSettingOpen, setIsSettingOpen] = useBooleanWithWindowEvent(false);
- const manualSlippageInputRef = useRef
(null);
-
- const slippageConfig = useSlippageConfig();
- const tradeTokenInConfig = useTradeTokenInConfig(
- chainStore,
- chainId,
- account.bech32Address,
- queriesStore,
- pools
- );
- // Some validators allow 0 fee tx.
- // Therefore, users can send tx at 0 fee even though they have no OSMO,
- // Users who have OSMO pay a fee by default so that tx is processed faster.
- let preferZeroFee = true;
- const queryOsmo = queries.queryBalances.getQueryBech32Address(
- account.bech32Address
- ).stakable;
- if (
- // If user has an OSMO 0.001 or higher, he pay the fee by default.
- queryOsmo.balance.toDec().gt(DecUtils.getTenExponentN(-3))
- ) {
- preferZeroFee = false;
- }
- const gasForecasted = (() => {
+ onRequestModalClose?: () => void;
+}> = observer(
+ ({ containerClassName, pools, isInModal, onRequestModalClose }) => {
+ const {
+ chainStore,
+ accountStore,
+ queriesStore,
+ assetsStore: { nativeBalances, ibcBalances },
+ priceStore,
+ } = useStore();
+ const t = useTranslation();
+ const { chainId } = chainStore.osmosis;
+ const { isMobile } = useWindowSize();
+ const { logEvent } = useAmplitudeAnalytics();
+
+ const allTokenBalances = nativeBalances.concat(ibcBalances);
+
+ const account = accountStore.getAccount(chainId);
+ const queries = queriesStore.get(chainId);
+
+ const [isSettingOpen, setIsSettingOpen] = useBooleanWithWindowEvent(false);
+ const manualSlippageInputRef = useRef(null);
+
+ const slippageConfig = useSlippageConfig();
+ const tradeTokenInConfig = useTradeTokenInConfig(
+ chainStore,
+ chainId,
+ account.bech32Address,
+ queriesStore,
+ pools
+ );
+ // Some validators allow 0 fee tx.
+ // Therefore, users can send tx at 0 fee even though they have no OSMO,
+ // Users who have OSMO pay a fee by default so that tx is processed faster.
+ let preferZeroFee = true;
+ const queryOsmo = queries.queryBalances.getQueryBech32Address(
+ account.bech32Address
+ ).stakable;
if (
- tradeTokenInConfig.optimizedRoutePaths.length === 0 ||
- tradeTokenInConfig.optimizedRoutePaths[0].pools.length <= 1
+ // If user has an OSMO 0.001 or higher, he pay the fee by default.
+ queryOsmo.balance.toDec().gt(DecUtils.getTenExponentN(-3))
) {
- return 250000;
+ preferZeroFee = false;
}
+ const gasForecasted = (() => {
+ if (
+ tradeTokenInConfig.optimizedRoutePaths.length === 0 ||
+ tradeTokenInConfig.optimizedRoutePaths[0].pools.length <= 1
+ ) {
+ return 250000;
+ }
- return 250000 * tradeTokenInConfig.optimizedRoutePaths[0].pools.length;
- })();
-
- const feeConfig = useFakeFeeConfig(
- chainStore,
- chainStore.osmosis.chainId,
- gasForecasted,
- preferZeroFee
- );
- tradeTokenInConfig.setFeeConfig(feeConfig);
-
- // show details
- const [showEstimateDetails, setShowEstimateDetails] = useState(false);
- const isEstimateDetailRelevant = !(
- tradeTokenInConfig.amount === "" || tradeTokenInConfig.amount === "0"
- );
- useEffect(() => {
- // auto collapse on input clear
- if (!isEstimateDetailRelevant) setShowEstimateDetails(false);
- }, [isEstimateDetailRelevant]);
-
- // auto focus from amount on token switch
- const fromAmountInput = useRef(null);
- useEffect(() => {
- fromAmountInput.current?.focus();
- }, [tradeTokenInConfig.sendCurrency]);
-
- useTokenSwapQueryParams(tradeTokenInConfig, allTokenBalances, isInModal);
-
- const showPriceImpactWarning = useMemo(
- () =>
- tradeTokenInConfig.expectedSwapResult.priceImpact
- .toDec()
- .gt(new Dec(0.1)),
- [tradeTokenInConfig.expectedSwapResult.priceImpact]
- );
-
- useEffect(() => {
- if (isSettingOpen && slippageConfig.isManualSlippage) {
- // Whenever the setting opened, give a focus to the input if the manual slippage setting mode is on.
- manualSlippageInputRef.current?.focus();
- }
- }, [isSettingOpen]);
-
- // token select dropdown
- const [showFromTokenSelectDropdown, setFromTokenSelectDropdownLocal] =
- useBooleanWithWindowEvent(false);
- const [showToTokenSelectDropdown, setToTokenSelectDropdownLocal] =
- useBooleanWithWindowEvent(false);
- const setOneTokenSelectOpen = (dropdown: "to" | "from") => {
- if (dropdown === "to") {
- setToTokenSelectDropdownLocal(true);
+ return 250000 * tradeTokenInConfig.optimizedRoutePaths[0].pools.length;
+ })();
+
+ const feeConfig = useFakeFeeConfig(
+ chainStore,
+ chainStore.osmosis.chainId,
+ gasForecasted,
+ preferZeroFee
+ );
+ tradeTokenInConfig.setFeeConfig(feeConfig);
+
+ // show details
+ const [showEstimateDetails, setShowEstimateDetails] = useState(false);
+ const isEstimateDetailRelevant = !(
+ tradeTokenInConfig.amount === "" || tradeTokenInConfig.amount === "0"
+ );
+ useEffect(() => {
+ // auto collapse on input clear
+ if (!isEstimateDetailRelevant) setShowEstimateDetails(false);
+ }, [isEstimateDetailRelevant]);
+
+ // auto focus from amount on token switch
+ const fromAmountInput = useRef(null);
+ useEffect(() => {
+ fromAmountInput.current?.focus();
+ }, [tradeTokenInConfig.sendCurrency]);
+
+ useTokenSwapQueryParams(tradeTokenInConfig, allTokenBalances, isInModal);
+
+ const showPriceImpactWarning = useMemo(
+ () =>
+ tradeTokenInConfig.expectedSwapResult.priceImpact
+ .toDec()
+ .gt(new Dec(0.1)),
+ [tradeTokenInConfig.expectedSwapResult.priceImpact]
+ );
+
+ useEffect(() => {
+ if (isSettingOpen && slippageConfig.isManualSlippage) {
+ // Whenever the setting opened, give a focus to the input if the manual slippage setting mode is on.
+ manualSlippageInputRef.current?.focus();
+ }
+ }, [isSettingOpen]);
+
+ // token select dropdown
+ const [showFromTokenSelectDropdown, setFromTokenSelectDropdownLocal] =
+ useBooleanWithWindowEvent(false);
+ const [showToTokenSelectDropdown, setToTokenSelectDropdownLocal] =
+ useBooleanWithWindowEvent(false);
+ const setOneTokenSelectOpen = (dropdown: "to" | "from") => {
+ if (dropdown === "to") {
+ setToTokenSelectDropdownLocal(true);
+ setFromTokenSelectDropdownLocal(false);
+ } else {
+ setFromTokenSelectDropdownLocal(true);
+ setToTokenSelectDropdownLocal(false);
+ }
+ };
+ const closeTokenSelectDropdowns = () => {
setFromTokenSelectDropdownLocal(false);
- } else {
- setFromTokenSelectDropdownLocal(true);
setToTokenSelectDropdownLocal(false);
- }
- };
- const closeTokenSelectDropdowns = () => {
- setFromTokenSelectDropdownLocal(false);
- setToTokenSelectDropdownLocal(false);
- };
-
- // trade metrics
- const minOutAmountLessSlippage = useMemo(
- () =>
- tradeTokenInConfig.expectedSwapResult.amount
- .toDec()
- .mul(new Dec(1).sub(slippageConfig.slippage.toDec())),
- [tradeTokenInConfig.expectedSwapResult.amount, slippageConfig.slippage]
- );
- const spotPrice = useMemo(
- () =>
- tradeTokenInConfig.beforeSpotPriceWithoutSwapFeeOutOverIn
- .trim(true)
- .maxDecimals(tradeTokenInConfig.outCurrency.coinDecimals),
- [
- tradeTokenInConfig.beforeSpotPriceWithoutSwapFeeOutOverIn,
- tradeTokenInConfig.outCurrency,
- ]
- );
-
- const [isHoveringSwitchButton, setHoveringSwitchButton] = useState(false);
-
- // to & from box switch animation
- const [isAnimatingSwitch, setIsAnimatingSwitch] = useState(false);
- const [switchOutBack, setSwitchOutBack] = useState(false);
- useEffect(() => {
- let timeout: NodeJS.Timeout | undefined;
- let timeout2: NodeJS.Timeout | undefined;
- const duration = 300;
-
- if (isAnimatingSwitch) {
- timeout = setTimeout(() => {
- setIsAnimatingSwitch(false);
- setSwitchOutBack(false);
- }, duration);
- timeout2 = setTimeout(() => {
- tradeTokenInConfig.switchInAndOut();
- setSwitchOutBack(true);
- }, duration / 3);
- }
-
- return () => {
- if (timeout) clearTimeout(timeout);
- if (timeout2) clearTimeout(timeout2);
};
- }, [isAnimatingSwitch, tradeTokenInConfig]);
-
- // amount fiat value
- const inAmountValue = useMemo(
- () =>
- tradeTokenInConfig.amount !== "" &&
- new Dec(tradeTokenInConfig.amount).gt(new Dec(0))
- ? priceStore.calculatePrice(
- new CoinPretty(
- tradeTokenInConfig.sendCurrency,
- new Dec(tradeTokenInConfig.amount).mul(
- DecUtils.getTenExponentNInPrecisionRange(
- tradeTokenInConfig.sendCurrency.coinDecimals
+
+ // trade metrics
+ const minOutAmountLessSlippage = useMemo(
+ () =>
+ tradeTokenInConfig.expectedSwapResult.amount
+ .toDec()
+ .mul(new Dec(1).sub(slippageConfig.slippage.toDec())),
+ [tradeTokenInConfig.expectedSwapResult.amount, slippageConfig.slippage]
+ );
+ const spotPrice = useMemo(
+ () =>
+ tradeTokenInConfig.beforeSpotPriceWithoutSwapFeeOutOverIn
+ .trim(true)
+ .maxDecimals(tradeTokenInConfig.outCurrency.coinDecimals),
+ [
+ tradeTokenInConfig.beforeSpotPriceWithoutSwapFeeOutOverIn,
+ tradeTokenInConfig.outCurrency,
+ ]
+ );
+
+ const [isHoveringSwitchButton, setHoveringSwitchButton] = useState(false);
+
+ // to & from box switch animation
+ const [isAnimatingSwitch, setIsAnimatingSwitch] = useState(false);
+ const [switchOutBack, setSwitchOutBack] = useState(false);
+ useEffect(() => {
+ let timeout: NodeJS.Timeout | undefined;
+ let timeout2: NodeJS.Timeout | undefined;
+ const duration = 300;
+
+ if (isAnimatingSwitch) {
+ timeout = setTimeout(() => {
+ setIsAnimatingSwitch(false);
+ setSwitchOutBack(false);
+ }, duration);
+ timeout2 = setTimeout(() => {
+ tradeTokenInConfig.switchInAndOut();
+ setSwitchOutBack(true);
+ }, duration / 3);
+ }
+
+ return () => {
+ if (timeout) clearTimeout(timeout);
+ if (timeout2) clearTimeout(timeout2);
+ };
+ }, [isAnimatingSwitch, tradeTokenInConfig]);
+
+ // amount fiat value
+ const inAmountValue = useMemo(
+ () =>
+ tradeTokenInConfig.amount !== "" &&
+ new Dec(tradeTokenInConfig.amount).gt(new Dec(0))
+ ? priceStore.calculatePrice(
+ new CoinPretty(
+ tradeTokenInConfig.sendCurrency,
+ new Dec(tradeTokenInConfig.amount).mul(
+ DecUtils.getTenExponentNInPrecisionRange(
+ tradeTokenInConfig.sendCurrency.coinDecimals
+ )
)
)
)
+ : undefined,
+ [tradeTokenInConfig.amount, tradeTokenInConfig.sendCurrency]
+ );
+ const outAmountValue = useMemo(
+ () =>
+ (!tradeTokenInConfig.expectedSwapResult.amount.toDec().isZero() &&
+ priceStore.calculatePrice(
+ tradeTokenInConfig.expectedSwapResult.amount
+ )) ||
+ undefined,
+ [tradeTokenInConfig.expectedSwapResult.amount]
+ );
+
+ const swapResultAmount = useMemo(
+ () =>
+ tradeTokenInConfig.expectedSwapResult.amount
+ .trim(true)
+ .shrink(true)
+ .maxDecimals(
+ Math.min(
+ tradeTokenInConfig.expectedSwapResult.amount.currency
+ .coinDecimals,
+ 8
+ )
)
- : undefined,
- [tradeTokenInConfig.amount, tradeTokenInConfig.sendCurrency]
- );
- const outAmountValue = useMemo(
- () =>
- (!tradeTokenInConfig.expectedSwapResult.amount.toDec().isZero() &&
- priceStore.calculatePrice(
- tradeTokenInConfig.expectedSwapResult.amount
- )) ||
- undefined,
- [tradeTokenInConfig.expectedSwapResult.amount]
- );
-
- const swapResultAmount = useMemo(
- () =>
- tradeTokenInConfig.expectedSwapResult.amount
- .trim(true)
- .shrink(true)
- .maxDecimals(
- Math.min(
- tradeTokenInConfig.expectedSwapResult.amount.currency.coinDecimals,
- 8
- )
- )
- .hideDenom(true)
- .toString(),
- [tradeTokenInConfig.expectedSwapResult.amount]
- );
-
- // user action
- const swap = async () => {
- if (account.walletStatus !== WalletStatus.Loaded) {
- return account.init();
- }
- if (tradeTokenInConfig.optimizedRoutePaths.length > 0) {
- const routes: {
- poolId: string;
- tokenOutCurrency: Currency;
- }[] = [];
-
- for (
- let i = 0;
- i < tradeTokenInConfig.optimizedRoutePaths[0].pools.length;
- i++
- ) {
- const pool = tradeTokenInConfig.optimizedRoutePaths[0].pools[i];
- const tokenOutCurrency = chainStore.osmosisObservable.currencies.find(
+ .hideDenom(true)
+ .toString(),
+ [tradeTokenInConfig.expectedSwapResult.amount]
+ );
+
+ // user action
+ const swap = async () => {
+ if (account.walletStatus !== WalletStatus.Loaded) {
+ return account.init();
+ }
+ if (tradeTokenInConfig.optimizedRoutePaths.length > 0) {
+ const routes: {
+ poolId: string;
+ tokenOutCurrency: Currency;
+ }[] = [];
+
+ for (
+ let i = 0;
+ i < tradeTokenInConfig.optimizedRoutePaths[0].pools.length;
+ i++
+ ) {
+ const pool = tradeTokenInConfig.optimizedRoutePaths[0].pools[i];
+ const tokenOutCurrency = chainStore.osmosisObservable.currencies.find(
+ (cur) =>
+ cur.coinMinimalDenom ===
+ tradeTokenInConfig.optimizedRoutePaths[0].tokenOutDenoms[i]
+ );
+
+ if (!tokenOutCurrency) {
+ tradeTokenInConfig.setError(
+ new Error(
+ t("swap.error.findCurrency", {
+ currency:
+ tradeTokenInConfig.optimizedRoutePaths[0].tokenOutDenoms[i],
+ })
+ )
+ );
+ return;
+ }
+
+ routes.push({
+ poolId: pool.id,
+ tokenOutCurrency,
+ });
+ }
+
+ const tokenInCurrency = chainStore.osmosisObservable.currencies.find(
(cur) =>
cur.coinMinimalDenom ===
- tradeTokenInConfig.optimizedRoutePaths[0].tokenOutDenoms[i]
+ tradeTokenInConfig.optimizedRoutePaths[0].tokenInDenom
);
- if (!tokenOutCurrency) {
+ if (!tokenInCurrency) {
tradeTokenInConfig.setError(
new Error(
t("swap.error.findCurrency", {
currency:
- tradeTokenInConfig.optimizedRoutePaths[0].tokenOutDenoms[i],
+ tradeTokenInConfig.optimizedRoutePaths[0].tokenInDenom,
})
)
);
return;
}
- routes.push({
- poolId: pool.id,
- tokenOutCurrency,
- });
- }
+ const tokenIn = {
+ currency: tokenInCurrency,
+ amount: tradeTokenInConfig.amount,
+ };
+ const maxSlippage = slippageConfig.slippage.symbol("").toString();
- const tokenInCurrency = chainStore.osmosisObservable.currencies.find(
- (cur) =>
- cur.coinMinimalDenom ===
- tradeTokenInConfig.optimizedRoutePaths[0].tokenInDenom
- );
-
- if (!tokenInCurrency) {
- tradeTokenInConfig.setError(
- new Error(
- t("swap.error.findCurrency", {
- currency: tradeTokenInConfig.optimizedRoutePaths[0].tokenInDenom,
- })
- )
- );
- return;
- }
-
- const tokenIn = {
- currency: tokenInCurrency,
- amount: tradeTokenInConfig.amount,
- };
- const maxSlippage = slippageConfig.slippage.symbol("").toString();
-
- try {
- logEvent([
- EventName.Swap.swapStarted,
- {
- fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
- tokenAmount: Number(tokenIn.amount),
- toToken: tradeTokenInConfig.outCurrency.coinDenom,
- isOnHome: !isInModal,
- isMultiHop: routes.length !== 1,
- },
- ]);
- if (routes.length === 1) {
- await account.osmosis.sendSwapExactAmountInMsg(
- routes[0].poolId,
- tokenIn,
- routes[0].tokenOutCurrency,
- maxSlippage,
- "",
- {
- amount: [
- {
- denom: chainStore.osmosis.stakeCurrency.coinMinimalDenom,
- amount: "0",
- },
- ],
- },
+ try {
+ logEvent([
+ EventName.Swap.swapStarted,
{
- preferNoSetFee: preferZeroFee,
+ fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
+ tokenAmount: Number(tokenIn.amount),
+ toToken: tradeTokenInConfig.outCurrency.coinDenom,
+ isOnHome: !isInModal,
+ isMultiHop: routes.length !== 1,
},
- () => {
- logEvent([
- EventName.Swap.swapCompleted,
- {
- fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
- tokenAmount: Number(tokenIn.amount),
- toToken: tradeTokenInConfig.outCurrency.coinDenom,
- isOnHome: !isInModal,
+ ]);
+ if (routes.length === 1) {
+ await account.osmosis.sendSwapExactAmountInMsg(
+ routes[0].poolId,
+ tokenIn,
+ routes[0].tokenOutCurrency,
+ maxSlippage,
+ "",
+ {
+ amount: [
+ {
+ denom: chainStore.osmosis.stakeCurrency.coinMinimalDenom,
+ amount: "0",
+ },
+ ],
+ },
+ {
+ preferNoSetFee: preferZeroFee,
+ },
+ () => {
+ logEvent([
+ EventName.Swap.swapCompleted,
+ {
+ fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
+ tokenAmount: Number(tokenIn.amount),
+ toToken: tradeTokenInConfig.outCurrency.coinDenom,
+ isOnHome: !isInModal,
- isMultiHop: false,
- },
- ]);
- }
- );
- } else {
- await account.osmosis.sendMultihopSwapExactAmountInMsg(
- routes,
- tokenIn,
- maxSlippage,
- "",
- {
- amount: [
- {
- denom: chainStore.osmosis.stakeCurrency.coinMinimalDenom,
- amount: "0",
- },
- ],
- },
- {
- preferNoSetFee: preferZeroFee,
- },
- () => {
- logEvent([
- EventName.Swap.swapCompleted,
- {
- fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
- tokenAmount: Number(tokenIn.amount),
- toToken: tradeTokenInConfig.outCurrency.coinDenom,
- isOnHome: !isInModal,
- isMultiHop: true,
- },
- ]);
- }
- );
+ isMultiHop: false,
+ },
+ ]);
+ }
+ );
+ } else {
+ await account.osmosis.sendMultihopSwapExactAmountInMsg(
+ routes,
+ tokenIn,
+ maxSlippage,
+ "",
+ {
+ amount: [
+ {
+ denom: chainStore.osmosis.stakeCurrency.coinMinimalDenom,
+ amount: "0",
+ },
+ ],
+ },
+ {
+ preferNoSetFee: preferZeroFee,
+ },
+ () => {
+ logEvent([
+ EventName.Swap.swapCompleted,
+ {
+ fromToken: tradeTokenInConfig.sendCurrency.coinDenom,
+ tokenAmount: Number(tokenIn.amount),
+ toToken: tradeTokenInConfig.outCurrency.coinDenom,
+ isOnHome: !isInModal,
+ isMultiHop: true,
+ },
+ ]);
+ }
+ );
+ }
+ tradeTokenInConfig.setAmount("");
+ tradeTokenInConfig.setFraction(undefined);
+ } catch (e) {
+ console.error(e);
+ } finally {
+ onRequestModalClose?.();
}
- tradeTokenInConfig.setAmount("");
- tradeTokenInConfig.setFraction(undefined);
- } catch (e) {
- console.error(e);
}
- }
- };
-
- return (
-
-
-
{t("swap.title")}
-
- {isSettingOpen && (
-
e.stopPropagation()}
+ };
+
+ return (
+
+
+
{t("swap.title")}
+