Skip to content

Commit

Permalink
fix: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
matstyler committed Oct 13, 2024
1 parent fa9ed0b commit e8c402d
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig({
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Docs', link: '/docs/getting-started' },
{ text: 'API', link: '/api/' },
{ text: 'API', link: '/api/index/' },
{ text: 'Examples', link: 'https://github.com/Synthetixio/synpress/tree/new-dawn/examples' },
{
text: pkg.version,
Expand Down
6 changes: 3 additions & 3 deletions docs/api/cypress/classes/MetaMask.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ True if the connection was successful
```ts
createAnvilNode(options?): Promise<{
"anvil": any;
"anvil": Anvil;
"chainId": number;
"rpcUrl": string;
}>
Expand All @@ -295,7 +295,7 @@ Creates an Anvil node for testing.
#### Returns
`Promise`\<\{
`"anvil"`: `any`;
`"anvil"`: `Anvil`;
`"chainId"`: `number`;
`"rpcUrl"`: `string`;
\}\>
Expand All @@ -304,7 +304,7 @@ Object containing the Anvil instance, RPC URL, and chain ID
| Member | Type |
| :------ | :------ |
| `anvil` | `any` |
| `anvil` | `Anvil` |
| `chainId` | `number` |
| `rpcUrl` | `string` |
Expand Down
2 changes: 1 addition & 1 deletion docs/api/playwright/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| :------ | :------ |
| [EthereumWalletMock](classes/EthereumWalletMock.md) | Mock implementation of an Ethereum wallet for testing purposes. |
| [MetaMask](classes/MetaMask.md) | MetaMask class for interacting with the MetaMask extension in Playwright tests. |
| [OPTIMISM\_NETWORK\_ID](variables/OPTIMISM_NETWORK_ID.md) | The network ID (Optimism network by default). |
| [DEFAULT\_NETWORK\_ID](variables/DEFAULT_NETWORK_ID.md) | The network ID (Optimism network by default). |
| [PRIVATE\_KEY](variables/PRIVATE_KEY.md) | The private key used for testing purposes. |
| [web3MockPath](variables/web3MockPath.md) | Relative path to the web3-mock bundle. |
| [ethereumWalletMockFixtures](functions/ethereumWalletMockFixtures.md) | Declares a test. |
Expand Down
9 changes: 9 additions & 0 deletions docs/api/playwright/variables/DEFAULT_NETWORK_ID.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Variable: DEFAULT\_NETWORK\_ID

```ts
const DEFAULT_NETWORK_ID: "0xa" = "0xa";
```

The network ID (Optimism network by default).

## Constant
9 changes: 0 additions & 9 deletions docs/api/playwright/variables/OPTIMISM_NETWORK_ID.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/api/typedoc-sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"text": "Variables",
"collapsed": true,
"items": [
{ "text": "OPTIMISM_NETWORK_ID", "link": "/api/playwright/variables/OPTIMISM_NETWORK_ID.md" },
{ "text": "DEFAULT_NETWORK_ID", "link": "/api/playwright/variables/DEFAULT_NETWORK_ID.md" },
{ "text": "PRIVATE_KEY", "link": "/api/playwright/variables/PRIVATE_KEY.md" },
{ "text": "web3MockPath", "link": "/api/playwright/variables/web3MockPath.md" }
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ACCOUNT_MOCK, BLOCKCHAIN } from '../constants'
import { EthereumWalletMockAbstract } from '../type/EthereumWalletMockAbstract'
import type { Network } from '../type/Network'
import type { WalletMock } from '../type/WalletMock'
import { OPTIMISM_NETWORK_ID } from './utils'
import { DEFAULT_NETWORK_ID } from './utils'

/**
* Mock implementation of an Ethereum wallet for testing purposes.
Expand Down Expand Up @@ -195,7 +195,7 @@ export default class EthereumWalletMock extends EthereumWalletMockAbstract {
params: [{ chainId }]
})
},
[BLOCKCHAIN, this.wallet, networkName, OPTIMISM_NETWORK_ID]
[BLOCKCHAIN, this.wallet, networkName, DEFAULT_NETWORK_ID]
)
}

Expand Down
7 changes: 1 addition & 6 deletions wallets/ethereum-wallet-mock/src/playwright/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ const require = createRequire(import.meta.url)
*/
export const PRIVATE_KEY = 'ea084c575a01e2bbefcca3db101eaeab1d8af15554640a510c73692db24d0a6a'

/**
* The network ID (Optimism network by default).
* @constant
* @type {string}
*/
export const OPTIMISM_NETWORK_ID = '0xa'
export const DEFAULT_NETWORK_ID = '0xa'

/**
* Relative path to the web3-mock bundle.
Expand Down

0 comments on commit e8c402d

Please sign in to comment.