fix token namings for the claims area

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-08-11 20:41:17 +03:00
parent 4b1c91b144
commit 3348a99155
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
4 changed files with 14 additions and 7 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ghost-dao-interface", "name": "ghost-dao-interface",
"private": true, "private": true,
"version": "0.2.1", "version": "0.2.2",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@ -22,7 +22,13 @@ const ClaimConfirmationModal = (props) => {
await forfeit(props.chainId, props.receiver); await forfeit(props.chainId, props.receiver);
break; break;
case "CLAIM": case "CLAIM":
await claim(props.chainId, props.receiver, props.outputToken === "STNK" || props.outputToken === "sCSPR"); await claim(
props.chainId,
props.receiver,
props.outputToken === props.stnkSymbol,
props.stnkSymbol,
props.ghstSymbol
);
break; break;
default: default:
console.log("Unknown action") console.log("Unknown action")
@ -55,7 +61,7 @@ const ClaimConfirmationModal = (props) => {
/> />
<Box display="flex" flexDirection="row" justifyContent="center"> <Box display="flex" flexDirection="row" justifyContent="center">
<Typography> <Typography>
{props.outputTokenName} {props.outputToken}
</Typography> </Typography>
</Box> </Box>
</Box> </Box>

View File

@ -88,8 +88,9 @@ export const ClaimsArea = ({ chainId, address, epoch }) => {
chainid={chainId} chainid={chainId}
receiver={address} receiver={address}
receiveAmount={claim.expiry > epoch.number ? claim.deposit : isPayoutGhst ? balanceForShares.div(currentIndex) : balanceForShares} receiveAmount={claim.expiry > epoch.number ? claim.deposit : isPayoutGhst ? balanceForShares.div(currentIndex) : balanceForShares}
outputToken={claim.expiry > epoch.number ? "FTSO" : isPayoutGhst ? "GHST" : "STNK"} outputToken={claim.expiry > epoch.number ? ftsoSymbol : isPayoutGhst ? ghstSymbol : stnkSymbol}
outputTokenName={claim.expiry > epoch.number ? ftsoSymbol : isPayoutGhst ? ghstSymbol : stnkSymbol} stnkSymbol={stnkSymbol}
ghstSymbol={ghstSymbol}
action={claim.expiry > epoch.number ? "forfeit" : "claim"} action={claim.expiry > epoch.number ? "forfeit" : "claim"}
chainId={chainId} chainId={chainId}
/> />

View File

@ -170,11 +170,11 @@ export const forfeit = async (chainId, account) => {
); );
} }
export const claim = async (chainId, account, isStnk) => { export const claim = async (chainId, account, isStnk, stnkSymbol, ghstSymbol) => {
const args = [account, isStnk]; const args = [account, isStnk];
const messages = { const messages = {
replacedMsg: "Claim transaction was replaced. Wait for inclusion please.", replacedMsg: "Claim transaction was replaced. Wait for inclusion please.",
successMsg: `${isStnk ? "STNK" : "GHST"} tokens claimed successfully to ${shorten(account)}.`, successMsg: `${isStnk ? stnkSymbol : ghstSymbol} tokens claimed successfully to ${shorten(account)}.`,
errorMsg: "Claim transaction failed. Check logs for error detalization.", errorMsg: "Claim transaction failed. Check logs for error detalization.",
}; };
await executeOnChainTransaction( await executeOnChainTransaction(