diff --git a/composables/relayCache.ts b/composables/relayCache.ts index 8353707..ec55ab1 100755 --- a/composables/relayCache.ts +++ b/composables/relayCache.ts @@ -3,6 +3,7 @@ import Logger from '@/utils/logger'; interface RelayData { timestamp: number; data: { + verifiedHardware: { [key: string]: Number }; verified: { address: string; fingerprint: string; diff --git a/nuxt.config.ts b/nuxt.config.ts index 60868a1..4c37af7 100755 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -53,7 +53,7 @@ export default defineNuxtConfig({ runtimeConfig: { public: { walletConnectProjectId: 'f5e29d36441ccd0e2f5e3473d5a2021b', - relayRegistryAddress: 'XGkNTis1b5z0VzSLNyFwfjtZx-MypfqQ65JqLo9Wwww', + relayRegistryAddress: 'lCfdQe7AkQPpT5516nyEam4sEBsyPmjx_8uN9OxrzQA', facilitatorContract: '0x45F6b9757B36697EFd37e98883894e98025E58a6', sepoliaAtorTokenContract: '0x3F7D7e1161B4CbC172517a2957A13814f4a657A2', tokenContractMain: '0x0f7b3f5a8fed821c5eb60049538a548db2d479ce', diff --git a/stores/useUserStore.ts b/stores/useUserStore.ts index 2e64c43..6401754 100755 --- a/stores/useUserStore.ts +++ b/stores/useUserStore.ts @@ -252,8 +252,11 @@ export const useUserStore = defineStore('user', { await this.createRelayCache(); this.registrationCredits = cachedData.registrationCredits; } + // Check if the fingerprint has registration credits - const hasCredit = this.registrationCredits.includes(fingerprint); + const hasCredit = + this.registrationCredits.includes(fingerprint) || + cachedData.verifiedHardware[fingerprint] !== undefined; // Cache the result this.registrationCreditsCache[fingerprint] = hasCredit; diff --git a/utils/warp.read.ts b/utils/warp.read.ts index 6321ded..b09a8f4 100755 --- a/utils/warp.read.ts +++ b/utils/warp.read.ts @@ -9,6 +9,7 @@ type RelayData = { timestamp: number; data: { state: any; + verifiedHardware: { [key: string]: Number }; verified: [ { address: string; @@ -235,6 +236,7 @@ export const getAllRelays = async ( timestamp: Date.now(), data: { state: result.cachedValue.state, + verifiedHardware: result.cachedValue.state.verifiedHardware, verified: verifiedRelays as [ { address: string;