correct interpretation of isRebase during stake/unstake function call

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-06-13 13:31:23 +03:00
parent 2d81ba3554
commit 95130e4118
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 5 additions and 3 deletions

View File

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

View File

@ -66,14 +66,16 @@ const StakeConfirmationModal = (props) => {
const doAction = async () => { const doAction = async () => {
setIsPending(true); setIsPending(true);
const actionAmount = new DecimalBigNumber(props.amount, props.spendDecimals); const actionAmount = new DecimalBigNumber(props.amount, props.spendDecimals);
const isRebase = props.upperToken === "STNK"; let isRebase = false;
switch (props.action) { switch (props.action) {
case "STAKE": case "STAKE":
isRebase = props.bottomToken.toUpperCase() === "STNK";
await stake(props.chainId, props.address, actionAmount._value.toBigInt(), isRebase, props.isClaim); await stake(props.chainId, props.address, actionAmount._value.toBigInt(), isRebase, props.isClaim);
break; break;
case "UNSTAKE": case "UNSTAKE":
isRebase = props.upperToken.toUpperCase() === "STNK";
await unstake(props.chainId, props.address, actionAmount._value.toBigInt(), props.isTrigger, isRebase); await unstake(props.chainId, props.address, actionAmount._value.toBigInt(), props.isTrigger, isRebase);
break; break;
case "WRAP": case "WRAP":