From 7110403eebaab763e64028e67cdc657293328662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Sat, 23 Nov 2024 13:36:26 -0600 Subject: [PATCH] Remove manual loading of Nimiq in IFrameApi --- src/request/iframe/IFrameApi.js | 7 ------- src/request/iframe/index.js | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/request/iframe/IFrameApi.js b/src/request/iframe/IFrameApi.js index 214937bed..bb0aec955 100644 --- a/src/request/iframe/IFrameApi.js +++ b/src/request/iframe/IFrameApi.js @@ -6,7 +6,6 @@ /* global AccountStore */ /* global KeyStore */ /* global Nimiq */ -/* global loadNimiq */ /* global Errors */ class IFrameApi { @@ -45,8 +44,6 @@ class IFrameApi { throw new Errors.KeyguardError('Unexpected: top-level sessionStorage got migrated in iframe.'); } - await loadNimiq(); - const entropy = new Nimiq.Entropy(storedEntropy); const master = entropy.toExtendedPrivateKey(); @@ -89,7 +86,6 @@ class IFrameApi { if (accounts.length === 0) return []; // Convert to KeyInfoObjects - await loadNimiq(); return KeyStore.accountInfos2KeyInfos(accounts); } @@ -122,9 +118,6 @@ class IFrameApi { return { success: true }; } - // Requires Nimiq lib to be loaded, to derive keyIds from legacy accounts' user-friendly addresses - await loadNimiq(); - await KeyStore.instance.migrateAccountsToKeys(); return { success: true }; } diff --git a/src/request/iframe/index.js b/src/request/iframe/index.js index 554f8cf0f..30e5d5888 100644 --- a/src/request/iframe/index.js +++ b/src/request/iframe/index.js @@ -2,7 +2,7 @@ /* global IFrameApi */ runKeyguard(IFrameApi, { - loadNimiq: true, + loadNimiq: true, // At least Nimiq.Address is used in all methods whitelist: [ 'list', 'hasKeys',