Skip to content

Commit

Permalink
Merge pull request #566 from Synthetixio/metamask-10+
Browse files Browse the repository at this point in the history
feat: metamask 10+ support
  • Loading branch information
drptbl authored Oct 29, 2022
2 parents 6388268 + 6291d5d commit 28fccc2
Show file tree
Hide file tree
Showing 16 changed files with 745 additions and 281 deletions.
14 changes: 7 additions & 7 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ plugins:
ref: v0.0.5
uri: https://github.com/trunk-io/plugins
cli:
version: 0.18.1-beta
version: 1.0.1
sha256:
darwin_arm64: c25df7ef6d68a2bd8648d93830659d1675043db03d9f49182534f28e417dfda6
darwin_x86_64: 6a7a4f9c5d0ad7d3d5ea45e6a1cf11a668ea68c36f01ebe31ef95f99560a6824
linux_x86_64: d875fe70c221d6449a9cd09598ab278133c5513f52dbf6af0fca3161d7a39d46
darwin_arm64: 364c5c1bca52644369f3a415c67d22db6bbf5c3b036f155ed871e0735c4fb40d
darwin_x86_64: 5c36d503c13dd165f172f48f98405c40872d4c001ad675ad26f052c0e04b28c4
linux_x86_64: f8e27a2f7650757180457c51db27d35f9c8b99b1098c0d41eaee4cfbbbe2b3d0
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected].20
- eslint@8.24.0
- [email protected].21
- eslint@8.26.0
- git-diff-check@SYSTEM
- gitleaks@8.13.0
- gitleaks@8.15.0
- [email protected]
- [email protected]
ignore:
Expand Down
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,18 @@ which runs metamask setup before all tests:

- passes welcome page
- imports wallet
- changes network (defaults to `kovan`) or creates custom network and changes to
it (depending on your setup)
- changes network (defaults to `goerli`) or creates custom network and changes
to it (depending on your setup)
- switches back to Cypress window and starts testing

It requires environmental variable called `SECRET_WORDS` to be present in
following format => `'word1, word2, etc..'` or private key in an environmental
variable called `PRIVATE_KEY`.

To change default network (`kovan`), you can use `NETWORK_NAME` environmental
variable, for example: `NETWORK_NAME=rinkeby`.
To change default network (`goerli`), you can use `NETWORK_NAME` environmental
variable, for example: `NETWORK_NAME=sepolia`.

Available choices are: `mainnet`, `ropsten`, `kovan`, `rinkeby`, `goerli` and
`localhost`.
Available choices are: `mainnet`, `goerli`, `sepolia` and `localhost`.

To create and switch to custom network at metamask setup phase, use these:

Expand All @@ -195,7 +194,7 @@ Metamask version is hardcoded and frequently updated under supervision to avoid
a case when e2e tests break because of CSS classes changes in new version, so
all you need is to keep synpress updated in your project. However, you can still
override metamask with `METAMASK_VERSION` environmental variable, for example:
`METAMASK_VERSION=9.3.0` or `METAMASK_VERSION=latest`.
`METAMASK_VERSION=10.21.0` or `METAMASK_VERSION=latest`.

If you don't want to use environmental variables, you can modify
[`setupMetamask()`](https://github.com/synthetixio/synpress/blob/dev/support/index.js#L29)
Expand Down Expand Up @@ -226,8 +225,8 @@ use `STABLE_MODE=true` (which will introduce delays only between main actions,
300ms by default) / `STABLE_MODE=<value>` or `SLOW_MODE=true` (which will
introduce delay between every action, 50ms by default) / `SLOW_MODE=<value>`.

`DEBUG=synpress:*` is very useful while debugging your tests. It enables following
features:
`DEBUG=synpress:*` is very useful while debugging your tests. It enables
following features:

- improved logging
- [cypress debugger](https://docs.cypress.io/guides/guides/debugging)
Expand Down
Loading

0 comments on commit 28fccc2

Please sign in to comment.