correct interpretation of isRebase during stake/unstake function call
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
2d81ba3554
commit
95130e4118
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ghost-dao-interface",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user