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",
|
"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",
|
||||||
|
@ -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":
|
||||||
|
Loading…
Reference in New Issue
Block a user