update slideoutpanel, open errors tokeninit
This commit is contained in:
+14
-17
@@ -1,4 +1,3 @@
|
||||
B
|
||||
<script setup>
|
||||
import { onMounted, onUnmounted, provide, ref } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
@@ -9,7 +8,6 @@ import { useTokenStore } from "@/stores/tokens";
|
||||
import { useContractStore } from "@/stores/contracts";
|
||||
import { useMemeburnerStore } from "@/stores/memeburner";
|
||||
import { useRewardLockerStore } from "@/stores/rewardlocker";
|
||||
import { useMultiCallStore } from "@/stores/multicall";
|
||||
import { useRoundsStore } from "@/stores/rounds";
|
||||
|
||||
import SlideoutPanel from "./components/SlideoutPanel.vue";
|
||||
@@ -30,7 +28,6 @@ const tokenStore = useTokenStore();
|
||||
const contractStore = useContractStore();
|
||||
const memeBurnerStore = useMemeburnerStore();
|
||||
const rewardLockerStore = useRewardLockerStore();
|
||||
const multiCallStore = useMultiCallStore();
|
||||
const roundsStore = useRoundsStore();
|
||||
const walletStore = useWalletStoreV2();
|
||||
const { memeBurner, token } = storeToRefs(tokenStore);
|
||||
@@ -123,6 +120,16 @@ onMounted(async () => {
|
||||
console.log("network123", network);
|
||||
if (network.chain) {
|
||||
walletStore.chain = network.chain;
|
||||
|
||||
clientClientEvent.value = watchWalletClient(
|
||||
{
|
||||
chainId: network.chain.id,
|
||||
},
|
||||
(walletClient) => {
|
||||
walletStore.walletClient = walletClient;
|
||||
console.log("wc123", walletClient);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -139,26 +146,16 @@ onMounted(async () => {
|
||||
}
|
||||
);
|
||||
|
||||
clientClientEvent.value = watchWalletClient(
|
||||
{
|
||||
chainId: network.chain.id,
|
||||
},
|
||||
(walletClient) => {
|
||||
walletStore.walletClient = walletClient;
|
||||
console.log("wc123", walletClient);
|
||||
}
|
||||
);
|
||||
|
||||
await tokenStore.initV2();
|
||||
await memeBurnerStore.init();
|
||||
await rewardLockerStore.init();
|
||||
await memeBurnerStore.init();
|
||||
|
||||
//init
|
||||
roundsStore.currentRound = parseInt(await memeBurnerStore.getCurrentRound());
|
||||
console.log("roundsStore.currentRound", roundsStore.currentRound);
|
||||
roundsStore.activeRound = roundsStore.currentRound;
|
||||
await roundsStore.fillRound(roundsStore.activeRound);
|
||||
// roundsStore.currentRound = parseInt(await memeBurnerStore.getCurrentRound());
|
||||
// console.log("roundsStore.currentRound", roundsStore.currentRound);
|
||||
// roundsStore.activeRound = roundsStore.currentRound;
|
||||
// await roundsStore.fillRound(roundsStore.activeRound);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user