From 95130e4118d695cdd0b4998674fdfb2df9c6b78b Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Fri, 13 Jun 2025 13:31:23 +0300 Subject: [PATCH] correct interpretation of isRebase during stake/unstake function call Signed-off-by: Uncle Fatso --- package.json | 2 +- src/containers/Stake/components/StakeConfirmationModal.jsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e890106..987225b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.1.0", + "version": "0.1.1", "type": "module", "scripts": { "dev": "vite", diff --git a/src/containers/Stake/components/StakeConfirmationModal.jsx b/src/containers/Stake/components/StakeConfirmationModal.jsx index e62da71..d777635 100644 --- a/src/containers/Stake/components/StakeConfirmationModal.jsx +++ b/src/containers/Stake/components/StakeConfirmationModal.jsx @@ -66,14 +66,16 @@ const StakeConfirmationModal = (props) => { const doAction = async () => { setIsPending(true); - const actionAmount = new DecimalBigNumber(props.amount, props.spendDecimals); - const isRebase = props.upperToken === "STNK"; + let isRebase = false; + switch (props.action) { case "STAKE": + isRebase = props.bottomToken.toUpperCase() === "STNK"; await stake(props.chainId, props.address, actionAmount._value.toBigInt(), isRebase, props.isClaim); break; case "UNSTAKE": + isRebase = props.upperToken.toUpperCase() === "STNK"; await unstake(props.chainId, props.address, actionAmount._value.toBigInt(), props.isTrigger, isRebase); break; case "WRAP":