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",
"private": true,
"version": "0.2.1",
"version": "0.2.2",
"type": "module",
"scripts": {
"dev": "vite",

View File

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

View File

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