diff --git a/package-lock.json b/package-lock.json index b92cf6ff..dffa2a03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ ], "devDependencies": { "@rollup/plugin-commonjs": "22.0.1", - "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "13.3.0", "@types/node": "18.6.1", "@types/pino": "6.3.3", @@ -29,14 +29,14 @@ "eslint-plugin-promise": "6.0.0", "eslint-plugin-react": "7.30.1", "eslint-plugin-standard": "5.0.0", - "lokijs": "^1.5.12", + "lokijs": "1.5.12", "prettier": "2.7.1", "rollup": "2.77.0", "rollup-plugin-esbuild": "4.9.1", "rollup-plugin-polyfill-node": "0.10.2", "sinon": "14.0.0", "typescript": "4.7.4", - "vitest": "^1.1.3" + "vitest": "1.1.3" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2227,9 +2227,9 @@ } }, "node_modules/@walletconnect/core": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.11.0.tgz", - "integrity": "sha512-2Tjp5BCevI7dbmqo/OrCjX4tqgMqwJNQLlQAlphqPfvwlF9+tIu6pGcVbSN3U9zyXzWIZCeleqEaWUeSeET4Ew==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.12.2.tgz", + "integrity": "sha512-7Adv/b3pp9F42BkvReaaM4KS8NEvlkS7AMtwO3uF/o6aRMKtcfTJq9/jgWdKJh4RP8pPRTRFjCw6XQ/RZtT4aQ==", "dependencies": { "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-provider": "1.0.13", @@ -2237,13 +2237,13 @@ "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.14", "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", + "@walletconnect/logger": "^2.1.2", "@walletconnect/relay-api": "^1.0.9", "@walletconnect/relay-auth": "^1.0.4", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.11.0", - "@walletconnect/utils": "2.11.0", + "@walletconnect/types": "2.12.2", + "@walletconnect/utils": "2.12.2", "events": "^3.3.0", "isomorphic-unfetch": "3.1.0", "lodash.isequal": "4.5.0", @@ -2392,12 +2392,12 @@ } }, "node_modules/@walletconnect/logger": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.0.1.tgz", - "integrity": "sha512-SsTKdsgWm+oDTBeNE/zHxxr5eJfZmE9/5yp/Ku+zJtcTAjELb3DXueWkDXmE9h8uHIbJzIb5wj5lPdzyrjT6hQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.1.2.tgz", + "integrity": "sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==", "dependencies": { - "pino": "7.11.0", - "tslib": "1.14.1" + "@walletconnect/safe-json": "^1.0.2", + "pino": "7.11.0" } }, "node_modules/@walletconnect/notify-client": { @@ -2447,9 +2447,9 @@ } }, "node_modules/@walletconnect/types": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.11.0.tgz", - "integrity": "sha512-AB5b1lrEbCGHxqS2vqfCkIoODieH+ZAUp9rA1O2ftrhnqDJiJK983Df87JhYhECsQUBHHfALphA8ydER0q+9sw==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.12.2.tgz", + "integrity": "sha512-9CmwTlPbrFTzayTL9q7xM7s3KTJkS6kYFtH2m1/fHFgALs6pIUjf1qAx1TF2E4tv7SEzLAIzU4NqgYUt2vWXTg==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", @@ -2460,9 +2460,9 @@ } }, "node_modules/@walletconnect/utils": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.11.0.tgz", - "integrity": "sha512-hxkHPlTlDQILHfIKXlmzgNJau/YcSBC3XHUSuZuKZbNEw3duFT6h6pm3HT/1+j1a22IG05WDsNBuTCRkwss+BQ==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.12.2.tgz", + "integrity": "sha512-zf50HeS3SfoLv1N9GPl2IXTZ9TsXfet4usVAsZmX9P6/Xzq7d/7QakjVQCHH/Wk1O9XkcsfeoZoUhRxoMJ5uJw==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -2472,7 +2472,7 @@ "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.11.0", + "@walletconnect/types": "2.12.2", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -7318,59 +7318,25 @@ }, "packages/notify-client": { "name": "@walletconnect/notify-client", - "version": "1.2.3", + "version": "1.3.1", "license": "Apache-2.0", "dependencies": { - "@noble/ed25519": "^1.7.3", + "@noble/ed25519": "1.7.3", "@walletconnect/cacao": "1.0.2", - "@walletconnect/core": "^2.11.0-canary.0", + "@walletconnect/core": "2.12.2", "@walletconnect/did-jwt": "2.0.1", - "@walletconnect/identity-keys": "^2.0.1", + "@walletconnect/identity-keys": "2.0.1", "@walletconnect/jsonrpc-utils": "1.0.7", "@walletconnect/time": "1.0.2", - "@walletconnect/utils": "^2.11.0", - "axios": "^1.4.0", - "jwt-decode": "^3.1.2" + "@walletconnect/utils": "2.12.2", + "axios": "1.4.0", + "jwt-decode": "3.1.2" }, "devDependencies": { - "@ethersproject/wallet": "^5.7.0", - "@types/lodash.clonedeep": "^4.5.7", - "@walletconnect/types": "^2.11.0", - "lodash.clonedeep": "^4.5.0" - } - }, - "packages/notify-client/node_modules/@walletconnect/core": { - "version": "2.11.0-canary.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.11.0-canary.0.tgz", - "integrity": "sha512-JTCker+LyZ9i1EvBPVayac81bnOAJMaZABzXMuBIuWUAwXDWkoXj3W3Ttqu7ykA0H2rd1kT11R7yuX17DD2NzA==", - "dependencies": { - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.14", - "@walletconnect/keyvaluestorage": "^1.1.1", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/relay-auth": "^1.0.4", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.11.0", - "@walletconnect/utils": "2.11.0", - "events": "^3.3.0", - "isomorphic-unfetch": "3.1.0", - "lodash.isequal": "4.5.0", - "uint8arrays": "^3.1.0" - } - }, - "packages/notify-client/node_modules/@walletconnect/core/node_modules/@walletconnect/jsonrpc-utils": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.8.tgz", - "integrity": "sha512-vdeb03bD8VzJUL6ZtzRYsFMq1eZQcM3EAzT0a3st59dyLfJ0wq+tKMpmGH7HlB7waD858UWgfIcudbPFsbzVdw==", - "dependencies": { - "@walletconnect/environment": "^1.0.1", - "@walletconnect/jsonrpc-types": "^1.0.3", - "tslib": "1.14.1" + "@ethersproject/wallet": "5.7.0", + "@types/lodash.clonedeep": "4.5.7", + "@walletconnect/types": "2.12.2", + "lodash.clonedeep": "4.5.0" } } } diff --git a/package.json b/package.json index 671a30f9..57395646 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "22.0.1", - "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-json": "6.1.0", "@rollup/plugin-node-resolve": "13.3.0", "@types/node": "18.6.1", "@types/pino": "6.3.3", @@ -48,13 +48,13 @@ "eslint-plugin-promise": "6.0.0", "eslint-plugin-react": "7.30.1", "eslint-plugin-standard": "5.0.0", - "lokijs": "^1.5.12", + "lokijs": "1.5.12", "prettier": "2.7.1", "rollup": "2.77.0", "rollup-plugin-esbuild": "4.9.1", "rollup-plugin-polyfill-node": "0.10.2", "sinon": "14.0.0", "typescript": "4.7.4", - "vitest": "^1.1.3" + "vitest": "1.1.3" } } diff --git a/packages/notify-client/package.json b/packages/notify-client/package.json index 148503c3..be26e099 100644 --- a/packages/notify-client/package.json +++ b/packages/notify-client/package.json @@ -1,7 +1,7 @@ { "name": "@walletconnect/notify-client", "description": "WalletConnect Notify Client", - "version": "1.2.3", + "version": "1.3.1", "author": "WalletConnect, Inc. ", "homepage": "https://github.com/walletconnect/notify-client-js/", "license": "Apache-2.0", @@ -30,21 +30,21 @@ "prepublishOnly": "npm run test && npm run build" }, "dependencies": { - "@noble/ed25519": "^1.7.3", + "@noble/ed25519": "1.7.3", "@walletconnect/cacao": "1.0.2", - "@walletconnect/core": "^2.11.0-canary.0", + "@walletconnect/core": "2.12.2", "@walletconnect/did-jwt": "2.0.1", - "@walletconnect/identity-keys": "^2.0.1", + "@walletconnect/identity-keys": "2.0.1", "@walletconnect/jsonrpc-utils": "1.0.7", "@walletconnect/time": "1.0.2", - "@walletconnect/utils": "^2.11.0", - "axios": "^1.4.0", - "jwt-decode": "^3.1.2" + "@walletconnect/utils": "2.12.2", + "axios": "1.4.0", + "jwt-decode": "3.1.2" }, "devDependencies": { - "@ethersproject/wallet": "^5.7.0", - "@types/lodash.clonedeep": "^4.5.7", - "@walletconnect/types": "^2.11.0", - "lodash.clonedeep": "^4.5.0" + "@ethersproject/wallet": "5.7.0", + "@types/lodash.clonedeep": "4.5.7", + "@walletconnect/types": "2.12.2", + "lodash.clonedeep": "4.5.0" } } diff --git a/packages/notify-client/src/client.ts b/packages/notify-client/src/client.ts index 68cf46c1..6da5b4a5 100644 --- a/packages/notify-client/src/client.ts +++ b/packages/notify-client/src/client.ts @@ -168,6 +168,17 @@ export class NotifyClient extends INotifyClient { } }; + public getNotificationTypes: INotifyClient["getNotificationTypes"] = ( + params + ) => { + try { + return this.engine.getNotificationTypes(params); + } catch (error: any) { + this.logger.error(error.message); + throw error; + } + }; + public getActiveSubscriptions: INotifyClient["getActiveSubscriptions"] = ( params ) => { diff --git a/packages/notify-client/src/constants/sdk_version.ts b/packages/notify-client/src/constants/sdk_version.ts index 62fe87b4..5beae763 100644 --- a/packages/notify-client/src/constants/sdk_version.ts +++ b/packages/notify-client/src/constants/sdk_version.ts @@ -1 +1 @@ -export const NOTIFY_SDK_VERSION = "1.2.3"; +export const NOTIFY_SDK_VERSION = "1.3.1"; diff --git a/packages/notify-client/src/controllers/engine.ts b/packages/notify-client/src/controllers/engine.ts index 45ef07cf..35c09e52 100644 --- a/packages/notify-client/src/controllers/engine.ts +++ b/packages/notify-client/src/controllers/engine.ts @@ -15,7 +15,12 @@ import { isJsonRpcResponse, isJsonRpcResult, } from "@walletconnect/jsonrpc-utils"; -import { FIVE_MINUTES } from "@walletconnect/time"; +import { + FIVE_MINUTES, + ONE_DAY, + THIRTY_MINUTES, + THIRTY_SECONDS, +} from "@walletconnect/time"; import { JsonRpcRecord, RelayerTypes } from "@walletconnect/types"; import { TYPE_1, @@ -48,12 +53,19 @@ export class NotifyEngine extends INotifyEngine { public name = "notifyEngine"; private initialized = false; + private lastWatchSubscriptionsCallTimestamp: number; + private disconnectTimer: number; + private finishedInitialLoad = false; private didDocMap = new Map(); constructor(client: INotifyEngine["client"]) { super(client); + + // 0 since it has not been called yet + this.lastWatchSubscriptionsCallTimestamp = 0; + this.disconnectTimer = 0; } public init: INotifyEngine["init"] = async () => { @@ -66,6 +78,49 @@ export class NotifyEngine extends INotifyEngine { await this.watchLastWatchedAccountIfExists(); this.initialized = true; + + this.client.core.relayer.on(RELAYER_EVENTS.disconnect, () => { + // Do not reset the timer if we're already disconnected + // as multiple disconnect events are emitted even when disconnected + if (!this.disconnectTimer) { + this.disconnectTimer = Date.now(); + } + }); + + this.client.core.relayer.on(RELAYER_EVENTS.connect, () => { + // If client has been offline for more than 5 minutes - call watch subscriptions + const timeSinceOffline = Date.now() - this.disconnectTimer; + + // Allow for margin for error + const timeSinceOfflineTolerance = THIRTY_SECONDS * 1_000; + + const offlineForMoreThan5Minutes = + timeSinceOffline + timeSinceOfflineTolerance >= FIVE_MINUTES * 1_000; + + this.disconnectTimer = 0; + + if (offlineForMoreThan5Minutes) { + this.watchLastWatchedAccountIfExists(); + } + + const timeSinceFirstWatchSubscriptions = + Date.now() - this.lastWatchSubscriptionsCallTimestamp; + + const timeSinceFirstWatchSubscriptionsTolerance = + THIRTY_MINUTES * 1_000; + + const clientOnlineForOverADay = + timeSinceFirstWatchSubscriptions + + timeSinceFirstWatchSubscriptionsTolerance > + ONE_DAY * 1_000; + + // Call watch subscriptionsevery 24 hours + // This check will be triggered every reconnect + if (clientOnlineForOverADay) { + this.watchLastWatchedAccountIfExists(); + this.lastWatchSubscriptionsCallTimestamp = 0; + } + }); } }; @@ -596,6 +651,26 @@ export class NotifyEngine extends INotifyEngine { this.client.messages.update(targetRecord.topic, targetRecord); }; + public getNotificationTypes: INotifyEngine["getNotificationTypes"] = ( + params + ) => { + this.isInitialized(); + + const subscriptions = this.getActiveSubscriptions(); + + const specifiedSubscription = Object.values(subscriptions).find( + (subscription) => subscription.metadata.appDomain === params.appDomain + ); + + if (!specifiedSubscription) { + throw new Error( + `[Notify] No subscription found with domain ${params.appDomain})` + ); + } + + return specifiedSubscription.scope; + }; + public getActiveSubscriptions: INotifyEngine["getActiveSubscriptions"] = ( params ) => { @@ -1241,6 +1316,8 @@ export class NotifyEngine extends INotifyEngine { appDomain: string, allApps: boolean ) { + this.lastWatchSubscriptionsCallTimestamp = Date.now(); + const notifyKeys = await this.resolveKeys(this.client.notifyServerUrl); // Derive req topic from did.json @@ -1271,6 +1348,9 @@ export class NotifyEngine extends INotifyEngine { privKeyY = this.client.core.crypto.keychain.get(pubKeyY); } + // Force the keychain to be in sync with watched account entry. + await this.client.core.crypto.keychain.set(pubKeyY, privKeyY); + // Generate res topic from persistent key kY const notifyServerWatchResTopic = hashKey( deriveSymKey(privKeyY, notifyKeys.dappPublicKey) @@ -1448,14 +1528,9 @@ export class NotifyEngine extends INotifyEngine { newSubscriptions ); - // Handle them sequentially because `core.relayer.subscribe` is not compatible - // with concurrent `relayer.subscribe` requests, as a data race occurs between the two - // subscriptions and its subscriber.once(SUBSCRIBER_EVENTS.created, ...) will be triggered - // with a wrong subscription, seeing that the topics of the two subscriptions do not match, - // it will not resolve. - for (const updateSubscriptionsPromise of updateSubscriptionsPromises) { - await updateSubscriptionsPromise(); - } + await Promise.allSettled( + updateSubscriptionsPromises.map((promiseCb) => promiseCb()) + ); return this.client.subscriptions.getAll(); }; diff --git a/packages/notify-client/src/types/client.ts b/packages/notify-client/src/types/client.ts index e80a5596..26e2495b 100644 --- a/packages/notify-client/src/types/client.ts +++ b/packages/notify-client/src/types/client.ts @@ -378,6 +378,7 @@ export abstract class INotifyClient { public abstract update: INotifyEngine["update"]; public abstract decryptMessage: INotifyEngine["decryptMessage"]; public abstract getNotificationHistory: INotifyEngine["getNotificationHistory"]; + public abstract getNotificationTypes: INotifyEngine["getNotificationTypes"]; public abstract getActiveSubscriptions: INotifyEngine["getActiveSubscriptions"]; public abstract deleteSubscription: INotifyEngine["deleteSubscription"]; public abstract markNotificationsAsRead: INotifyEngine["markNotificationsAsRead"]; diff --git a/packages/notify-client/src/types/engine.ts b/packages/notify-client/src/types/engine.ts index 3e996411..f31fe6cb 100644 --- a/packages/notify-client/src/types/engine.ts +++ b/packages/notify-client/src/types/engine.ts @@ -118,6 +118,12 @@ export abstract class INotifyEngine { hasMore: boolean; hasMoreUnread: boolean; }>; + + // get notification types for a specific subscription + public abstract getNotificationTypes(params: { + appDomain: string; + }): NotifyClientTypes.ScopeMap; + // query all active subscriptions public abstract getActiveSubscriptions(params?: { account: string; diff --git a/packages/notify-client/test/clients.spec.ts b/packages/notify-client/test/clients.spec.ts index 9adec199..887f5275 100644 --- a/packages/notify-client/test/clients.spec.ts +++ b/packages/notify-client/test/clients.spec.ts @@ -36,8 +36,6 @@ const hasTestProjectSecret = const projectId = process.env.TEST_PROJECT_ID; -const runningLocally = Boolean(process.env.TEST_IS_LOCAL); - describe("Notify", () => { let core: ICore; let wallet: INotifyClient; @@ -686,9 +684,8 @@ describe("Notify", () => { describe("watchSubscriptions", () => { // TODO: Refactor this test to be 2 wallets instead of 1 - it.skip("fires correct event update", async () => { + it("fires correct event update", async () => { let updateEvent: any = {}; - let updatedCount = 0; await createNotifySubscription(wallet, account, onSign); @@ -696,20 +693,22 @@ describe("Notify", () => { const subscriptions = wallet.subscriptions.getAll(); + wallet.on("notify_update", (ev) => { + updateEvent = ev; + }); + await wallet.update({ topic: subscriptions[0].topic, scope: [testScopeId], }); - await waitForEvent(() => updatedCount === 3); - expect(wallet.hasFinishedInitialLoad()).toEqual(true); expect(updateEvent.topic).toBe(subscriptions[0].topic); }); // TODO: This test needs a refactor involving mocking event emitter - it.skip("automatically fires watchSubscriptions on init", async () => { + it("automatically fires watchSubscriptions on init", async () => { const storageLoc = generateClientDbName("notifyTestAutomatic"); const wallet1 = await NotifyClient.init({ name: "testNotifyClient1", @@ -725,6 +724,7 @@ describe("Notify", () => { let wallet1ReceivedChangedEvent = false; wallet1.on("notify_subscriptions_changed", () => { + console.log("LISTENER????"); wallet1ReceivedChangedEvent = true; }); @@ -734,13 +734,17 @@ describe("Notify", () => { allApps: false, }); - await wallet.register({ + await wallet1.register({ registerParams: preparedRegistration.registerParams, signature: await onSign(preparedRegistration.message), }); + console.log("Registered..."); + await waitForEvent(() => wallet1ReceivedChangedEvent); + console.log("Initting w2..."); + const wallet2 = await NotifyClient.init({ name: "testNotifyClient2", logger: "error", @@ -753,17 +757,10 @@ describe("Notify", () => { projectId, }); - let wallet2ReceivedChangedEvent = false; - wallet2.on("notify_subscriptions_changed", () => { - wallet2ReceivedChangedEvent = true; - }); - - await waitForEvent(() => wallet2ReceivedChangedEvent); - - expect(wallet2ReceivedChangedEvent).toEqual(true); + await waitForEvent(wallet2.hasFinishedInitialLoad); }); - it.skipIf(!runningLocally)("handles multiple subscriptions", async () => { + it("handles multiple subscriptions", async () => { const wallet1 = await NotifyClient.init({ name: "testNotifyClient1", logger: "error", @@ -773,19 +770,10 @@ describe("Notify", () => { projectId, }); - let wallet1UpdateCount = 0; - - wallet1.on("notify_subscriptions_changed", () => { - wallet1UpdateCount++; - }); await createNotifySubscription(wallet, account, onSign); await createNotifySubscription(wallet, account, onSign, true); - await waitForEvent(() => { - return wallet1UpdateCount > 2; - }); - const wallet2 = await NotifyClient.init({ name: "debug_me", logger: "info", @@ -980,6 +968,18 @@ describe("Notify", () => { }); }); + describe("getNotifiationTypes", () => { + it("Correctly fetches a dapp's scopes", async () => { + await createNotifySubscription(wallet, account, onSign); + + expect(wallet.subscriptions.length).toEqual(1); + + const sub = wallet.subscriptions.values[0]; + + expect(sub.scope).toEqual(testDappMetadata.scope); + }); + }); + describe("Blocking functions", () => { it("Subscribe only resolves once a subscription succeeded and is stored", async () => { const preparedRegistration = await wallet.prepareRegistration({ @@ -1035,16 +1035,12 @@ describe("Notify", () => { // send messages to app1 await sendNotifyMessage(account, "Test1"); - console.log(">>>>>>>>>> sent message"); - wallet.on("notify_message", () => { gotMessage = true; }); await waitForEvent(() => gotMessage); - console.log(">>>>>>>>>> got message"); - const notifs1 = wallet.getNotificationHistory({ topic: app1Topic, limit: 5, @@ -1080,7 +1076,6 @@ describe("Notify", () => { }); expect(notifs1).resolves.toSatisfy((resolved: any) => { - console.log("Resolved is!", resolved); return resolved.notifications.length === 2; }); } diff --git a/packages/notify-client/test/helpers/mocks.ts b/packages/notify-client/test/helpers/mocks.ts index 7f0c2b75..dc1af5ff 100644 --- a/packages/notify-client/test/helpers/mocks.ts +++ b/packages/notify-client/test/helpers/mocks.ts @@ -10,6 +10,19 @@ export const testDappMetadata = { icons: ["https://i.imgur.com/q9QDRXc.png"], name: "Notify Swift Integration Tests Prod", appDomain: "wc-notify-swift-integration-tests-prod.pages.dev", + scope: { + "f173f231-a45c-4dc0-aa5d-956eb04f7360": { + description: "Description 1", + enabled: true, + id: "f173f231-a45c-4dc0-aa5d-956eb04f7360", + imageUrls: { + lg: "https://explorer-api.walletconnect.com/w3i/v1/logo/lg/99914546-d05c-4f57-c33b-54f2f6099c00?projectId=228af4798d38a06cb431b473254c9720", + md: "https://explorer-api.walletconnect.com/w3i/v1/logo/md/99914546-d05c-4f57-c33b-54f2f6099c00?projectId=228af4798d38a06cb431b473254c9720", + sm: "https://explorer-api.walletconnect.com/w3i/v1/logo/sm/99914546-d05c-4f57-c33b-54f2f6099c00?projectId=228af4798d38a06cb431b473254c9720", + }, + name: "Notification 1", + }, + }, }; export const gmHackersMetadata = {