diff --git a/package.json b/package.json index af43f29..5c85efb 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.2.1", + "version": "0.2.2", "type": "module", "scripts": { "dev": "vite", diff --git a/src/containers/Stake/components/ClaimConfirmationModal.jsx b/src/containers/Stake/components/ClaimConfirmationModal.jsx index 08026c6..a904857 100644 --- a/src/containers/Stake/components/ClaimConfirmationModal.jsx +++ b/src/containers/Stake/components/ClaimConfirmationModal.jsx @@ -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) => { /> - {props.outputTokenName} + {props.outputToken} diff --git a/src/containers/Stake/components/ClaimsArea.jsx b/src/containers/Stake/components/ClaimsArea.jsx index 62c17d5..1c006be 100644 --- a/src/containers/Stake/components/ClaimsArea.jsx +++ b/src/containers/Stake/components/ClaimsArea.jsx @@ -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} /> diff --git a/src/hooks/staking/index.js b/src/hooks/staking/index.js index c5d7d9e..8d533b0 100644 --- a/src/hooks/staking/index.js +++ b/src/hooks/staking/index.js @@ -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(