+
From
+
+
{address && wallet && isSourceWalletConnected ? (
{
)}
+
-
+
);
diff --git a/src/components/TransactionDialog/TransactionDialogContent.tsx b/src/components/TransactionDialog/TransactionDialogContent.tsx
index 4c91f17a..0cc4f1fa 100644
--- a/src/components/TransactionDialog/TransactionDialogContent.tsx
+++ b/src/components/TransactionDialog/TransactionDialogContent.tsx
@@ -6,6 +6,7 @@ import { FC, Fragment, useMemo, useState } from "react";
import { useAccount } from "wagmi";
import { Chain, useChains } from "@/api/queries";
+import { useSettingsStore } from "@/context/settings";
import { useToast } from "@/context/toast";
import {
addTxHistory,
@@ -139,6 +140,7 @@ const TransactionDialogContent: FC
= ({
route,
userAddresses,
validateGasBalance: true,
+ slippageTolerancePercent: useSettingsStore.getState().slippage,
getCosmosSigner: async (chainID) => {
const chain = chains.find((c) => c.chainID === chainID);
if (!chain) {
diff --git a/src/context/disclosures.ts b/src/context/disclosures.ts
index 3ba73704..0fccef2a 100644
--- a/src/context/disclosures.ts
+++ b/src/context/disclosures.ts
@@ -2,6 +2,7 @@ import { create } from "zustand";
const defaultValues = {
historyDialog: false,
+ settingsDialog: false,
// TODO: port dialogs to new system
// assetSelect: false,
diff --git a/src/context/settings.ts b/src/context/settings.ts
new file mode 100644
index 00000000..8550f259
--- /dev/null
+++ b/src/context/settings.ts
@@ -0,0 +1,16 @@
+import { create } from "zustand";
+import { persist } from "zustand/middleware";
+
+interface SettingsStore {
+ slippage: string;
+}
+
+export const defaultValues: SettingsStore = {
+ slippage: "3",
+};
+
+export const useSettingsStore = create()(
+ persist(() => defaultValues, {
+ name: "SettingsStore",
+ }),
+);
diff --git a/src/styles/globals.css b/src/styles/globals.css
index 79949617..880d3f90 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -2,19 +2,26 @@
@tailwind components;
@tailwind utilities;
+.number-input-arrows-hide::-webkit-outer-spin-button,
+.number-input-arrows-hide::-webkit-inner-spin-button,
+.number-input-arrows-hide {
+ -webkit-appearance: none;
+ margin: 0;
+ -moz-appearance: textfield !important;
+}
+
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
/* For IE, Edge and Firefox */
.scrollbar-hide {
- -ms-overflow-style: none; /* IE and Edge */
- scrollbar-width: none; /* Firefox */
+ -ms-overflow-style: none; /* IE and Edge */
+ scrollbar-width: none; /* Firefox */
}
-.DialogContent[data-state='open'] {
+.DialogContent[data-state="open"] {
animation: fadeIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
-
}
.TooltipContent {
@@ -22,25 +29,25 @@
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
-.TooltipContent[data-side='top'] {
+.TooltipContent[data-side="top"] {
animation-name: slideUp;
}
-.TooltipContent[data-side='bottom'] {
+.TooltipContent[data-side="bottom"] {
animation-name: slideDown;
}
-.ToastRoot[data-state='open'] {
+.ToastRoot[data-state="open"] {
animation: slideUp 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
-.ToastRoot[data-state='closed'] {
+.ToastRoot[data-state="closed"] {
animation: swipeOut 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeIn {
from {
opacity: 0;
- scale: 0.90;
+ scale: 0.9;
}
to {
scale: 1;
@@ -48,7 +55,6 @@
}
}
-
@keyframes slideDown {
from {
/* opacity: 0; */
@@ -89,4 +95,4 @@
to {
transform: translateX(-142px);
}
-}
\ No newline at end of file
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index bb48c9d9..963b0e69 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,4 +1,4 @@
-// eslint-disable-next-line @typescript-eslint/no-var-requires
+/* eslint-disable @typescript-eslint/no-var-requires */
const plugin = require("tailwindcss/plugin");
/** @type {import('tailwindcss').Config} */