viem wagmi

This commit is contained in:
Michel Fromme
2023-07-27 11:10:05 +02:00
parent 161262f590
commit b2121a1ca4
18 changed files with 3487 additions and 4160 deletions
+9 -4
View File
@@ -1,11 +1,15 @@
<script setup>
import { storeToRefs } from "pinia";
import { ref, onMounted, onBeforeUnmount, inject } from "vue";
import { useWalletStore } from "@/stores/wallet";
const walletStore = useWalletStore();
import { useWalletStoreV2 } from "@/stores/walletV2";
const emit = defineEmits(["showPanel"]);
const walletStore = useWalletStoreV2();
const { connected, address } = storeToRefs(walletStore);
const isMobile = inject("isMobile");
const showPanel = ref(false);
const showNavbar = ref(true);
const lastScrollPosition = ref(0);
@@ -62,8 +66,9 @@ onBeforeUnmount(() => {
</div>
<div class="navbar-end">
<div v-if="!isMobile">
<div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div>
<span v-else> {{ address }}</span>
<!-- <div v-if="!connected" class="btn btn-immortal" @click="walletStore.connectWallet">connect</div> -->
<div v-if="!address" class="btn btn-immortal" @click="$emit('showPanel', true)">connect</div>
<span v-else @click="$emit('showPanel', true)"> {{ address }}</span>
</div>
<div v-else class="hamburger-menu">
<font-awesome-icon :icon="['fas', 'bars']" />