From 6f2947e5aac2b6138543ae55c9f6177e0b974c7a Mon Sep 17 00:00:00 2001 From: yougotwill Date: Wed, 24 Jul 2024 18:38:46 +1000 Subject: [PATCH] fix: fix updateOurProfileDisplayName breaking tests don't use testing functions to generate a temp secret key rather do it manually --- ts/session/profile_manager/ProfileManager.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts/session/profile_manager/ProfileManager.ts b/ts/session/profile_manager/ProfileManager.ts index d0fb517e0..a94f42185 100644 --- a/ts/session/profile_manager/ProfileManager.ts +++ b/ts/session/profile_manager/ProfileManager.ts @@ -100,8 +100,10 @@ export async function updateOurProfileDisplayName(newName: string, onboarding?: if (onboarding) { try { - // const tempKeyPair = generateFakeECKeyPair(); - await UserConfigWrapperActions.init(new Uint8Array(), null); + // create a temp user config wrapper to test the display name with libsession + const privKey = new Uint8Array(64); + crypto.getRandomValues(privKey); + await UserConfigWrapperActions.init(privKey, null); const userInfoName = await UserConfigWrapperActions.setUserInfo( cleanName, CONVERSATION_PRIORITIES.default,