update mobile

This commit is contained in:
Michel Fromme
2023-07-31 14:45:41 +02:00
parent c160b1c836
commit 2555217641
7 changed files with 91 additions and 47 deletions
+3 -2
View File
@@ -6,7 +6,7 @@ import { useWalletStore } from "./wallet";
import { useWalletStoreV2 } from "./walletV2";
import { useRoundsStore } from "@/stores/rounds";
import { multicall, getContract, fetchToken, waitForTransaction } from "@wagmi/core";
import { multicall, getContract, fetchToken, waitForTransaction, getWalletClient } from "@wagmi/core";
export const useMemeburnerStore = defineStore("memeburner", {
@@ -94,10 +94,11 @@ export const useMemeburnerStore = defineStore("memeburner", {
//todo error
console.error("amount is 0 or null or undefined");
return;
}
}
this.loading = true;
const amountDecimal = BigInt(amount * Math.pow(10, tokenStore.activeToken.decimals));
console.log("this.contract", this.contract);
console.log("amountDecimal", amountDecimal);
var hash = await this.contract.write
.sacrificeMeme([tokenStore.activeToken.contractAddress, amountDecimal])
console.log("hash", hash);