quoter update + desktop update

This commit is contained in:
EmberSpirit
2023-09-27 20:20:06 +02:00
parent 5c7053c0d9
commit 3d53d9e7c8
17 changed files with 1616 additions and 111 deletions
+19 -14
View File
@@ -3,6 +3,7 @@ import { useWalletStoreV2 } from "@/stores/walletV2";
import { useTokenStore } from "@/stores/tokens";
import { useMemeburnerStore } from "@/stores/memeburner";
import { useRewardLockerStore } from "@/stores/rewardlocker";
import { useUniswapStore } from "@/stores/uniswap";
import { useRoundsStore } from "@/stores/rounds";
import { createApp } from 'vue'
@@ -85,6 +86,7 @@ const tokenStore = useTokenStore();
const memeBurnerStore = useMemeburnerStore();
const rewardLockerStore = useRewardLockerStore();
const roundsStore = useRoundsStore();
const uniswapStore = useUniswapStore();
const goerliKey = import.meta.env.VITE_GOERLI_KEY;
@@ -150,7 +152,7 @@ watchContractEvent(
abi: memeBurnerStore.config.abi,
eventName: "MemeSacrificed",
},
async (log) => {
async (log) => {
console.log("memeSacrificedEvent", log);
const token = log[0].args.sacrificedToken;
await roundsStore.updateCurrentRound(token);
@@ -179,7 +181,8 @@ watchAccount(async (account) => {
await memeBurnerStore.init();
await tokenStore.initV2();
await rewardLockerStore.init();
await walletStore.loadWalletData();
await walletStore.loadWalletData();
await uniswapStore.init();
} else {
walletStore.address = null;
walletStore.connected = false;
@@ -193,18 +196,20 @@ watchNetwork((network) => {
}
});
watchContractEvent(
{
address: memeBurnerStore.config.contractAddress,
abi: memeBurnerStore.config.abi,
eventName: "MemeSacrificed",
},
async (log) => {
console.log("memeSacrificedEvent", log);
const token = log[0].args.sacrificedToken;
await roundsStore.updateCurrentRound(token);
}
);
// watchContractEvent(
// {
// address: memeBurnerStore.config.contractAddress,
// abi: memeBurnerStore.config.abi,
// eventName: "MemeSacrificed",
// },
// async (log) => {
// console.log("memeSacrificedEvent", log);
// const token = log[0].args.sacrificedToken;
// await roundsStore.updateCurrentRound(token);
// }
// );
await walletStore.init();
await tokenStore.initV2();