diff --git a/packages/snap/snap.manifest.json b/packages/snap/snap.manifest.json index 953c929c..edeb37f0 100644 --- a/packages/snap/snap.manifest.json +++ b/packages/snap/snap.manifest.json @@ -7,7 +7,7 @@ "url": "https://github.com/MetaMask/snap-solana-wallet.git" }, "source": { - "shasum": "7nwtif4tA2N5NLWISc5gL1lnbDjP3hH/v5Z7TfgcZoM=", + "shasum": "AzZYM/Htgef8FinVyokflUpr59ffVLrfs8Mpwjxm0W0=", "location": { "npm": { "filePath": "dist/bundle.js", @@ -16,7 +16,9 @@ "registry": "https://registry.npmjs.org/" } }, - "locales": ["locales/en.json"] + "locales": [ + "locales/en.json" + ] }, "initialConnections": { "https://portfolio.metamask.io": {} @@ -27,11 +29,17 @@ "snaps": false }, "endowment:keyring": { - "allowedOrigins": ["https://portfolio.metamask.io"] + "allowedOrigins": [ + "https://portfolio.metamask.io" + ] }, "snap_getBip32Entropy": [ { - "path": ["m", "44'", "501'"], + "path": [ + "m", + "44'", + "501'" + ], "curve": "ed25519" } ], diff --git a/packages/snap/src/core/handlers/onCronjob/backgroundEvents/refreshConfirmationEstimation.tsx b/packages/snap/src/core/handlers/onCronjob/backgroundEvents/refreshConfirmationEstimation.tsx index 7569a708..f56f0144 100644 --- a/packages/snap/src/core/handlers/onCronjob/backgroundEvents/refreshConfirmationEstimation.tsx +++ b/packages/snap/src/core/handlers/onCronjob/backgroundEvents/refreshConfirmationEstimation.tsx @@ -7,6 +7,7 @@ import { serialize } from '../../../serialization/serialize'; import type { UnencryptedStateValue } from '../../../services/state/State'; import { CONFIRM_SIGN_AND_SEND_TRANSACTION_INTERFACE_NAME, + getInterfaceContext, getInterfaceContextOrThrow, updateInterface, } from '../../../utils/interface'; @@ -36,10 +37,17 @@ export const refreshConfirmationEstimation: OnCronjobHandler = async () => { // Get the current context const interfaceContext = - await getInterfaceContextOrThrow( + await getInterfaceContext( confirmationInterfaceId, ); + if (!interfaceContext) { + logger.info( + `No interface context found for confirmation interface ${confirmationInterfaceId}. Skipping background event.`, + ); + return; + } + // Update the interface context with the new rates. try { if (