From 6213504ef3504214b004192e757e05f2daf0614a Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Thu, 26 Mar 2026 21:02:45 +0300 Subject: [PATCH] do not show STNK token on the UI Signed-off-by: Uncle Fatso --- package.json | 2 +- src/components/TopBar/Wallet/Token.tsx | 19 +-------- src/containers/Bond/components/ClaimBonds.jsx | 29 +------------ src/containers/Dex/TokenModal.jsx | 11 +---- src/containers/Stake/Stake.jsx | 15 +------ .../Stake/components/ClaimsArea.jsx | 23 +---------- .../components/TokenInfo.jsx | 41 +++++-------------- 7 files changed, 17 insertions(+), 123 deletions(-) diff --git a/package.json b/package.json index dea473c..4bae5e3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.6.12", + "version": "0.6.13", "type": "module", "scripts": { "dev": "vite", diff --git a/src/components/TopBar/Wallet/Token.tsx b/src/components/TopBar/Wallet/Token.tsx index b08c82d..ceff48d 100644 --- a/src/components/TopBar/Wallet/Token.tsx +++ b/src/components/TopBar/Wallet/Token.tsx @@ -27,7 +27,6 @@ import { useNativePrice, useReservePrice, useFtsoPrice, - useStnkPrice, useGhstPrice } from "../../../hooks/prices"; import { useLpValuation } from "../../../hooks/treasury"; @@ -178,11 +177,6 @@ export const useWallet = (chainId, userAddress) => { refetch: ftsoRefetch, contractAddress: ftsoAddress, } = useBalance(chainId, "FTSO", userAddress); - const { - balance: stnkBalance, - refetch: stnkRefetch, - contractAddress: stnkAddress, - } = useBalance(chainId, "STNK", userAddress); const { balance: ghstBalance, refetch: ghstRefetch, @@ -200,7 +194,6 @@ export const useWallet = (chainId, userAddress) => { const nativePrice = useNativePrice(chainId); const reservePrice = useReservePrice(chainId); const ftsoPrice = useFtsoPrice(chainId); - const stnkPrice = useStnkPrice(chainId); const ghstPrice = useGhstPrice(chainId); const lpReserveFtsoPrice = useLpValuation(chainId, "RESERVE_FTSO", 1000000000000000000n); @@ -209,7 +202,6 @@ export const useWallet = (chainId, userAddress) => { const nativeSymbol = config?.getClient()?.chain?.nativeCurrency?.symbol; const { symbol: reserveSymbol } = useTokenSymbol(chainId, "RESERVE"); const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO"); - const { symbol: stnkSymbol } = useTokenSymbol(chainId, "STNK"); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); const { symbol: lpReserveFtsoSymbol } = useTokenSymbol(chainId, "RESERVE_FTSO"); @@ -256,15 +248,6 @@ export const useWallet = (chainId, userAddress) => { externalUrl: "https://ghostchain.io/wp-content/uploads/2025/03/eGHST.svg", refetch: ftsoRefetch, }, - stnk: { - symbol: stnkSymbol, - address: stnkAddress, - balance: stnkBalance, - price: stnkPrice, - icons: ["STNK"], - externalUrl: "https://ghostchain.io/wp-content/uploads/2025/03/sGHST.svg", - refetch: stnkRefetch, - }, ghst: { symbol: ghstSymbol, address: ghstAddress, @@ -299,7 +282,7 @@ export const useWallet = (chainId, userAddress) => { export const Tokens = ({ address, tokens, onClose }) => { const [expanded, setExpanded] = useState(null); - const alwaysShowTokens = [tokens.native, tokens.reserve, tokens.ftso, tokens.stnk, tokens.ghst, tokens.reserveFtso]; + const alwaysShowTokens = [tokens.native, tokens.reserve, tokens.ftso, tokens.ghst, tokens.reserveFtso]; const tokenProps = (token) => ({ ...token, diff --git a/src/containers/Bond/components/ClaimBonds.jsx b/src/containers/Bond/components/ClaimBonds.jsx index 1874ff6..3590649 100644 --- a/src/containers/Bond/components/ClaimBonds.jsx +++ b/src/containers/Bond/components/ClaimBonds.jsx @@ -26,10 +26,7 @@ export const ClaimBonds = ({ chainId, address, secondsTo }) => { const [isPending, setIsPending] = useState(false); const [isWarmup, setIsWapmup] = useState(false); const [isPreClaimConfirmed, setPreClaimConfirmed] = useState(false); - const [isPayoutGhst, setIsPayoutGhst] = useState(localStorage.getItem("bond-isGhstPayout") - ? localStorage.getItem("bond-isGhstPayout") === "true" - : true - ); + const [isPayoutGhst, _] = useState(true); const { epoch } = useEpoch(chainId); const { warmupExists } = useWarmupLength(chainId); @@ -39,7 +36,6 @@ export const ClaimBonds = ({ chainId, address, secondsTo }) => { const { notes, refetch: notesRefetch } = useNotes(chainId, address); const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO"); - const { symbol: stnkSymbol } = useTokenSymbol(chainId, "STNK"); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); if (!notes || notes.length === 0) return null; @@ -52,11 +48,6 @@ export const ClaimBonds = ({ chainId, address, secondsTo }) => { 18 ); - const setIsPayoutGhstInner = (value) => { - setIsPayoutGhst(value); - localStorage.setItem("bond-isGhstPayout", value); - } - const onSubmit = async (indexes) => { const isFundsInWarmup = warmupInfo.deposit._value > 0n; if (warmupExists && isFundsInWarmup && !isPreClaimConfirmed) { @@ -94,24 +85,6 @@ export const ClaimBonds = ({ chainId, address, secondsTo }) => { } > - - - Payout Options - - setIsPayoutGhstInner(view === 1)} - TabIndicatorProps={{ style: { display: "none" } }} - > - - - - - diff --git a/src/containers/Dex/TokenModal.jsx b/src/containers/Dex/TokenModal.jsx index 7bb847e..a66d22e 100644 --- a/src/containers/Dex/TokenModal.jsx +++ b/src/containers/Dex/TokenModal.jsx @@ -24,7 +24,6 @@ import { isNetworkLegacy } from "../../constants"; import { RESERVE_ADDRESSES, FTSO_ADDRESSES, - STNK_ADDRESSES, GHST_ADDRESSES, EMPTY_ADDRESS } from "../../constants/addresses"; @@ -48,12 +47,10 @@ const TokenModal = ({ chainId, account, chainSymbol, listOpen, setListOpen, setT const { balance: nativeBalance } = useBalance(chainId, chainSymbol, account); const { balance: reserveBalance } = useBalance(chainId, "RESERVE", account); const { balance: ftsoBalance } = useBalance(chainId, "FTSO", account); - const { balance: stnkBalance } = useBalance(chainId, "STNK", account); const { balance: ghstBalance } = useBalance(chainId, "GHST", account); const { symbol: reserveSymbol } = useTokenSymbol(chainId, "RESERVE"); const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO"); - const { symbol: stnkSymbol } = useTokenSymbol(chainId, "STNK"); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); const searchToken = useMemo(() => { @@ -85,12 +82,6 @@ const TokenModal = ({ chainId, account, chainSymbol, listOpen, setListOpen, setT balance: ftsoBalance, address: FTSO_ADDRESSES[chainId] }, - { - name: stnkSymbol, - icons: ["STNK"], - balance: stnkBalance, - address: STNK_ADDRESSES[chainId] - }, { name: ghstSymbol, icons: ["GHST"], @@ -98,7 +89,7 @@ const TokenModal = ({ chainId, account, chainSymbol, listOpen, setListOpen, setT address: GHST_ADDRESSES[chainId] } ] - }, [reserveSymbol, ftsoSymbol, stnkSymbol, ghstSymbol, reserveBalance, ftsoBalance, stnkBalance, ghstBalance]); + }, [reserveSymbol, ftsoSymbol, ghstSymbol, reserveBalance, ftsoBalance, ghstBalance]); useEffect(() => { if (isAddress(userInput)) { diff --git a/src/containers/Stake/Stake.jsx b/src/containers/Stake/Stake.jsx index e099349..9162a51 100644 --- a/src/containers/Stake/Stake.jsx +++ b/src/containers/Stake/Stake.jsx @@ -19,7 +19,6 @@ const Stake = ({ chainId, address, isOpened, closeModal, connect }) => { const [settingsModalOpen, setSettingsModalOpen] = useState(false); const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO"); - const { symbol: stnkSymbol } = useTokenSymbol(chainId, "STNK"); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); const [upperToken, setUpperToken] = useState(ftsoSymbol); @@ -31,28 +30,16 @@ const Stake = ({ chainId, address, isOpened, closeModal, connect }) => { useEffect(() => { switch (true) { - case (upperToken === ftsoSymbol && bottomToken === stnkSymbol): - setAction("STAKE") - break; case (upperToken === ftsoSymbol && bottomToken === ghstSymbol): setAction("STAKE") break; - case (upperToken === stnkSymbol && bottomToken === ftsoSymbol): - setAction("UNSTAKE") - break; case (upperToken === ghstSymbol && bottomToken === ftsoSymbol): setAction("UNSTAKE") break; - case (upperToken === stnkSymbol && bottomToken === ghstSymbol): - setAction("WRAP") - break; - case (upperToken === ghstSymbol && bottomToken === stnkSymbol): - setAction("UNWRAP") - break; default: setAction("STAKE") } - }, [upperToken, bottomToken]) + }, [ftsoSymbol, ghstSymbol, upperToken, bottomToken]) return ( { const isSmallScreen = useMediaQuery("(max-width: 745px)"); const [confirmationModalOpen, setConfirmationModalOpen] = useState(false); - const [isPayoutGhst, setIsPayoutGhst] = useState(localStorage.getItem("stake-isGhstPayout") - ? localStorage.getItem("stake-isGhstPayout") - : false - ); + const [isPayoutGhst, _] = useState(true); const { warmupInfo: claim, refetch: claimRefetch } = useWarmupInfo(chainId, address); const { currentIndex, refetch: currentIndexRefetch } = useCurrentIndex(chainId); @@ -73,11 +69,6 @@ export const ClaimsArea = ({ chainId, address, epoch }) => { if (claim.shares === 0n) return <>; - const setIsPayoutGhstInner = (value) => { - setIsPayoutGhst(value); - localStorage.setItem("bond-isGhstPayout", value); - } - const warmupTooltip = `Your claim earns rebases during warmup. You can emergency withdraw, but this forfeits the rebases`; return ( @@ -106,18 +97,6 @@ export const ClaimsArea = ({ chainId, address, epoch }) => { flexDirection={isSmallScreen ? "column" : "row"} > Your active {isPayoutGhst ? ghstSymbol : stnkSymbol} claim - setIsPayoutGhstInner(view === 1)} - TabIndicatorProps={{ style: { display: "none" } }} - > - - - } tooltip={warmupTooltip} diff --git a/src/containers/TreasuryDashboard/components/TokenInfo.jsx b/src/containers/TreasuryDashboard/components/TokenInfo.jsx index d0d8234..d7b98c7 100644 --- a/src/containers/TreasuryDashboard/components/TokenInfo.jsx +++ b/src/containers/TreasuryDashboard/components/TokenInfo.jsx @@ -11,7 +11,6 @@ import { isNetworkLegacy } from "../../../constants" import { useBalance, useTokenSymbol } from "../../../hooks/tokens"; import { useFtsoPrice, - useStnkPrice, useGhstPrice, useReservePrice, useNativePrice, @@ -88,18 +87,15 @@ const TokenInfo = ({ chainId, isMobileScreen }) => { const nativePrice = useNativePrice(chainId); const ftsoPrice = useFtsoPrice(chainId); - const stnkPrice = useStnkPrice(chainId); const ghstPrice = useGhstPrice(chainId); const reservePrice = useReservePrice(chainId); const { symbol: reserveSymbol } = useTokenSymbol(chainId, "RESERVE"); const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO"); - const { symbol: stnkSymbol } = useTokenSymbol(chainId, "STNK"); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); const { data: nativeBalance } = useBalanceNative({ address }); const { balance: ftsoBalance, contractAddress: ftsoAddress } = useBalance(chainId, "FTSO", address); - const { balance: stnkBalance, contractAddress: stnkAddress } = useBalance(chainId, "STNK", address); const { balance: ghstBalance, contractAddress: ghstAddress } = useBalance(chainId, "GHST", address); const { balance: reserveBalance, contractAddress: reserveAddress } = useBalance(chainId, "RESERVE", address); @@ -119,19 +115,6 @@ const TokenInfo = ({ chainId, isMobileScreen }) => { price={ftsoPrice} description={`${ftsoSymbol} is the native token of the ghostDAO protocol, fully backed by stablecoin reserves held in the ghostDAO treasury.`} /> - { price={ghstPrice} description={`${ghstSymbol} is the governance token enabling pure Web3 cross-chain magic. 1 ${ghstSymbol} = 1 ${ftsoSymbol} x Current Index.`} /> + {!isNetworkLegacy(chainId) && ( + + )} { } /> - {!isNetworkLegacy(chainId) && ( - - - - )} ) }