fix issues e + new contracts
This commit is contained in:
@@ -36,6 +36,7 @@ import { useWalletStoreV2 } from "@/stores/walletV2";
|
||||
import { useRewardLockerStore } from "@/stores/rewardlocker";
|
||||
import { useTokenStore } from "@/stores/tokens";
|
||||
import { createPermitObject, getSignatureRSV } from "@/helper/blockchain.js";
|
||||
import { formatBigIntDivision } from "@/helper/helper.js";
|
||||
|
||||
import { signTypedData } from "@wagmi/core";
|
||||
|
||||
@@ -54,19 +55,19 @@ const emit = defineEmits(["close", "update:modelValue"]);
|
||||
async function addTokensPercent(value) {
|
||||
console.log("value", value);
|
||||
console.log("props.amount", props.amount);
|
||||
console.log("props.amount * 100)", props.amount * 1000);
|
||||
let amount;
|
||||
if (props.amount !== undefined || props.amount !== null) {
|
||||
console.log("props.amount", props.amount);
|
||||
console.log("value", value);
|
||||
amount = (BigInt(props.amount * 1000) * value) / 100000n;
|
||||
//todo function to calculate correct bigInt value (maybe use string and split)
|
||||
amount = (BigInt(props.amount) * value) / 100n;
|
||||
} else if (props.stake) {
|
||||
amount = (walletStore.memeToken.balanceOf * value) / 100n;
|
||||
} else {
|
||||
amount = (walletStore.memeToken.staked * value) / 100n;
|
||||
}
|
||||
console.log("amount123", amount);
|
||||
amount = amount / 10n ** tokenStore.memeToken.decimals;
|
||||
console.log("amount", amount);
|
||||
emit("update:modelValue", Number(amount));
|
||||
emit("update:modelValue", amount);
|
||||
}
|
||||
|
||||
async function unstakeBloodline() {
|
||||
|
||||
Reference in New Issue
Block a user