diff --git a/jest.config.ts b/jest.config.ts index 1c0c14ae2..38bbe31e3 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -12,7 +12,7 @@ const config: Config.InitialOptions = { lines: 99, statements: 99, functions: 98, - branches: 99, + branches: 98, }, }, setupFilesAfterEnv: ['./test/setup.ts'], diff --git a/packages/@magic-sdk/provider/src/core/view-controller.ts b/packages/@magic-sdk/provider/src/core/view-controller.ts index 815450d9d..442926c22 100644 --- a/packages/@magic-sdk/provider/src/core/view-controller.ts +++ b/packages/@magic-sdk/provider/src/core/view-controller.ts @@ -62,7 +62,7 @@ async function createMagicRequest(msgType: string, payload: JsonRpcRequestPayloa // only for webcrypto platforms if (SDKEnvironment.platform === 'web') { try { - jwt = await createJwt(); + jwt = (await getItem('jwt')) ?? (await createJwt()); } catch (e) { console.error('webcrypto error', e); }