Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v21.7.3
v22.17.0
2 changes: 1 addition & 1 deletion docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thank you for your interest in contributing to the Snap Solana Wallet project! T

- [MetaMask Flask](https://consensyssoftware.atlassian.net/wiki/x/IQCOB10) is required for testing the snap locally
- [NVM](https://github.com/creationix/nvm) to manage Node.js and avoid compatibility issues between different projects
- Node.js `21.7.3` as specified in `.nvmrc`
- Node.js `v22.17.0` as specified in `.nvmrc`
- Yarn `3.8.6` is required due to MetaMask package compatibility

## 🚀 Quick Start
Expand Down
4 changes: 2 additions & 2 deletions packages/snap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
"@metamask/key-tree": "9.1.2",
"@metamask/keyring-api": "^18.0.0",
"@metamask/keyring-snap-sdk": "^4.0.0",
"@metamask/snaps-cli": "^7.2.0",
"@metamask/snaps-cli": "^8.1.0",
"@metamask/snaps-jest": "8.12.0",
"@metamask/snaps-sdk": "^7.1.0",
"@metamask/snaps-sdk": "^8.1.0",
"@metamask/superstruct": "^3.1.0",
"@metamask/utils": "11.4.0",
"@noble/ed25519": "2.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/snap/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snap-solana-wallet.git"
},
"source": {
"shasum": "CGJCQcU/gwXmG51oX44op5db6mwEBogWvzfbBJZ26bs=",
"shasum": "ZHnbLwNwlfVGCNclPGBifht43erMlK4dGRZkBNDzmB4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down Expand Up @@ -39,14 +39,14 @@
"endowment:cronjob": {
"jobs": [
{
"expression": "* * * * *",
"duration": "PT30S",
"request": {
"method": "refreshSend",
"params": {}
}
},
{
"expression": "* * * * *",
"duration": "PT20S",
"request": {
"method": "refreshConfirmationEstimation",
"params": {}
Expand Down Expand Up @@ -90,6 +90,6 @@
"snap_dialog": {},
"snap_getPreferences": {}
},
"platformVersion": "7.1.0",
"platformVersion": "8.1.0",
"manifestVersion": "0.1"
}
10 changes: 4 additions & 6 deletions packages/snap/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,11 @@ export const onCronjob: OnCronjobHandler = async ({ request }) => {
const result = await withCatchAndThrowSnapError(async () => {
/**
* Don't run cronjobs if client is locked or inactive
* - We dont want to call cronjobs if the client is locked
* - We Dont want to call cronjobs if the client is inactive (except if we havent run a cronjob in the last 15 minutes)
* - We don't want to call cronjobs if the client is locked
* - We don't want to call cronjobs if the client is inactive
* (except if we haven't run a cronjob in the last 30 minutes)
*/
const { locked, active } =
(await getClientStatus()) as GetClientStatusResult & {
active: boolean | undefined; // FIXME: Remove this once the snap SDK is updated
};
const { locked, active } = await getClientStatus();

logger.log('[🔑 onCronjob] Client status', { locked, active });

Expand Down
Loading
Loading