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

View File

@ -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":