From f0530bb3e619c119a3d2aca3e1d6a672f86183b3 Mon Sep 17 00:00:00 2001 From: Dovydas Stankevicius Date: Thu, 18 Jul 2024 14:26:57 +0100 Subject: [PATCH] feat: removed node dependancy from profile-sync-sdk (#4539) ## Explanation Removed NodeJs dependency that was breaking the SDK usage on the client --- packages/profile-sync-controller/package.json | 1 - .../src/controllers/authentication/auth-snap-requests.ts | 6 +++--- yarn.lock | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index 65887acd4d..658ac12479 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -44,7 +44,6 @@ "@metamask/base-controller": "^6.0.1", "@metamask/snaps-controllers": "^8.1.1", "@metamask/snaps-sdk": "^4.2.0", - "@metamask/snaps-utils": "^7.4.0", "@noble/ciphers": "^0.5.2", "@noble/hashes": "^1.4.0", "immer": "^9.0.6", diff --git a/packages/profile-sync-controller/src/controllers/authentication/auth-snap-requests.ts b/packages/profile-sync-controller/src/controllers/authentication/auth-snap-requests.ts index 649c51a558..347e79800a 100644 --- a/packages/profile-sync-controller/src/controllers/authentication/auth-snap-requests.ts +++ b/packages/profile-sync-controller/src/controllers/authentication/auth-snap-requests.ts @@ -1,6 +1,6 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import type { HandleSnapRequest } from '@metamask/snaps-controllers'; import type { SnapId } from '@metamask/snaps-sdk'; -import { HandlerType } from '@metamask/snaps-utils'; type SnapRPCRequest = Parameters[0]; @@ -15,7 +15,7 @@ export function createSnapPublicKeyRequest(): SnapRPCRequest { return { snapId, origin: '', - handler: HandlerType.OnRpcRequest, + handler: 'onRpcRequest' as any, request: { method: 'getPublicKey', }, @@ -34,7 +34,7 @@ export function createSnapSignMessageRequest( return { snapId, origin: '', - handler: HandlerType.OnRpcRequest, + handler: 'onRpcRequest' as any, request: { method: 'signMessage', params: { message }, diff --git a/yarn.lock b/yarn.lock index e28f4614f4..1eef5f68e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3527,7 +3527,6 @@ __metadata: "@metamask/base-controller": "npm:^6.0.1" "@metamask/snaps-controllers": "npm:^8.1.1" "@metamask/snaps-sdk": "npm:^4.2.0" - "@metamask/snaps-utils": "npm:^7.4.0" "@noble/ciphers": "npm:^0.5.2" "@noble/hashes": "npm:^1.4.0" "@types/jest": "npm:^27.4.1"