diff --git a/components/DashboardHeader.vue b/components/DashboardHeader.vue index e7bd91a..ad77486 100755 --- a/components/DashboardHeader.vue +++ b/components/DashboardHeader.vue @@ -7,6 +7,11 @@ import ButtonThemeToggle from './ui-kit/ButtonThemeToggle.vue'; import TitleAndLogo from './ui-kit/TitleAndLogo.vue'; import ReportIssueButton from '@/components/ui-kit/ReportIssueButton.vue'; import ReportIssueDialog from '@/components/ui-kit/ReportIssueDialog.vue'; +import { useAccount } from '@wagmi/vue'; + +import { config } from '@/config/wagmi.config'; + +const { isConnected, address } = useAccount({ config } as any); const menuStore = useMenuStore(); @@ -19,7 +24,9 @@ const menuStore = useMenuStore();
-
+
@@ -27,20 +34,24 @@ const menuStore = useMenuStore(); @@ -81,4 +92,4 @@ nav ul li { background-color: transparent; color: #000; } - \ No newline at end of file + diff --git a/components/DataTableMyRelays/DataTableMyRelays.vue b/components/DataTableMyRelays/DataTableMyRelays.vue index 7fa557e..d5fc9e7 100755 --- a/components/DataTableMyRelays/DataTableMyRelays.vue +++ b/components/DataTableMyRelays/DataTableMyRelays.vue @@ -83,6 +83,20 @@ const { error: verifiedRelaysError, pending: verifiedPending } = watch: [address], }); +const isHardwareResolved = reactive>({}); + +const resolveIsHardware = async (fingerprints: string[]) => { + for (const fingerprint of fingerprints) { + // Resolve the hardware relay status for each fingerprint + isHardwareResolved[fingerprint] = + await userStore.isHardwareRelay(fingerprint); + } +}; +watch(allRelays, (newRelays) => { + const fingerprints = newRelays.map((relay) => relay.fingerprint); + resolveIsHardware(fingerprints); +}); + const ethAddress = ref(''); const ethAddressError = ref(null); const fingerPrintRegister = ref(''); @@ -537,7 +551,7 @@ const handleUnlockClick = async (fingerprint: string) => {