diff --git a/Client/Frontend/Browser/UserScriptManager.swift b/Client/Frontend/Browser/UserScriptManager.swift index 26243f71f7e..649af79ab34 100644 --- a/Client/Frontend/Browser/UserScriptManager.swift +++ b/Client/Frontend/Browser/UserScriptManager.swift @@ -275,6 +275,20 @@ class UserScriptManager { } } + if let solanaProvider = tab.walletSolProvider { + solanaProvider.isSolanaKeyringCreated { isSolanaKeyringCreated in + guard isSolanaKeyringCreated, // don't inject if Solana keyring is not created. + let walletStandardScript = tab.walletSolProviderScripts[.walletStandard] + else { return } + let wkScript = WKUserScript.create( + source: walletStandardScript, + injectionTime: .atDocumentEnd, + forMainFrameOnly: true, + in: SolanaProviderScriptHandler.scriptSandbox) + scriptController.addUserScript(wkScript) + } + } + // TODO: Refactor this and get rid of the `UserScriptType` // Inject Custom scripts for userScriptType in customScripts.sorted(by: { $0.order < $1.order }) {