Skip to content

Commit

Permalink
⬆️ chore: Metamask 11.9.1, network switch optimisations (#1102)
Browse files Browse the repository at this point in the history
* chore: metamask 11.9.1, network switch optimisations, code cleanup

* fix: biome deps

* fix: format
  • Loading branch information
matstyler authored Feb 18, 2024
1 parent 340b685 commit b07816b
Show file tree
Hide file tree
Showing 21 changed files with 262 additions and 272 deletions.
3 changes: 2 additions & 1 deletion docs/api/classes/MetaMask.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ Switches to the account with the given name.
### switchNetwork()
```ts
switchNetwork(networkName): Promise<void>
switchNetwork(networkName, isTestnet?): Promise<void>
```
Switches to the network with the given name.
Expand All @@ -460,6 +460,7 @@ Switches to the network with the given name.
| Parameter | Type | Description |
| :------ | :------ | :------ |
| `networkName` | `string` | The name of the network to switch to. |
| `isTestnet`? | `boolean` | A flag indicating whether the network is a test network. |
#### Returns
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"devDependencies": {
"@synthetixio/synpress": "workspace:*",
"@synthetixio/synpress-tsconfig": "workspace:*",
"typedoc": "0.25.7",
"typedoc": "0.25.8",
"typedoc-plugin-markdown": "4.0.0-next.38",
"typedoc-vitepress-theme": "1.0.0-next.8",
"vitepress": "1.0.0-rc.41"
"typedoc-vitepress-theme": "1.0.0-next.9",
"vitepress": "1.0.0-rc.42"
}
}
4 changes: 2 additions & 2 deletions examples/new-dawn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"dependencies": {
"@playwright/test": "1.41.2",
"@synthetixio/synpress": "4.0.0-alpha.0",
"dotenv": "16.4.1"
"dotenv": "16.4.2"
},
"devDependencies": {
"@metamask/test-dapp": "8.1.0",
"@types/node": "20.11.16",
"@types/node": "20.11.17",
"serve": "14.2.1",
"typescript": "5.3.3"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/new-dawn/test/wallet-setup/connected.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export default defineWalletSetup(PASSWORD, async (context, walletPage) => {

await page.locator('#connectButton').click()

await metamask.connectToDapp()
await metamask.connectToDapp(['Account 1'])
})
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
"@metamask/test-dapp": "8.1.0",
"commitlint-config-gitmoji": "2.3.1",
"husky": "9.0.10",
"lint-staged": "15.2.1",
"npm-check-updates": "16.14.14",
"lint-staged": "15.2.2",
"npm-check-updates": "16.14.15",
"serve": "14.2.1",
"sort-package-json": "2.7.0",
"turbo": "1.12.2"
"turbo": "1.12.3"
},
"packageManager": "pnpm@8.15.1",
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"dependencies": {
"axios": "1.6.7",
"chalk": "5.3.0",
"commander": "11.1.0",
"commander": "12.0.0",
"esbuild": "0.20.0",
"fs-extra": "11.2.0",
"glob": "10.3.10",
"gradient-string": "2.0.2",
"progress": "2.0.3",
"tsup": "8.0.1",
"tsup": "8.0.2",
"unzipper": "0.10.14",
"zod": "3.22.4"
},
Expand All @@ -46,13 +46,13 @@
"@types/archiver": "6.0.2",
"@types/fs-extra": "11.0.4",
"@types/gradient-string": "1.1.5",
"@types/node": "20.11.16",
"@types/node": "20.11.17",
"@types/progress": "2.0.7",
"@types/unzipper": "0.10.9",
"@vitest/coverage-v8": "1.2.2",
"archiver": "6.0.1",
"memfs": "4.6.0",
"msw": "2.1.5",
"msw": "2.2.0",
"rimraf": "5.0.5",
"typescript": "5.3.3",
"vitest": "1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/prepareExtension.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { downloadFile, ensureCacheDirExists, unzipArchive } from '.'

export const DEFAULT_METAMASK_VERSION = '11.6.3'
export const DEFAULT_METAMASK_VERSION = '11.9.1'
export const EXTENSION_DOWNLOAD_URL = `https://github.com/MetaMask/metamask-extension/releases/download/v${DEFAULT_METAMASK_VERSION}/metamask-chrome-${DEFAULT_METAMASK_VERSION}.zip`

// NOTE: This function is copied from `wallets/metamask/src/prepareExtension.ts` only TEMPORARILY!
Expand Down
4 changes: 2 additions & 2 deletions packages/fixtures/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"devDependencies": {
"@synthetixio/synpress-tsconfig": "0.0.1-alpha.0",
"@types/fs-extra": "11.0.4",
"@types/node": "20.11.16",
"@types/node": "20.11.17",
"rimraf": "5.0.5",
"tsup": "8.0.1",
"tsup": "8.0.2",
"typescript": "5.3.3"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit b07816b

Please sign in to comment.