Skip to content

Commit

Permalink
verified hardware fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
SuchJitter committed Sep 1, 2024
1 parent 68a6a39 commit 17243bc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions composables/relayCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Logger from '@/utils/logger';
interface RelayData {
timestamp: number;
data: {
verifiedHardware: { [key: string]: Number };
verified: {
address: string;
fingerprint: string;
Expand Down
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default defineNuxtConfig({
runtimeConfig: {
public: {
walletConnectProjectId: 'f5e29d36441ccd0e2f5e3473d5a2021b',
relayRegistryAddress: 'XGkNTis1b5z0VzSLNyFwfjtZx-MypfqQ65JqLo9Wwww',
relayRegistryAddress: 'lCfdQe7AkQPpT5516nyEam4sEBsyPmjx_8uN9OxrzQA',
facilitatorContract: '0x45F6b9757B36697EFd37e98883894e98025E58a6',
sepoliaAtorTokenContract: '0x3F7D7e1161B4CbC172517a2957A13814f4a657A2',
tokenContractMain: '0x0f7b3f5a8fed821c5eb60049538a548db2d479ce',
Expand Down
5 changes: 4 additions & 1 deletion stores/useUserStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions utils/warp.read.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ type RelayData = {
timestamp: number;
data: {
state: any;
verifiedHardware: { [key: string]: Number };
verified: [
{
address: string;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 17243bc

Please sign in to comment.