Skip to content

Commit 7f70736

Browse files
authored
Merge pull request #259 from lidofinance/develop
Develop -> Main
2 parents 2723a8b + 2466985 commit 7f70736

31 files changed

+1491
-747
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ on:
77
description: 'Stand env'
88
required: true
99
type: choice
10-
default: testnet
10+
default: hoodi-testnet
1111
options:
12-
- testnet
12+
- hoodi-testnet
1313
WALLETS:
1414
description: 'Select wallet to run tests'
1515
required: true
@@ -19,7 +19,6 @@ on:
1919
- all
2020
- metamask
2121
- okx
22-
- trust
2322
SUITE:
2423
description: 'Select suite for test run'
2524
default: all
@@ -55,6 +54,7 @@ jobs:
5554
- uses: actions/setup-node@v4
5655
with:
5756
node-version: '20'
57+
cache: 'yarn'
5858

5959
- name: Install dependencies
6060
run: yarn install --immutable

apps/demo-react/components/layout/header/header-wallet-info-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const HeaderWalletInfoButton = () => {
77
const { setIsWalletInfoIsOpen } = useClientConfig();
88

99
return (
10-
<HeaderControlButton onClick={() => setIsWalletInfoIsOpen(true)}>
10+
<HeaderControlButton onClick={() => setIsWalletInfoIsOpen(true)} data-testid='walletInfoBtn'>
1111
<GearIcon />
1212
</HeaderControlButton>
1313
);

apps/demo-react/components/wallet-info/chains-config.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export const ChainsConfig = () => {
3030
<DataTableRowStyle
3131
key={chainId}
3232
highlight
33+
data-testid={'chain-'+chainId}
3334
title={
3435
<>
3536
{chainId}

apps/demo-react/components/wallet-info/wallet-info-content.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export const WalletInfoContent = ({
4949
size="xs"
5050
variant="outlined"
5151
color="secondary"
52+
data-testid="closeWalletInfoBtn"
5253
onClick={() => setIsWalletInfoIsOpen(false)}
5354
/>
5455
</WalletInfoHeaderStyles>
Lines changed: 6 additions & 43 deletions
Loading

playwright-tests/.env.example

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
### Playwright test run .env configuration
22

3-
# Stand env for the wallet setup. Can be equal: testnet
3+
# Stand env for the wallet setup. Can be equal: hoodi-testnet
44
STAND_ENV=
55

66
# Link type for a test run. Can be equal: stand, localhost
77
STAND_TYPE=localhost
88

9+
# Test suite type. Can be eual : all, transactions, wallet-connection
10+
SUITE=
11+
912
# WalletConfig configurations
1013
## Secret phase of the wallet to set up the wallet extension
1114
WALLET_SECRET_PHRASE=

playwright-tests/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ test-results/
55
playwright-report/
66
.browser_context_*
77
logs/
8-
.yalc
8+
.yalc
9+
.yarn/*
-200 KB
Binary file not shown.

playwright-tests/config/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ function getStandConfig() {
1414
switch (ENV_CONFIG.STAND_ENV) {
1515
case 'mainnet':
1616
return STAND_CONFIGS.get(STAND_ENV.mainnet);
17-
case 'testnet':
18-
return STAND_CONFIGS.get(STAND_ENV.testnet);
17+
case 'hoodi-testnet':
18+
return STAND_CONFIGS.get(STAND_ENV.hoodiTestnet);
1919
default:
2020
throw new Error(
2121
`CONFIG_VALIDATION_ERROR: STAND_ENV is not correctly defined (value is "${ENV_CONFIG.STAND_ENV}"). Please fix in the .env file`,
Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { NetworkConfig } from '@lidofinance/wallets-testing-wallets';
22
import { NETWORKS_CONFIG } from '@lidofinance/wallets-testing-wallets';
3-
import { WALLETS } from './wallet.config';
4-
import { REEF_KNOT_CONFIG } from './config';
53
import { ENV_CONFIG } from './env.validation';
64

75
export interface StandConfig {
@@ -14,7 +12,7 @@ export interface StandConfig {
1412
}
1513

1614
export const STAND_ENV = {
17-
testnet: 'testnet',
15+
hoodiTestnet: 'hoodi-testnet',
1816
mainnet: 'mainnet',
1917
};
2018

@@ -25,20 +23,24 @@ export const STAND_LINK = {
2523

2624
export const STAND_CONFIGS = new Map<string, StandConfig>([
2725
[
28-
STAND_ENV.testnet,
26+
STAND_ENV.hoodiTestnet,
2927
{
30-
networkConfig: NETWORKS_CONFIG.Testnet.ETHEREUM_HOLESKY,
28+
networkConfig: {
29+
...NETWORKS_CONFIG.testnet.ETHEREUM_HOODI,
30+
rpcUrl: formatDrpc('hoodi'),
31+
chainName: 'Hoodi',
32+
},
3133
contracts: {
32-
stake: '0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034',
33-
wrap: '0x8d09a4502Cc8Cf1547aD300E066060D043f6982D',
34-
withdraw: '0xc7cc160b58F8Bb0baC94b80847E2CF2800565C50',
34+
stake: '0x3508A952176b3c15387C97BE809eaffB1982176a',
35+
wrap: '0x7E99eE3C66636DE415D2d7C880938F2f40f94De4',
36+
withdraw: '0xfe56573178f1bcdf53F01A6E9977670dcBBD9186',
3537
},
3638
},
3739
],
3840
[
3941
STAND_ENV.mainnet,
4042
{
41-
networkConfig: NETWORKS_CONFIG.Mainnet.ETHEREUM,
43+
networkConfig: NETWORKS_CONFIG.mainnet.ETHEREUM,
4244
contracts: {
4345
stake: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
4446
wrap: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
@@ -48,12 +50,6 @@ export const STAND_CONFIGS = new Map<string, StandConfig>([
4850
],
4951
]);
5052

51-
/** Some wallets fail validation of the default drpc link because it has params.
52-
* So, we use free links for these wallets.
53-
* - function used only for testnet because the Ethereum mainnet network installed in the wallet permanently*/
54-
export function getRpcByWallet(walletName: string) {
55-
if (REEF_KNOT_CONFIG.STAND_CONFIG.networkConfig.chainId === 1)
56-
return NETWORKS_CONFIG.Mainnet.ETHEREUM.rpcUrl;
57-
if (!WALLETS.get(walletName).canUseAnyRpc) return 'https://1rpc.io/holesky';
58-
return `https://lb.drpc.org/ogrpc?network=holesky&dkey=${ENV_CONFIG.RPC_URL_KEY}`;
53+
function formatDrpc(chainName: string): string {
54+
return `https://lb.drpc.org/ogrpc?network=${chainName}&dkey=${ENV_CONFIG.RPC_URL_KEY}`;
5955
}

0 commit comments

Comments
 (0)