From 7d1d08d3297af7decae38e80721fb75bea43468a Mon Sep 17 00:00:00 2001 From: Luiz Gomes <8636507+LuizAsFight@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:05:21 -0300 Subject: [PATCH 1/8] fix: enable e2e contract tests (#1634) - Closes #1632 - Closes FE-854 - update to fuel-core 0.40.0 - add timeout after connecting to give time for selectors - compare addresses using `address.toString()` instead of `address.toAddress()`, using checksum correctly - compare contract address using the string directly instead of converting to bech32 - the comparisons done in `utils/address.ts` will now consider the input address instead of trying magics to convert it - log the Master Wallet address to enable us easily funding it when needed for testnet/devnet - select network when setup wallet --- .github/workflows/pr-tests.yml | 2 - docker/fuel-core/Dockerfile | 8 +- package.json | 7 +- packages/connections/package.json | 2 +- .../playwright/e2e/DepositHalfEth.test.ts | 11 +- .../e2e/ForwardAndMintMulticall.test.ts | 9 +- .../playwright/e2e/ForwardCustomAsset.test.ts | 8 +- .../playwright/e2e/ForwardEth.test.ts | 7 +- .../e2e/ForwardHalfAndExternalMint.test.ts | 13 +- .../playwright/e2e/ForwardHalfAndMint.test.ts | 9 +- .../e2e/ForwardHalfCustomAsset.test.ts | 12 +- .../playwright/e2e/MintAsset.test.ts | 20 +- .../playwright/e2e/utils/address.ts | 11 +- .../playwright/e2e/utils/contract.ts | 2 + .../playwright/utils/setup.ts | 2 + .../src/contracts/contracts/CustomAsset.ts | 8 +- .../contracts/contracts/CustomAssetFactory.ts | 4 +- .../src/contracts/contracts/common.d.ts | 4 +- .../src/contracts/contracts/index.ts | 4 +- .../playwright-utils/fuelWalletTestHelper.ts | 36 +- .../src/playwright-utils/seedWallet.ts | 4 + pnpm-lock.yaml | 1419 +++++++++++++++-- 22 files changed, 1364 insertions(+), 238 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index cd105753f..203f08d6d 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -148,8 +148,6 @@ jobs: tests-e2e-contracts: name: E2E Contract Tests - Local runs-on: buildjet-8vcpu-ubuntu-2204 - # Commented until the Playwright bug is fixed - if: false steps: - uses: actions/checkout@v3 - uses: FuelLabs/github-actions/setups/node@master diff --git a/docker/fuel-core/Dockerfile b/docker/fuel-core/Dockerfile index e7d44be79..e077efc5d 100644 --- a/docker/fuel-core/Dockerfile +++ b/docker/fuel-core/Dockerfile @@ -6,7 +6,7 @@ # We should be supporting always the same fuel-core version as the fuels (ts-sdk) # https://github.com/FuelLabs/fuels-ts/blob/master/internal/fuel-core/VERSION -FROM ghcr.io/fuellabs/fuel-core:v0.39.0 +FROM ghcr.io/fuellabs/fuel-core:v0.40.0 # dependencies ENV DEBIAN_FRONTEND=noninteractive @@ -19,9 +19,7 @@ COPY ./genesis_coins.json . RUN git clone \ https://github.com/FuelLabs/chain-configuration.git \ - /chain-configuration && \ - cd /chain-configuration && \ - git checkout 0dc0960f14da7b6650b5438dc1e99d7ff7acec73 + /chain-configuration # Copy the base local configuration RUN cp -R /chain-configuration/local/* ./ @@ -29,7 +27,7 @@ RUN cp -R /chain-configuration/local/* ./ # Copy the testnet consensus parameters and state transition bytecode RUN cp /chain-configuration/upgradelog/ignition-devnet/consensus_parameters/13.json \ ./latest_consensus_parameters.json -RUN cp /chain-configuration/upgradelog/ignition-devnet/state_transition_function/15.wasm \ +RUN cp /chain-configuration/upgradelog/ignition-devnet/state_transition_function/16.wasm \ ./state_transition_bytecode.wasm # update local state_config with custom genesis coins config diff --git a/package.json b/package.json index 23ab0d9d4..30a5e7e50 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "@changesets/cli": "^2.26.2", "@fuels/ts-config": "0.20.0", "@jest/types": "29.6.3", + "@playwright/test": "1.46.1", "@types/jest": "^29.5.5", "@types/node": "20.8.4", "@types/react": "^18.3.3", @@ -88,8 +89,7 @@ "ts-node": "^10.9.1", "turbo": "^1.10.15", "typescript": "^5.2.2", - "updates": "^15.0.2", - "@playwright/test": "1.46.1" + "updates": "^15.0.2" }, "pnpm": { "peerDependencyRules": { @@ -123,7 +123,8 @@ "send@<0.19.0": ">=0.19.0", "serve-static@<1.16.0": ">=1.16.0", "rollup@>=4.0.0 <4.22.4": ">=4.22.4", - "fuels": "0.96.1" + "fuels": "0.96.1", + "secp256k1@=5.0.0": ">=5.0.1" } } } diff --git a/packages/connections/package.json b/packages/connections/package.json index 56ee4e11d..feb7c2c42 100644 --- a/packages/connections/package.json +++ b/packages/connections/package.json @@ -31,7 +31,7 @@ "uuid": "^9.0.1" }, "peerDependencies": { - "fuels": "0.95.0" + "fuels": "0.96.1" }, "devDependencies": { "@fuel-wallet/types": "workspace:*", diff --git a/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts b/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts index f16904b14..bafec20f3 100644 --- a/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts @@ -49,7 +49,7 @@ test.describe('Deposit Half ETH', () => { const depositHalfInput = page .getByLabel('Deposit half eth card') - .locator('input'); + .getByRole('textbox'); await depositHalfInput.fill(depositAmount); const depositHalfButton = getButtonByText(page, 'Deposit Half ETH', true); @@ -96,15 +96,14 @@ test.describe('Deposit Half ETH', () => { // }); // test to and from addresses - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts index 196cfa8c2..76ccba697 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts @@ -100,15 +100,14 @@ test.describe('Forward and Mint Multicall', () => { // maxFee: fee.add(100), // }); - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts index 2adf024c2..4863690af 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardCustomAsset.test.ts @@ -59,7 +59,6 @@ test.describe('Forward Custom Asset', () => { }; const { waitForResult } = await contract.functions .mint(recipient, await getBaseAssetId(), bn(100_000_000_000)) - .txParams({ gasLimit: 1_000_000 }) .call(); await waitForResult(); @@ -68,7 +67,7 @@ test.describe('Forward Custom Asset', () => { const formattedForwardCustomAssetAmount = '12,345'; const forwardCustomAssetInput = page .getByLabel('Forward custom asset card') - .locator('input'); + .getByRole('textbox'); await forwardCustomAssetInput.fill(forwardCustomAssetAmount); const forwardCustomAssetButton = getButtonByText( @@ -107,10 +106,9 @@ test.describe('Forward Custom Asset', () => { // maxFee: fee.add(100), // }); - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts index 9615f9d39..0b499bbe0 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts @@ -48,7 +48,7 @@ test.describe('Forward Eth', () => { const forwardEthInput = page .getByLabel('Forward eth card') - .locator('input'); + .getByRole('textbox'); await forwardEthInput.fill(forwardEthAmount); const forwardEthButton = getButtonByText(page, 'Forward ETH'); @@ -85,10 +85,9 @@ test.describe('Forward Eth', () => { // }); // test to and from addresses - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts index a853b22e7..3f3aa981d 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts @@ -117,22 +117,21 @@ test.describe('Forward Half ETH and Mint External Custom Asset', () => { // maxFee: fee.add(100), // }); - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: toBech32(EXTERNAL_CONTRACT_ID), isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: EXTERNAL_CONTRACT_ID, isContract: true }, walletNotificationPage, 1, 1 ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts index 33c5e6874..c11e69ed4 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts @@ -113,15 +113,14 @@ test.describe('Forward Half ETH and Mint Custom Asset', () => { // }); // test to and from addresses - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts index 0546207bf..d9d2f978d 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts @@ -63,14 +63,13 @@ test.describe('Forward Half Custom Asset', () => { const assetId = calculateAssetId(MAIN_CONTRACT_ID, await getBaseAssetId()); const { waitForResult } = await contract.functions .mint(recipient, await getBaseAssetId(), bn(100_000_000_000)) - .txParams({ gasLimit: 1_000_000 }) .call(); await waitForResult(); const forwardHalfCustomAssetInput = page .getByLabel('Forward half custom asset card') - .locator('input'); + .getByRole('textbox'); await forwardHalfCustomAssetInput.fill(forwardCustomAssetAmount); const forwardHalfCustomAssetButton = getButtonByText( @@ -117,15 +116,14 @@ test.describe('Forward Half Custom Asset', () => { // }); // test to and from addresses - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts index 68faa459a..56cc1ec8b 100644 --- a/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts @@ -50,7 +50,7 @@ test.describe('Mint Assets', () => { const mintAmount = '12345'; const formattedMintAmount = '12,345'; - const mintInput = page.getByLabel('Mint asset card').locator('input'); + const mintInput = page.getByLabel('Mint asset card').getByRole('textbox'); await mintInput.fill(mintAmount); const mintButton = getButtonByText(page, 'Mint', true); @@ -75,15 +75,14 @@ test.describe('Mint Assets', () => { // maxFee: fee.add(100), // }); - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); @@ -157,15 +156,14 @@ test.describe('Mint Assets', () => { // }); // test to and from addresses - const fuelContractId = toBech32(MAIN_CONTRACT_ID); await checkAddresses( - { address: fuelWallet.address.toAddress(), isContract: false }, - { address: fuelContractId, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, walletNotificationPage ); await checkAddresses( - { address: fuelContractId, isContract: true }, - { address: fuelWallet.address.toAddress(), isContract: false }, + { address: MAIN_CONTRACT_ID, isContract: true }, + { address: fuelWallet.address.toString(), isContract: false }, walletNotificationPage ); diff --git a/packages/e2e-contract-tests/playwright/e2e/utils/address.ts b/packages/e2e-contract-tests/playwright/e2e/utils/address.ts index c8da12b73..b3939a7e4 100644 --- a/packages/e2e-contract-tests/playwright/e2e/utils/address.ts +++ b/packages/e2e-contract-tests/playwright/e2e/utils/address.ts @@ -1,6 +1,6 @@ import type { Page } from '@playwright/test'; import { expect } from '@playwright/test'; -import { Address, type Bech32Address } from 'fuels'; +import { Address } from 'fuels'; import { shortAddress } from '../../../src/utils'; @@ -22,9 +22,8 @@ export const checkAddresses = async ( hasNotText: 'To', }) .nth(fromPosition); - const fromShortAddress = shortAddress( - Address.fromDynamicInput(from.address).toB256() - ); + + const fromShortAddress = shortAddress(from.address); const fromAddressText = fromArticle .getByRole('paragraph') .getByText(fromShortAddress, { exact: true }); @@ -43,9 +42,7 @@ export const checkAddresses = async ( hasNotText: 'From', }) .nth(toPosition); - const toShortAddress = shortAddress( - Address.fromDynamicInput(to.address).toB256() - ); + const toShortAddress = shortAddress(to.address); const toAddressText = toArticle .getByRole('paragraph') .getByText(toShortAddress, { exact: true }); diff --git a/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts b/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts index 9e5249eee..b877da6b3 100644 --- a/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts +++ b/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts @@ -11,4 +11,6 @@ export const connect = async ( await connectButton.click(); await getByAriaLabel(page, `Connect to ${walletName}`, true).click(); await fuelWalletTestHelper.walletConnect(); + + await page.waitForTimeout(3000); }; diff --git a/packages/e2e-contract-tests/playwright/utils/setup.ts b/packages/e2e-contract-tests/playwright/utils/setup.ts index 23e0a7579..7457772a2 100644 --- a/packages/e2e-contract-tests/playwright/utils/setup.ts +++ b/packages/e2e-contract-tests/playwright/utils/setup.ts @@ -31,6 +31,8 @@ export const testSetup = async ({ const fuelProvider = await Provider.create(VITE_FUEL_PROVIDER_URL!); const masterWallet = Wallet.fromMnemonic(VITE_MASTER_WALLET_MNEMONIC!); masterWallet.connect(fuelProvider); + + console.log('--- Master wallet address:', masterWallet.address.toString()); if (VITE_WALLET_SECRET) { await seedWallet( masterWallet.address.toString(), diff --git a/packages/e2e-contract-tests/src/contracts/contracts/CustomAsset.ts b/packages/e2e-contract-tests/src/contracts/contracts/CustomAsset.ts index cabfbec6c..513df33c2 100644 --- a/packages/e2e-contract-tests/src/contracts/contracts/CustomAsset.ts +++ b/packages/e2e-contract-tests/src/contracts/contracts/CustomAsset.ts @@ -1,4 +1,3 @@ -/* THIS FILE WAS EDITED MANUALLY TO REMOVE THE "declare" OCCURRENCES BREAKING PLAYWRIGHT TESTS */ /* Autogenerated file. Do not edit manually. */ /* eslint-disable max-classes-per-file */ @@ -6,9 +5,9 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.95.0 + Fuels version: 0.96.0 Forc version: 0.65.2 - Fuel-Core version: 0.37.1 + Fuel-Core version: 0.38.0 */ import { Contract, Interface } from "fuels"; @@ -517,11 +516,14 @@ export class CustomAssetInterface extends Interface { constructor() { super(abi); } + } export class CustomAsset extends Contract { static readonly abi = abi; static readonly storageSlots = storageSlots; + + constructor( id: string | AbstractAddress, accountOrProvider: Account | Provider, diff --git a/packages/e2e-contract-tests/src/contracts/contracts/CustomAssetFactory.ts b/packages/e2e-contract-tests/src/contracts/contracts/CustomAssetFactory.ts index 6544abca7..85a1b8db9 100644 --- a/packages/e2e-contract-tests/src/contracts/contracts/CustomAssetFactory.ts +++ b/packages/e2e-contract-tests/src/contracts/contracts/CustomAssetFactory.ts @@ -5,9 +5,9 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.95.0 + Fuels version: 0.96.0 Forc version: 0.65.2 - Fuel-Core version: 0.37.1 + Fuel-Core version: 0.38.0 */ import { Contract, ContractFactory, decompressBytecode } from "fuels"; diff --git a/packages/e2e-contract-tests/src/contracts/contracts/common.d.ts b/packages/e2e-contract-tests/src/contracts/contracts/common.d.ts index 2f3737369..e03132349 100644 --- a/packages/e2e-contract-tests/src/contracts/contracts/common.d.ts +++ b/packages/e2e-contract-tests/src/contracts/contracts/common.d.ts @@ -5,9 +5,9 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.95.0 + Fuels version: 0.96.0 Forc version: 0.65.2 - Fuel-Core version: 0.37.1 + Fuel-Core version: 0.38.0 */ /** diff --git a/packages/e2e-contract-tests/src/contracts/contracts/index.ts b/packages/e2e-contract-tests/src/contracts/contracts/index.ts index ded9bc398..7632ef16b 100644 --- a/packages/e2e-contract-tests/src/contracts/contracts/index.ts +++ b/packages/e2e-contract-tests/src/contracts/contracts/index.ts @@ -5,9 +5,9 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ /* - Fuels version: 0.95.0 + Fuels version: 0.96.0 Forc version: 0.65.2 - Fuel-Core version: 0.37.1 + Fuel-Core version: 0.38.0 */ export { CustomAsset } from './CustomAsset'; diff --git a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts index 583015aea..366094345 100644 --- a/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts +++ b/packages/playwright-utils/src/playwright-utils/fuelWalletTestHelper.ts @@ -226,27 +226,27 @@ export class FuelWalletTestHelper { const networksButton = getByAriaLabel(this.walletPage, 'Selected Network'); await networksButton.click(); - if ((await this.walletPage.getByText(chainName).count()) === 0) { - const addNetworkButton = getByAriaLabel(this.walletPage, 'Add network'); - await addNetworkButton.click(); + const networkLocator = this.walletPage.getByText(chainName); + const hasNetwork = (await networkLocator.count()) > 0; - const urlInput = getByAriaLabel(this.walletPage, 'Network url'); - await urlInput.fill(providerUrl); + if (hasNetwork) { + await networkLocator.click(); + return; + } - await getByAriaLabel(this.walletPage, 'Test connection').click(); + const addNetworkButton = getByAriaLabel(this.walletPage, 'Add network'); + await addNetworkButton.click(); - const addNewNetworkButton = getByAriaLabel( - this.walletPage, - 'Add new network' - ); - await addNewNetworkButton.click(); - } else { - const closeNetworkButton = getByAriaLabel( - this.walletPage, - 'Close dialog' - ); - await closeNetworkButton.click(); - } + const urlInput = getByAriaLabel(this.walletPage, 'Network url'); + await urlInput.fill(providerUrl); + + await getByAriaLabel(this.walletPage, 'Test connection').click(); + + const addNewNetworkButton = getByAriaLabel( + this.walletPage, + 'Add new network' + ); + await addNewNetworkButton.click(); } async switchNetwork(chainName: string) { diff --git a/packages/playwright-utils/src/playwright-utils/seedWallet.ts b/packages/playwright-utils/src/playwright-utils/seedWallet.ts index 380469931..509a57330 100644 --- a/packages/playwright-utils/src/playwright-utils/seedWallet.ts +++ b/packages/playwright-utils/src/playwright-utils/seedWallet.ts @@ -12,6 +12,10 @@ export async function seedWallet( const baseAssetId = fuelProvider.getBaseAssetId(); const genesisWallet = Wallet.fromPrivateKey(genesisSecret!, fuelProvider); const parameters: TxParamsType = { gasLimit: bn(100_000), ...options }; + console.log( + '--- Seeding wallet from SECRET wallet', + genesisWallet.address.toString() + ); const response = await genesisWallet.transfer( Address.fromString(address), amount, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbec56bf9..db78e1f9e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,7 @@ overrides: serve-static@<1.16.0: '>=1.16.0' rollup@>=4.0.0 <4.22.4: '>=4.22.4' fuels: 0.96.1 + secp256k1@=5.0.0: '>=5.0.1' importers: @@ -97,7 +98,7 @@ importers: version: 3.0.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + version: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) @@ -112,10 +113,10 @@ importers: version: 4.1.5 ts-jest: specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.23.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.2))(jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2) + version: 29.1.1(@babel/core@7.23.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.2))(jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2) ts-node: specifier: ^10.9.1 - version: 10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2) + version: 10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2) turbo: specifier: ^1.10.15 version: 1.10.15 @@ -182,7 +183,7 @@ importers: version: 0.23.3(@fuel-ui/css@0.23.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(@fuel-ui/icons@0.23.3)(@types/react-dom@18.3.0)(@types/react@18.3.3)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@fuel-ui/test-utils': specifier: 0.17.0 - version: 0.17.0(@babel/core@7.24.0)(@jest/types@29.6.3)(@types/node@22.7.6)(babel-jest@29.7.0(@babel/core@7.24.0))(bufferutil@4.0.8)(esbuild@0.18.20)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2)(utf-8-validate@5.0.10) + version: 0.17.0(@babel/core@7.24.0)(@jest/types@29.6.3)(@types/node@22.7.6)(babel-jest@29.7.0(@babel/core@7.24.0))(bufferutil@4.0.8)(esbuild@0.18.20)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2)(utf-8-validate@5.0.10) '@fuel-wallet/connections': specifier: workspace:* version: link:../connections @@ -206,7 +207,7 @@ importers: version: 7.4.6(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@storybook/jest': specifier: 0.2.3 - version: 0.2.3(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2))) + version: 0.2.3(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))) '@tanstack/react-query': specifier: 5.28.4 version: 5.28.4(react@18.3.1) @@ -402,7 +403,7 @@ importers: version: 3.0.1(@types/react-dom@18.3.0)(@types/react@18.3.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) ts-jest-mock-import-meta: specifier: 1.1.0 - version: 1.1.0(ts-jest@29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2)) + version: 1.1.0(ts-jest@29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2)) tsconfig-paths-webpack-plugin: specifier: 4.1.0 version: 4.1.0 @@ -457,7 +458,7 @@ importers: version: 29.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.4) tsup: specifier: ^7.2.0 - version: 7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2) + version: 7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2) undici: specifier: ^6.4.0 version: 6.16.1 @@ -608,7 +609,7 @@ importers: version: 15.5.8 next-images: specifier: 1.8.5 - version: 1.8.5(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))) + version: 1.8.5(webpack@5.91.0(@swc/core@1.3.92)) prettier: specifier: 2.8.8 version: 2.8.8 @@ -617,7 +618,7 @@ importers: dependencies: '@fuels/connectors': specifier: 0.35.1 - version: 0.35.1(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(bufferutil@4.0.8)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4) + version: 0.35.1(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(bufferutil@4.0.8)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4) '@fuels/react': specifier: 0.35.1 version: 0.35.1(@tanstack/react-query@5.28.4(react@18.3.1))(@types/react-dom@18.3.0)(@types/react@18.3.3)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -697,7 +698,7 @@ importers: version: 0.23.0(typescript@5.2.2) '@fuels/tsup-config': specifier: ^0.23.0 - version: 0.23.0(tsup@7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2)) + version: 0.23.0(tsup@7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2)) '@playwright/test': specifier: 1.46.1 version: 1.46.1 @@ -709,7 +710,7 @@ importers: version: 0.96.1 tsup: specifier: ^7.2.0 - version: 7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2) + version: 7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2) packages/types: dependencies: @@ -725,7 +726,7 @@ importers: version: 1.7.0 tsup: specifier: ^7.2.0 - version: 7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2) + version: 7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2) packages: @@ -2802,13 +2803,8 @@ packages: '@fuel-ui/css': '>=0.23.3' '@fuel-ui/icons': '>=0.23.3' fuels: 0.96.1 - react: '*' - react-dom: '*' - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true + react: ^18.2.0 + react-dom: ^18.2.0 '@fuel-ui/test-utils@0.17.0': resolution: {integrity: sha512-cQfMlrxG6gma/HSKj1v4Mcyr0hREY3w8KH0NXhtVHBOAU6rrWLlYpB26vXxriue5cv90gsRqOZU5YtgrKEHpyA==} @@ -7626,9 +7622,6 @@ packages: dayjs@1.11.10: resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} - dayjs@1.11.13: - resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} - debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -11805,9 +11798,9 @@ packages: search-insights@2.13.0: resolution: {integrity: sha512-Orrsjf9trHHxFRuo9/rzm0KIWmgzE8RMlZMzuhZOJ01Rnz3D0YBAe+V6473t6/H6c7irs6Lt48brULAiRWb3Vw==} - secp256k1@5.0.0: - resolution: {integrity: sha512-TKWX8xvoGHrxVdqbYeZM9w+izTF4b9z3NhSaDkdn81btvuh+ivbIMGT/zQvDtTFWhRlThpoz6LEYTr7n8A5GcA==} - engines: {node: '>=14.0.0'} + secp256k1@5.0.1: + resolution: {integrity: sha512-lDFs9AAIaWP9UCdtWrotXWWF9t8PWgQDcxqgAnpM9rMqxb3Oaq2J0thzPVSxBwdJgyQtkU/sYtFtbM1RSt/iYA==} + engines: {node: '>=18.0.0'} section-matter@1.0.0: resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} @@ -13085,7 +13078,7 @@ packages: engines: {node: '>=12.20.0'} peerDependencies: '@types/react': '>=16.8' - react: '*' + react: '>=16.8' peerDependenciesMeta: '@types/react': optional: true @@ -13887,6 +13880,19 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 semver: 7.5.4 + '@babel/helper-create-class-features-plugin@7.22.9(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-function-name': 7.23.0 + '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.25.8) + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + semver: 7.5.4 + '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -13913,6 +13919,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-member-expression-to-functions': 7.25.7 + '@babel/helper-optimise-call-expression': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/traverse': 7.25.7 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + '@babel/helper-create-regexp-features-plugin@7.22.9(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -13927,6 +13946,13 @@ snapshots: regexpu-core: 5.3.2 semver: 7.5.4 + '@babel/helper-create-regexp-features-plugin@7.22.9(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.22.5 + regexpu-core: 5.3.2 + semver: 7.5.4 + '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -13941,6 +13967,13 @@ snapshots: regexpu-core: 6.1.1 semver: 7.6.3 + '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + regexpu-core: 6.1.1 + semver: 7.6.3 + '@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -13963,6 +13996,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-define-polyfill-provider@0.4.2(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.23.6 + '@babel/helper-plugin-utils': 7.22.5 + debug: 4.3.4 + lodash.debounce: 4.0.8 + resolve: 1.22.4 + transitivePeerDependencies: + - supports-color + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -13985,6 +14029,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + debug: 4.3.7 + lodash.debounce: 4.0.8 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + '@babel/helper-environment-visitor@7.22.20': {} '@babel/helper-environment-visitor@7.22.5': {} @@ -14047,6 +14102,15 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-module-transforms@7.22.9(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-module-imports': 7.22.5 + '@babel/helper-simple-access': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 + '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-module-transforms@7.23.0(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14121,6 +14185,13 @@ snapshots: '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-wrap-function': 7.22.9 + '@babel/helper-remap-async-to-generator@7.22.9(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-wrap-function': 7.22.9 + '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14139,6 +14210,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-wrap-function': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/helper-replace-supers@7.22.9(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14153,6 +14233,13 @@ snapshots: '@babel/helper-member-expression-to-functions': 7.22.5 '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers@7.22.9(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-environment-visitor': 7.22.20 + '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14171,6 +14258,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-member-expression-to-functions': 7.25.7 + '@babel/helper-optimise-call-expression': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/helper-simple-access@7.22.5': dependencies: '@babel/types': 7.24.0 @@ -14297,6 +14393,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14311,6 +14412,13 @@ snapshots: '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.24.0) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.25.8) + '@babel/plugin-proposal-class-properties@7.18.6(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 @@ -14327,6 +14435,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-proposal-export-default-from@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-proposal-nullish-coalescing-operator@7.18.6(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 @@ -14348,6 +14461,10 @@ snapshots: dependencies: '@babel/core': 7.24.0 + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14360,6 +14477,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14370,6 +14493,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14391,6 +14519,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14401,6 +14534,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14411,6 +14549,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-export-default-from@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14421,6 +14564,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-export-default-from@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14431,6 +14579,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-flow@7.22.5(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 @@ -14446,6 +14599,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-flow@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14456,6 +14614,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-import-assertions@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14466,6 +14629,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-import-attributes@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14476,6 +14644,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14486,6 +14659,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-jsx@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14506,6 +14684,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14516,6 +14699,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14526,6 +14714,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14536,6 +14729,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14546,6 +14744,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14556,6 +14759,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14566,6 +14774,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14576,6 +14789,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14586,6 +14804,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14606,6 +14829,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14618,6 +14846,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14628,6 +14862,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-arrow-functions@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14638,6 +14877,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-async-generator-functions@7.22.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14654,6 +14898,14 @@ snapshots: '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.24.0) '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.24.0) + '@babel/plugin-transform-async-generator-functions@7.22.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.25.8) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.8) + '@babel/plugin-transform-async-generator-functions@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14672,6 +14924,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-async-generator-functions@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14686,6 +14947,13 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.24.0) + '@babel/plugin-transform-async-to-generator@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-imports': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-remap-async-to-generator': 7.22.9(@babel/core@7.25.8) + '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14704,6 +14972,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14714,6 +14991,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-block-scoped-functions@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14724,6 +15006,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-block-scoping@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14734,6 +15021,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14746,9 +15038,15 @@ snapshots: '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.23.2)': + '@babel/plugin-transform-class-properties@7.22.5(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.23.2 + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + + '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.23.2)': + dependencies: + '@babel/core': 7.23.2 '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.23.2) '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: @@ -14762,6 +15060,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14776,6 +15082,13 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.24.0) + '@babel/plugin-transform-class-static-block@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.8) + '@babel/plugin-transform-classes@7.22.6(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14802,6 +15115,19 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 + '@babel/plugin-transform-classes@7.22.6(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-environment-visitor': 7.22.5 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.25.8) + '@babel/helper-split-export-declaration': 7.22.6 + globals: 11.12.0 + '@babel/plugin-transform-classes@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14826,6 +15152,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) + '@babel/traverse': 7.25.7 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14838,6 +15176,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/template': 7.24.0 + '@babel/plugin-transform-computed-properties@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/template': 7.24.0 + '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14850,6 +15194,12 @@ snapshots: '@babel/helper-plugin-utils': 7.25.7 '@babel/template': 7.25.7 + '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/template': 7.25.7 + '@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14860,6 +15210,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-destructuring@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14870,6 +15225,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14882,6 +15242,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-dotall-regex@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14892,6 +15258,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-duplicate-keys@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14904,6 +15275,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.24.0) + '@babel/plugin-transform-dynamic-import@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14916,6 +15293,12 @@ snapshots: '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-exponentiation-operator@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14928,6 +15311,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.24.0) + '@babel/plugin-transform-export-namespace-from@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-flow-strip-types@7.22.5(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 @@ -14946,6 +15335,12 @@ snapshots: '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.24.0) + '@babel/plugin-transform-flow-strip-types@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-for-of@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14956,6 +15351,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-for-of@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14972,6 +15372,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-function-name@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -14986,6 +15394,13 @@ snapshots: '@babel/helper-function-name': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-function-name@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-function-name': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15004,6 +15419,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15016,6 +15440,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.24.0) + '@babel/plugin-transform-json-strings@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-literals@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15026,6 +15456,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-literals@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-literals@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15036,6 +15471,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15048,6 +15488,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.24.0) + '@babel/plugin-transform-logical-assignment-operators@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.8) + '@babel/plugin-transform-logical-assignment-operators@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15058,6 +15504,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-logical-assignment-operators@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15068,6 +15519,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-member-expression-literals@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15080,6 +15536,12 @@ snapshots: '@babel/helper-module-transforms': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-modules-amd@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15094,6 +15556,13 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-simple-access': 7.22.5 + '@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-simple-access': 7.22.5 + '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15112,6 +15581,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-simple-access': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15128,6 +15606,14 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-validator-identifier': 7.22.5 + '@babel/plugin-transform-modules-systemjs@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-hoist-variables': 7.22.5 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-validator-identifier': 7.22.5 + '@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15140,6 +15626,12 @@ snapshots: '@babel/helper-module-transforms': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-modules-umd@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15152,6 +15644,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-named-capturing-groups-regex@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15164,6 +15662,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-new-target@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15174,6 +15678,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-new-target@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15186,6 +15695,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.24.0) + '@babel/plugin-transform-nullish-coalescing-operator@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-nullish-coalescing-operator@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15196,6 +15711,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-nullish-coalescing-operator@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15208,6 +15728,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.24.0) + '@babel/plugin-transform-numeric-separator@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.8) + '@babel/plugin-transform-numeric-separator@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15218,6 +15744,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-numeric-separator@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/compat-data': 7.22.9 @@ -15236,6 +15767,15 @@ snapshots: '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.24.0) '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.24.0) + '@babel/plugin-transform-object-rest-spread@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/compat-data': 7.22.9 + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-object-rest-spread@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15250,6 +15790,13 @@ snapshots: '@babel/helper-plugin-utils': 7.25.7 '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.24.0) + '@babel/plugin-transform-object-rest-spread@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-object-super@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15262,6 +15809,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-replace-supers': 7.22.9(@babel/core@7.24.0) + '@babel/plugin-transform-object-super@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.25.8) + '@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15274,6 +15827,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.24.0) + '@babel/plugin-transform-optional-catch-binding@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-optional-catch-binding@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15284,6 +15843,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-optional-catch-binding@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-optional-chaining@7.22.6(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15298,6 +15862,13 @@ snapshots: '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.24.0) + '@babel/plugin-transform-optional-chaining@7.22.6(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-optional-chaining@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15314,6 +15885,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-optional-chaining@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-parameters@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15324,6 +15903,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-parameters@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15334,6 +15918,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15346,6 +15935,12 @@ snapshots: '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-private-methods@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15362,6 +15957,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15378,6 +15981,14 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.24.0) + '@babel/plugin-transform-private-property-in-object@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.8) + '@babel/plugin-transform-private-property-in-object@7.25.8(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15396,6 +16007,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-private-property-in-object@7.25.8(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15406,6 +16026,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-property-literals@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-react-constant-elements@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15431,6 +16056,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-react-display-name@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-react-jsx-development@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15456,6 +16086,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-react-jsx-self@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-react-jsx-source@7.23.3(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 @@ -15471,6 +16106,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-react-jsx-source@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15511,6 +16151,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-react-jsx@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) + '@babel/types': 7.25.8 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-react-pure-annotations@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15535,6 +16186,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 regenerator-transform: 0.15.1 + '@babel/plugin-transform-regenerator@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + regenerator-transform: 0.15.1 + '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15547,6 +16204,12 @@ snapshots: '@babel/helper-plugin-utils': 7.25.7 regenerator-transform: 0.15.2 + '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + regenerator-transform: 0.15.2 + '@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15557,6 +16220,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-reserved-words@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-runtime@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15581,6 +16249,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-runtime@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.8) + babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.8) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.8) + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15591,6 +16271,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-shorthand-properties@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15601,6 +16286,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-spread@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15613,6 +16303,12 @@ snapshots: '@babel/helper-plugin-utils': 7.22.5 '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-transform-spread@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/plugin-transform-spread@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15629,6 +16325,14 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15639,6 +16343,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-sticky-regex@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15649,6 +16358,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15659,6 +16373,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-template-literals@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15669,6 +16388,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-typeof-symbol@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-typescript@7.22.9(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15707,6 +16431,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.8) + transitivePeerDependencies: + - supports-color + '@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15717,6 +16452,11 @@ snapshots: '@babel/core': 7.24.0 '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-escapes@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15729,6 +16469,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-property-regex@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15741,6 +16487,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-regex@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15753,6 +16505,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -15765,6 +16523,12 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.24.0) '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-transform-unicode-sets-regex@7.22.5(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.22.9(@babel/core@7.25.8) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/preset-env@7.22.9(@babel/core@7.23.2)': dependencies: '@babel/compat-data': 7.22.9 @@ -15937,6 +16701,92 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/preset-env@7.22.9(@babel/core@7.25.8)': + dependencies: + '@babel/compat-data': 7.22.9 + '@babel/core': 7.25.8 + '@babel/helper-compilation-targets': 7.22.10 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-validator-option': 7.22.5 + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.8) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.8) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.8) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-import-assertions': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-syntax-import-attributes': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.8) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.8) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.8) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.8) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.8) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.8) + '@babel/plugin-transform-arrow-functions': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-async-generator-functions': 7.22.7(@babel/core@7.25.8) + '@babel/plugin-transform-async-to-generator': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-block-scoped-functions': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-block-scoping': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-class-properties': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-class-static-block': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-classes': 7.22.6(@babel/core@7.25.8) + '@babel/plugin-transform-computed-properties': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-destructuring': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-duplicate-keys': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-dynamic-import': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-exponentiation-operator': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-export-namespace-from': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-for-of': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-function-name': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-json-strings': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-literals': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-logical-assignment-operators': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-member-expression-literals': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-modules-amd': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-modules-systemjs': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-modules-umd': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-named-capturing-groups-regex': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-new-target': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-nullish-coalescing-operator': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-numeric-separator': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-object-rest-spread': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-object-super': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-optional-catch-binding': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-optional-chaining': 7.22.6(@babel/core@7.25.8) + '@babel/plugin-transform-parameters': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-private-methods': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-private-property-in-object': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-property-literals': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-regenerator': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-reserved-words': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-shorthand-properties': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-spread': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-sticky-regex': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-template-literals': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-typeof-symbol': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-escapes': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-property-regex': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-regex': 7.22.5(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-sets-regex': 7.22.5(@babel/core@7.25.8) + '@babel/preset-modules': 0.1.6(@babel/core@7.25.8) + '@babel/types': 7.22.11 + babel-plugin-polyfill-corejs2: 0.4.5(@babel/core@7.25.8) + babel-plugin-polyfill-corejs3: 0.8.3(@babel/core@7.25.8) + babel-plugin-polyfill-regenerator: 0.5.2(@babel/core@7.25.8) + core-js-compat: 3.32.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + '@babel/preset-flow@7.22.5(@babel/core@7.24.0)': dependencies: '@babel/core': 7.24.0 @@ -15962,6 +16812,15 @@ snapshots: '@babel/types': 7.24.0 esutils: 2.0.3 + '@babel/preset-modules@0.1.6(@babel/core@7.25.8)': + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-proposal-unicode-property-regex': 7.18.6(@babel/core@7.25.8) + '@babel/plugin-transform-dotall-regex': 7.22.5(@babel/core@7.25.8) + '@babel/types': 7.24.0 + esutils: 2.0.3 + '@babel/preset-react@7.22.5(@babel/core@7.23.2)': dependencies: '@babel/core': 7.23.2 @@ -17018,16 +17877,15 @@ snapshots: deepmerge-json: 1.5.0 framer-motion: 10.16.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) fuels: 0.96.1 + react: 18.3.1 react-aria: 3.27.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-content-loader: 6.2.1(react@18.3.1) + react-dom: 18.3.1(react@18.3.1) react-hot-toast: 2.4.1(csstype@3.1.3)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-number-format: 5.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react-stately: 3.25.0(react@18.3.1) xstate: 4.38.2 zustand: 4.4.1(@types/react@18.3.3)(react@18.3.1) - optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) transitivePeerDependencies: - '@types/react' - '@types/react-dom' @@ -17035,14 +17893,14 @@ snapshots: - csstype - immer - '@fuel-ui/test-utils@0.17.0(@babel/core@7.24.0)(@jest/types@29.6.3)(@types/node@22.7.6)(babel-jest@29.7.0(@babel/core@7.24.0))(bufferutil@4.0.8)(esbuild@0.18.20)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2)(utf-8-validate@5.0.10)': + '@fuel-ui/test-utils@0.17.0(@babel/core@7.24.0)(@jest/types@29.6.3)(@types/node@22.7.6)(babel-jest@29.7.0(@babel/core@7.24.0))(bufferutil@4.0.8)(esbuild@0.18.20)(react@18.3.1)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2)(utf-8-validate@5.0.10)': dependencies: '@testing-library/dom': 9.3.1 '@testing-library/jest-dom': 5.17.0 '@testing-library/react': 14.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@testing-library/user-event': 14.4.3(@testing-library/dom@9.3.1) identity-obj-proxy: 3.0.0 - jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-axe: 7.0.1 jest-environment-jsdom: 29.7.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) jest-fail-on-console: 3.1.1 @@ -17051,7 +17909,7 @@ snapshots: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) resize-observer-polyfill: 1.5.1 - ts-jest: 29.1.1(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2) + ts-jest: 29.1.1(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2) transitivePeerDependencies: - '@babel/core' - '@jest/types' @@ -17118,7 +17976,7 @@ snapshots: '@web3modal/core': 5.0.0(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold': 5.0.0(@types/react@18.3.3)(react@18.3.1) '@web3modal/solana': 5.0.0(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10) - '@web3modal/wagmi': 5.0.0(c3oav324ggsvgstqi6ycpebysa) + '@web3modal/wagmi': 5.0.0(ebuwofpmgvtxamkrrps7nlpk2e) fuels: 0.96.1 rpc-websockets: 7.11.0 socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -17151,7 +18009,7 @@ snapshots: - vue - zod - '@fuels/connectors@0.35.1(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(bufferutil@4.0.8)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@fuels/connectors@0.35.1(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(bufferutil@4.0.8)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@ethereumjs/util': 9.0.3 '@ethersproject/bytes': 5.7.0 @@ -17160,7 +18018,7 @@ snapshots: '@web3modal/core': 5.0.0(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold': 5.0.0(@types/react@18.3.3)(react@18.3.1) '@web3modal/solana': 5.0.0(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10) - '@web3modal/wagmi': 5.0.0(wowindwbxfqha3arywtvpmk5zu) + '@web3modal/wagmi': 5.0.0(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) fuels: 0.96.1 rpc-websockets: 7.11.0 socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -17193,7 +18051,7 @@ snapshots: - vue - zod - '@fuels/connectors@0.35.1(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(bufferutil@4.0.8)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)': + '@fuels/connectors@0.35.1(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(bufferutil@4.0.8)(fuels@0.96.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)': dependencies: '@ethereumjs/util': 9.0.3 '@ethersproject/bytes': 5.7.0 @@ -17202,7 +18060,7 @@ snapshots: '@web3modal/core': 5.0.0(@types/react@18.3.3)(react@18.3.1) '@web3modal/scaffold': 5.0.0(@types/react@18.3.3)(react@18.3.1) '@web3modal/solana': 5.0.0(@types/react@18.3.3)(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10) - '@web3modal/wagmi': 5.0.0(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) + '@web3modal/wagmi': 5.0.0(yhei2uilpiakx6yusemgxuysku) fuels: 0.96.1 rpc-websockets: 7.11.0 socket.io-client: 4.7.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -17273,12 +18131,12 @@ snapshots: dependencies: typescript: 5.2.2 - '@fuels/tsup-config@0.23.0(tsup@7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2))': + '@fuels/tsup-config@0.23.0(tsup@7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2))': dependencies: dotenv: 16.3.1 react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - tsup: 7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2) + tsup: 7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2) '@fuels/vm-asm@0.58.0': {} @@ -17355,7 +18213,7 @@ snapshots: jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2))': + '@jest/core@29.7.0(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 @@ -17369,7 +18227,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.12.11)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-config: 29.7.0(@types/node@20.12.11)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -17515,7 +18373,7 @@ snapshots: dependencies: '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.7.6 + '@types/node': 20.12.11 '@types/yargs': 15.0.19 chalk: 4.1.2 @@ -17773,14 +18631,23 @@ snapshots: react-dom: 18.3.1(react@18.3.1) react-native: 0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) - '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)': + '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)': + dependencies: + i18next: 23.11.5 + qr-code-styling: 1.8.0 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + react-native: 0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) + + '@metamask/sdk-install-modal-web@0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)': dependencies: i18next: 23.11.5 qr-code-styling: 1.8.0 optionalDependencies: react: 18.3.1 react-dom: 18.3.1(react@18.3.1) - react-native: 0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) + react-native: 0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) '@metamask/sdk@0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(utf-8-validate@5.0.10)': dependencies: @@ -17854,6 +18721,42 @@ snapshots: - supports-color - utf-8-validate + '@metamask/sdk@0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(utf-8-validate@5.0.10)': + dependencies: + '@metamask/onboarding': 1.0.1 + '@metamask/providers': 16.1.0 + '@metamask/sdk-communication-layer': 0.28.2(cross-fetch@4.0.0)(eciesjs@0.3.20)(eventemitter2@6.4.9)(readable-stream@3.6.2)(socket.io-client@4.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + '@metamask/sdk-install-modal-web': 0.28.1(i18next@23.11.5)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1) + '@types/dom-screen-wake-lock': 1.0.3 + '@types/uuid': 10.0.0 + bowser: 2.11.0 + cross-fetch: 4.0.0 + debug: 4.3.7 + eciesjs: 0.3.20 + eth-rpc-errors: 4.0.3 + eventemitter2: 6.4.9 + i18next: 23.11.5 + i18next-browser-languagedetector: 7.1.0 + obj-multiplex: 1.0.0 + pump: 3.0.2 + qrcode-terminal-nooctal: 0.12.1 + react-native-webview: 11.26.1(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1) + readable-stream: 3.6.2 + rollup-plugin-visualizer: 5.12.0(rollup@4.22.4) + socket.io-client: 4.8.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + util: 0.12.5 + uuid: 8.3.2 + optionalDependencies: + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + transitivePeerDependencies: + - bufferutil + - encoding + - react-native + - rollup + - supports-color + - utf-8-validate + '@metamask/superstruct@3.1.0': {} '@metamask/utils@5.0.2': @@ -19455,6 +20358,13 @@ snapshots: - '@babel/preset-env' - supports-color + '@react-native/babel-plugin-codegen@0.75.4(@babel/preset-env@7.22.9(@babel/core@7.25.8))': + dependencies: + '@react-native/codegen': 0.75.4(@babel/preset-env@7.22.9(@babel/core@7.25.8)) + transitivePeerDependencies: + - '@babel/preset-env' + - supports-color + '@react-native/babel-preset@0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))': dependencies: '@babel/core': 7.23.2 @@ -19557,6 +20467,57 @@ snapshots: - '@babel/preset-env' - supports-color + '@react-native/babel-preset@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))': + dependencies: + '@babel/core': 7.25.8 + '@babel/plugin-proposal-export-default-from': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-export-default-from': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.8) + '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-async-generator-functions': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-flow-strip-types': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-for-of': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-logical-assignment-operators': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-nullish-coalescing-operator': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-numeric-separator': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-object-rest-spread': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-optional-catch-binding': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-optional-chaining': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-private-property-in-object': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-react-display-name': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-react-jsx': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-react-jsx-self': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-react-jsx-source': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-regenerator': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-runtime': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.8) + '@babel/template': 7.25.7 + '@react-native/babel-plugin-codegen': 0.75.4(@babel/preset-env@7.22.9(@babel/core@7.25.8)) + babel-plugin-transform-flow-enums: 0.0.2(@babel/core@7.25.8) + react-refresh: 0.14.2 + transitivePeerDependencies: + - '@babel/preset-env' + - supports-color + '@react-native/codegen@0.75.4(@babel/preset-env@7.22.9(@babel/core@7.23.2))': dependencies: '@babel/parser': 7.25.8 @@ -19585,6 +20546,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@react-native/codegen@0.75.4(@babel/preset-env@7.22.9(@babel/core@7.25.8))': + dependencies: + '@babel/parser': 7.25.8 + '@babel/preset-env': 7.22.9(@babel/core@7.25.8) + glob: 7.2.3 + hermes-parser: 0.22.0 + invariant: 2.2.4 + jscodeshift: 0.14.0(@babel/preset-env@7.22.9(@babel/core@7.25.8)) + mkdirp: 0.5.6 + nullthrows: 1.1.1 + yargs: 17.7.2 + transitivePeerDependencies: + - supports-color + '@react-native/community-cli-plugin@0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: '@react-native-community/cli-server-api': 14.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -19627,6 +20602,27 @@ snapshots: - supports-color - utf-8-validate + '@react-native/community-cli-plugin@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(bufferutil@4.0.8)(utf-8-validate@5.0.10)': + dependencies: + '@react-native-community/cli-server-api': 14.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native-community/cli-tools': 14.1.0 + '@react-native/dev-middleware': 0.75.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native/metro-babel-transformer': 0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8)) + chalk: 4.1.2 + execa: 5.1.1 + metro: 0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10) + metro-config: 0.80.12(bufferutil@4.0.8)(utf-8-validate@5.0.10) + metro-core: 0.80.12 + node-fetch: 2.7.0 + readline: 1.3.0 + transitivePeerDependencies: + - '@babel/core' + - '@babel/preset-env' + - bufferutil + - encoding + - supports-color + - utf-8-validate + '@react-native/debugger-frontend@0.75.4': {} '@react-native/dev-middleware@0.75.4(bufferutil@4.0.8)(utf-8-validate@5.0.10)': @@ -19673,6 +20669,16 @@ snapshots: - '@babel/preset-env' - supports-color + '@react-native/metro-babel-transformer@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))': + dependencies: + '@babel/core': 7.25.8 + '@react-native/babel-preset': 0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8)) + hermes-parser: 0.22.0 + nullthrows: 1.1.1 + transitivePeerDependencies: + - '@babel/preset-env' + - supports-color + '@react-native/normalize-colors@0.75.4': {} '@react-native/virtualized-lists@0.75.4(@types/react@18.3.3)(react-native@0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)': @@ -19693,6 +20699,15 @@ snapshots: optionalDependencies: '@types/react': 18.3.3 + '@react-native/virtualized-lists@0.75.4(@types/react@18.3.3)(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)': + dependencies: + invariant: 2.2.4 + nullthrows: 1.1.1 + react: 18.3.1 + react-native: 0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) + optionalDependencies: + '@types/react': 18.3.3 + '@react-stately/calendar@3.4.0(react@18.3.1)': dependencies: '@internationalized/date': 3.5.0 @@ -21198,10 +22213,10 @@ snapshots: '@storybook/global': 5.0.0 '@storybook/preview-api': 7.4.6 - '@storybook/jest@0.2.3(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))': + '@storybook/jest@0.2.3(@jest/globals@29.7.0)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))': dependencies: '@storybook/expect': 28.1.3-5 - '@testing-library/jest-dom': 6.1.4(@jest/globals@29.7.0)(@types/jest@28.1.3)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2))) + '@testing-library/jest-dom': 6.1.4(@jest/globals@29.7.0)(@types/jest@28.1.3)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))) '@types/jest': 28.1.3 jest-mock: 27.5.1 transitivePeerDependencies: @@ -21593,7 +22608,7 @@ snapshots: '@swc/helpers@0.4.14': dependencies: - tslib: 2.6.2 + tslib: 2.8.0 '@swc/helpers@0.4.36': dependencies: @@ -21655,7 +22670,7 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/jest-dom@6.1.4(@jest/globals@29.7.0)(@types/jest@28.1.3)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))': + '@testing-library/jest-dom@6.1.4(@jest/globals@29.7.0)(@types/jest@28.1.3)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))': dependencies: '@adobe/css-tools': 4.3.2 '@babel/runtime': 7.25.0 @@ -21668,7 +22683,7 @@ snapshots: optionalDependencies: '@jest/globals': 29.7.0 '@types/jest': 28.1.3 - jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) '@testing-library/react@14.0.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: @@ -21932,7 +22947,7 @@ snapshots: '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.7.6 + '@types/node': 20.12.11 '@types/node@10.12.18': {} @@ -21951,6 +22966,7 @@ snapshots: '@types/node@22.7.6': dependencies: undici-types: 6.19.8 + optional: true '@types/normalize-package-data@2.4.1': {} @@ -21995,7 +23011,7 @@ snapshots: '@types/secp256k1@4.0.6': dependencies: - '@types/node': 22.7.6 + '@types/node': 20.12.11 '@types/semver@7.5.6': {} @@ -22275,7 +23291,7 @@ snapshots: - utf-8-validate - zod - '@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': + '@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': dependencies: '@coinbase/wallet-sdk': 4.0.4 '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(utf-8-validate@5.0.10) @@ -22313,10 +23329,10 @@ snapshots: - utf-8-validate - zod - '@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': + '@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4)': dependencies: '@coinbase/wallet-sdk': 4.0.4 - '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(utf-8-validate@5.0.10) + '@metamask/sdk': 0.28.4(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(utf-8-validate@5.0.10) '@safe-global/safe-apps-provider': 0.18.3(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4) '@safe-global/safe-apps-sdk': 9.1.0(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4) '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) @@ -22669,7 +23685,7 @@ snapshots: '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/safe-json': 1.0.2 events: 3.3.0 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -23446,10 +24462,10 @@ snapshots: lit: 3.1.0 qrcode: 1.5.3 - '@web3modal/wagmi@5.0.0(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))': + '@web3modal/wagmi@5.0.0(@types/react@18.3.3)(@wagmi/connectors@5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4))(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(utf-8-validate@5.0.10)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))': dependencies: '@wagmi/connectors': 5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 '@web3modal/scaffold': 5.0.0(@types/react@18.3.3)(react@18.3.1) @@ -23514,10 +24530,10 @@ snapshots: - ioredis - utf-8-validate - '@web3modal/wagmi@5.0.0(c3oav324ggsvgstqi6ycpebysa)': + '@web3modal/wagmi@5.0.0(ebuwofpmgvtxamkrrps7nlpk2e)': dependencies: '@wagmi/connectors': 5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 '@web3modal/scaffold': 5.0.0(@types/react@18.3.3)(react@18.3.1) @@ -23548,10 +24564,10 @@ snapshots: - ioredis - utf-8-validate - '@web3modal/wagmi@5.0.0(wowindwbxfqha3arywtvpmk5zu)': + '@web3modal/wagmi@5.0.0(yhei2uilpiakx6yusemgxuysku)': dependencies: - '@wagmi/connectors': 5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) - '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) + '@wagmi/connectors': 5.1.15(@types/react@18.3.3)(@wagmi/core@2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)))(bufferutil@4.0.8)(react-dom@18.3.1(react@18.3.1))(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1)(rollup@4.22.4)(typescript@5.2.2)(utf-8-validate@5.0.10)(viem@2.21.28(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4))(zod@3.22.4) + '@wagmi/core': 2.13.4(@tanstack/query-core@5.28.4)(@types/react@18.3.3)(react@18.3.1)(typescript@5.2.2)(viem@2.20.1(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10)(zod@3.22.4)) '@walletconnect/ethereum-provider': 2.13.0(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(utf-8-validate@5.0.10) '@web3modal/polyfills': 5.0.0 '@web3modal/scaffold': 5.0.0(@types/react@18.3.3)(react@18.3.1) @@ -24160,6 +25176,15 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.8): + dependencies: + '@babel/compat-data': 7.25.8 + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.23.2): dependencies: '@babel/compat-data': 7.22.9 @@ -24178,6 +25203,15 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-corejs2@0.4.5(@babel/core@7.25.8): + dependencies: + '@babel/compat-data': 7.22.9 + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.25.8) + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.23.2): dependencies: '@babel/core': 7.23.2 @@ -24194,6 +25228,14 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.8): + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) + core-js-compat: 3.38.1 + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.23.2): dependencies: '@babel/core': 7.23.2 @@ -24210,6 +25252,14 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-corejs3@0.8.3(@babel/core@7.25.8): + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.25.8) + core-js-compat: 3.32.0 + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.23.2): dependencies: '@babel/core': 7.23.2 @@ -24224,6 +25274,13 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-regenerator@0.5.2(@babel/core@7.25.8): + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.4.2(@babel/core@7.25.8) + transitivePeerDependencies: + - supports-color + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.23.2): dependencies: '@babel/core': 7.23.2 @@ -24238,6 +25295,13 @@ snapshots: transitivePeerDependencies: - supports-color + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.8): + dependencies: + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) + transitivePeerDependencies: + - supports-color + babel-plugin-react-docgen@4.2.1: dependencies: ast-types: 0.14.2 @@ -24258,6 +25322,12 @@ snapshots: transitivePeerDependencies: - '@babel/core' + babel-plugin-transform-flow-enums@0.0.2(@babel/core@7.25.8): + dependencies: + '@babel/plugin-syntax-flow': 7.25.7(@babel/core@7.25.8) + transitivePeerDependencies: + - '@babel/core' + babel-preset-current-node-syntax@1.0.1(@babel/core@7.23.2): dependencies: '@babel/core': 7.23.2 @@ -24695,7 +25765,7 @@ snapshots: chrome-launcher@0.15.2: dependencies: - '@types/node': 22.7.6 + '@types/node': 20.12.11 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -24708,7 +25778,7 @@ snapshots: chromium-edge-launcher@0.2.0: dependencies: - '@types/node': 22.7.6 + '@types/node': 20.12.11 escape-string-regexp: 4.0.0 is-wsl: 2.2.0 lighthouse-logger: 1.4.2 @@ -25015,13 +26085,13 @@ snapshots: safe-buffer: 5.2.1 sha.js: 2.4.11 - create-jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + create-jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-config: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -25030,13 +26100,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + create-jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-config: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -25180,8 +26250,6 @@ snapshots: dayjs@1.11.10: {} - dayjs@1.11.13: {} - debug@3.2.7: dependencies: ms: 2.1.3 @@ -25438,7 +26506,7 @@ snapshots: dependencies: '@types/secp256k1': 4.0.6 futoin-hkdf: 1.5.3 - secp256k1: 5.0.0 + secp256k1: 5.0.1 ee-first@1.1.1: {} @@ -26144,11 +27212,11 @@ snapshots: dependencies: flat-cache: 3.0.4 - file-loader@6.2.0(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))): + file-loader@6.2.0(webpack@5.91.0(@swc/core@1.3.92)): dependencies: loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11)) + webpack: 5.91.0(@swc/core@1.3.92) file-system-cache@2.3.0: dependencies: @@ -27321,16 +28389,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest-cli@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + create-jest: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-config: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -27340,16 +28408,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest-cli@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + create-jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) exit: 0.1.2 import-local: 3.1.0 - jest-config: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-config: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -27359,7 +28427,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.12.11)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest-config@29.7.0(@types/node@20.12.11)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: '@babel/core': 7.24.0 '@jest/test-sequencer': 29.7.0 @@ -27385,12 +28453,12 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.12.11 - ts-node: 10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2) + ts-node: 10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest-config@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: '@babel/core': 7.24.0 '@jest/test-sequencer': 29.7.0 @@ -27416,12 +28484,12 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.8.4 - ts-node: 10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2) + ts-node: 10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2) transitivePeerDependencies: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest-config@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: '@babel/core': 7.24.0 '@jest/test-sequencer': 29.7.0 @@ -27447,7 +28515,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 22.7.6 - ts-node: 10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2) + ts-node: 10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -27777,24 +28845,24 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-cli: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros - supports-color - ts-node - jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)): + jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + '@jest/core': 29.7.0(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) '@jest/types': 29.6.3 import-local: 3.1.0 - jest-cli: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest-cli: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -27887,6 +28955,31 @@ snapshots: transitivePeerDependencies: - supports-color + jscodeshift@0.14.0(@babel/preset-env@7.22.9(@babel/core@7.25.8)): + dependencies: + '@babel/core': 7.24.0 + '@babel/parser': 7.24.0 + '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.24.0) + '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.24.0) + '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.24.0) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.24.0) + '@babel/preset-env': 7.22.9(@babel/core@7.25.8) + '@babel/preset-flow': 7.22.5(@babel/core@7.24.0) + '@babel/preset-typescript': 7.22.5(@babel/core@7.24.0) + '@babel/register': 7.22.5(@babel/core@7.24.0) + babel-core: 7.0.0-bridge.0(@babel/core@7.24.0) + chalk: 4.1.2 + flow-parser: 0.213.1 + graceful-fs: 4.2.11 + micromatch: 4.0.8 + neo-async: 2.6.2 + node-dir: 0.1.17 + recast: 0.21.5 + temp: 0.8.4 + write-file-atomic: 2.4.3 + transitivePeerDependencies: + - supports-color + jsdom@20.0.3(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: abab: 2.0.6 @@ -28215,7 +29308,7 @@ snapshots: logkitty@0.7.1: dependencies: ansi-fragments: 0.2.1 - dayjs: 1.11.13 + dayjs: 1.11.10 yargs: 15.4.1 long@4.0.0: {} @@ -29122,11 +30215,11 @@ snapshots: neo-async@2.6.2: {} - next-images@1.8.5(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))): + next-images@1.8.5(webpack@5.91.0(@swc/core@1.3.92)): dependencies: - file-loader: 6.2.0(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))) - url-loader: 4.1.1(file-loader@6.2.0(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))))(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))) - webpack: 5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11)) + file-loader: 6.2.0(webpack@5.91.0(@swc/core@1.3.92)) + url-loader: 4.1.1(file-loader@6.2.0(webpack@5.91.0(@swc/core@1.3.92)))(webpack@5.91.0(@swc/core@1.3.92)) + webpack: 5.91.0(@swc/core@1.3.92) next-mdx-remote@4.4.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: @@ -29649,13 +30742,13 @@ snapshots: transitivePeerDependencies: - supports-color - postcss-load-config@4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2)): + postcss-load-config@4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)): dependencies: lilconfig: 2.1.0 yaml: 2.3.1 optionalDependencies: postcss: 8.4.41 - ts-node: 10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2) + ts-node: 10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2) postcss-modules-extract-imports@3.0.0(postcss@8.4.38): dependencies: @@ -30164,6 +31257,13 @@ snapshots: react: 18.3.1 react-native: 0.75.4(@babel/core@7.24.0)(@babel/preset-env@7.22.9(@babel/core@7.24.0))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) + react-native-webview@11.26.1(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1): + dependencies: + escape-string-regexp: 2.0.0 + invariant: 2.2.4 + react: 18.3.1 + react-native: 0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10) + react-native@0.75.4(@babel/core@7.23.2)(@babel/preset-env@7.22.9(@babel/core@7.23.2))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10): dependencies: '@jest/create-cache-key-function': 29.7.0 @@ -30270,6 +31370,59 @@ snapshots: - typescript - utf-8-validate + react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10): + dependencies: + '@jest/create-cache-key-function': 29.7.0 + '@react-native-community/cli': 14.1.0(bufferutil@4.0.8)(typescript@5.2.2)(utf-8-validate@5.0.10) + '@react-native-community/cli-platform-android': 14.1.0 + '@react-native-community/cli-platform-ios': 14.1.0 + '@react-native/assets-registry': 0.75.4 + '@react-native/codegen': 0.75.4(@babel/preset-env@7.22.9(@babel/core@7.25.8)) + '@react-native/community-cli-plugin': 0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(bufferutil@4.0.8)(utf-8-validate@5.0.10) + '@react-native/gradle-plugin': 0.75.4 + '@react-native/js-polyfills': 0.75.4 + '@react-native/normalize-colors': 0.75.4 + '@react-native/virtualized-lists': 0.75.4(@types/react@18.3.3)(react-native@0.75.4(@babel/core@7.25.8)(@babel/preset-env@7.22.9(@babel/core@7.25.8))(@types/react@18.3.3)(bufferutil@4.0.8)(react@18.3.1)(typescript@5.2.2)(utf-8-validate@5.0.10))(react@18.3.1) + abort-controller: 3.0.0 + anser: 1.4.10 + ansi-regex: 5.0.1 + base64-js: 1.5.1 + chalk: 4.1.2 + commander: 9.5.0 + event-target-shim: 5.0.1 + flow-enums-runtime: 0.0.6 + glob: 7.2.3 + invariant: 2.2.4 + jest-environment-node: 29.7.0 + jsc-android: 250231.0.0 + memoize-one: 5.2.1 + metro-runtime: 0.80.12 + metro-source-map: 0.80.12 + mkdirp: 0.5.6 + nullthrows: 1.1.1 + pretty-format: 26.6.2 + promise: 8.3.0 + react: 18.3.1 + react-devtools-core: 5.3.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) + react-refresh: 0.14.2 + regenerator-runtime: 0.13.11 + scheduler: 0.24.0-canary-efb381bbf-20230505 + semver: 7.6.3 + stacktrace-parser: 0.1.10 + whatwg-fetch: 3.6.20 + ws: 6.2.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) + yargs: 17.7.2 + optionalDependencies: + '@types/react': 18.3.3 + transitivePeerDependencies: + - '@babel/core' + - '@babel/preset-env' + - bufferutil + - encoding + - supports-color + - typescript + - utf-8-validate + react-number-format@5.3.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: prop-types: 15.8.1 @@ -30808,7 +31961,7 @@ snapshots: search-insights@2.13.0: {} - secp256k1@5.0.0: + secp256k1@5.0.1: dependencies: elliptic: 6.5.7 node-addon-api: 5.1.0 @@ -31399,14 +32552,14 @@ snapshots: term-size@2.2.1: {} - terser-webpack-plugin@5.3.10(@swc/core@1.3.92(@swc/helpers@0.5.11))(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))): + terser-webpack-plugin@5.3.10(@swc/core@1.3.92)(webpack@5.91.0(@swc/core@1.3.92)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 terser: 5.36.0 - webpack: 5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11)) + webpack: 5.91.0(@swc/core@1.3.92) optionalDependencies: '@swc/core': 1.3.92(@swc/helpers@0.5.11) @@ -31530,15 +32683,15 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest-mock-import-meta@1.1.0(ts-jest@29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2)): + ts-jest-mock-import-meta@1.1.0(ts-jest@29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2)): dependencies: - ts-jest: 29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2) + ts-jest: 29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2) - ts-jest@29.1.1(@babel/core@7.23.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.2))(jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2): + ts-jest@29.1.1(@babel/core@7.23.2)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.2))(jest@29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest: 29.7.0(@types/node@20.8.4)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.6.2 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -31551,11 +32704,11 @@ snapshots: '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.23.2) - ts-jest@29.1.1(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2): + ts-jest@29.1.1(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.6.2 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -31569,11 +32722,11 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.24.0) esbuild: 0.18.20 - ts-jest@29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2): + ts-jest@29.1.2(@babel/core@7.24.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.24.0))(esbuild@0.18.20)(jest@29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)))(typescript@5.2.2): dependencies: bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2)) + jest: 29.7.0(@types/node@22.7.6)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -31587,7 +32740,7 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.24.0) esbuild: 0.18.20 - ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@20.8.4)(typescript@5.2.2): + ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.9 @@ -31607,27 +32760,6 @@ snapshots: optionalDependencies: '@swc/core': 1.3.92(@swc/helpers@0.5.11) - ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.7.6 - acorn: 8.10.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.2.2 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.3.92(@swc/helpers@0.5.11) - optional: true - ts-toolbelt@9.6.0: {} tsconfck@2.1.2(typescript@5.2.2): @@ -31654,7 +32786,7 @@ snapshots: tslib@2.8.0: {} - tsup@7.2.0(@swc/core@1.3.92(@swc/helpers@0.5.11))(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2))(typescript@5.2.2): + tsup@7.2.0(@swc/core@1.3.92)(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2))(typescript@5.2.2): dependencies: bundle-require: 4.0.1(esbuild@0.18.20) cac: 6.7.14 @@ -31664,7 +32796,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92(@swc/helpers@0.5.11))(@types/node@22.7.6)(typescript@5.2.2)) + postcss-load-config: 4.0.1(postcss@8.4.41)(ts-node@10.9.1(@swc/core@1.3.92)(@types/node@20.8.4)(typescript@5.2.2)) resolve-from: 5.0.0 rollup: 3.29.5 source-map: 0.8.0-beta.0 @@ -31824,7 +32956,8 @@ snapshots: undici-types@5.26.5: {} - undici-types@6.19.8: {} + undici-types@6.19.8: + optional: true undici@6.16.1: {} @@ -32003,14 +33136,14 @@ snapshots: url-join@4.0.1: {} - url-loader@4.1.1(file-loader@6.2.0(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))))(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))): + url-loader@4.1.1(file-loader@6.2.0(webpack@5.91.0(@swc/core@1.3.92)))(webpack@5.91.0(@swc/core@1.3.92)): dependencies: loader-utils: 2.0.4 mime-types: 2.1.35 schema-utils: 3.3.0 - webpack: 5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11)) + webpack: 5.91.0(@swc/core@1.3.92) optionalDependencies: - file-loader: 6.2.0(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))) + file-loader: 6.2.0(webpack@5.91.0(@swc/core@1.3.92)) url-parse@1.5.10: dependencies: @@ -32361,7 +33494,7 @@ snapshots: - esbuild - uglify-js - webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11)): + webpack@5.91.0(@swc/core@1.3.92): dependencies: '@types/eslint-scope': 3.7.7 '@types/estree': 1.0.6 @@ -32384,7 +33517,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(@swc/core@1.3.92(@swc/helpers@0.5.11))(webpack@5.91.0(@swc/core@1.3.92(@swc/helpers@0.5.11))) + terser-webpack-plugin: 5.3.10(@swc/core@1.3.92)(webpack@5.91.0(@swc/core@1.3.92)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: From d6a94267011e583f245c82d246c627116a0dfd38 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:30:32 -0300 Subject: [PATCH 2/8] fix: flaky e2e contract tests (#1640) - Contract tests now display: - Connection status - Contract call errors below each field - Buttons are now disabled when required data is not present - Replaced `timeouts` with `expect.poll` using new visual indicators --- .../playwright/e2e/DepositHalfEth.test.ts | 6 ++- .../e2e/ForwardAndMintMulticall.test.ts | 6 ++- .../playwright/e2e/ForwardEth.test.ts | 6 ++- .../e2e/ForwardHalfAndExternalMint.test.ts | 6 ++- .../playwright/e2e/ForwardHalfAndMint.test.ts | 6 ++- .../e2e/ForwardHalfCustomAsset.test.ts | 6 ++- .../playwright/e2e/MintAsset.test.ts | 8 +++- .../playwright/e2e/utils/contract.ts | 16 +++++++- .../src/components/AssetConfigurationCard.tsx | 41 +++++++++++-------- .../components/DepositAndMintMultiCall.tsx | 34 +++++++-------- .../src/components/DepositHalfEthCard.tsx | 30 +++++++------- .../src/components/ForwardCustomAssetCard.tsx | 30 +++++++------- .../src/components/ForwardEthCard.tsx | 29 ++++++------- .../ForwardHalfAndExternalMintCard.tsx | 33 +++++++-------- .../src/components/ForwardHalfAndMintCard.tsx | 33 +++++++-------- .../components/ForwardHalfCustomAssetCard.tsx | 30 +++++++------- .../src/components/Header.tsx | 11 +++-- .../src/components/MintAssetCard.tsx | 29 ++++++------- .../e2e-contract-tests/src/hooks/useAction.ts | 32 +++++++++++++++ 19 files changed, 245 insertions(+), 147 deletions(-) create mode 100644 packages/e2e-contract-tests/src/hooks/useAction.ts diff --git a/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts b/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts index bafec20f3..d3c64e89f 100644 --- a/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/DepositHalfEth.test.ts @@ -54,7 +54,11 @@ test.describe('Deposit Half ETH', () => { const depositHalfButton = getButtonByText(page, 'Deposit Half ETH', true); - await page.waitForTimeout(3000); + await expect + .poll(() => depositHalfButton.isEnabled().catch(() => false), { + timeout: 15000, + }) + .toBeTruthy(); await depositHalfButton.click(); const walletNotificationPage = diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts index 76ccba697..25913e97a 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardAndMintMulticall.test.ts @@ -62,7 +62,11 @@ test.describe('Forward and Mint Multicall', () => { page, 'Deposit And Mint Multicall' ); - await page.waitForTimeout(2500); + await expect + .poll(() => forwardHalfAndMintButton.isEnabled().catch(() => false), { + timeout: 15000, + }) + .toBeTruthy(); await forwardHalfAndMintButton.click(); const walletNotificationPage = diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts index 0b499bbe0..2a81145f0 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardEth.test.ts @@ -52,7 +52,11 @@ test.describe('Forward Eth', () => { await forwardEthInput.fill(forwardEthAmount); const forwardEthButton = getButtonByText(page, 'Forward ETH'); - await page.waitForTimeout(2500); + await expect + .poll(() => forwardEthButton.isEnabled().catch(() => false), { + timeout: 15000, + }) + .toBeTruthy(); await forwardEthButton.click(); const walletNotificationPage = diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts index 3f3aa981d..cf409fc7e 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndExternalMint.test.ts @@ -65,7 +65,11 @@ test.describe('Forward Half ETH and Mint External Custom Asset', () => { page, 'Forward Half And External Mint' ); - await page.waitForTimeout(2500); + await expect + .poll(() => forwardHalfAndMintButton.isEnabled().catch(() => false), { + timeout: 15000, + }) + .toBeTruthy(); await forwardHalfAndMintButton.click(); const walletNotificationPage = diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts index c11e69ed4..9fee610d3 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfAndMint.test.ts @@ -63,7 +63,11 @@ test.describe('Forward Half ETH and Mint Custom Asset', () => { page, 'Forward Half And Mint' ); - await page.waitForTimeout(2500); + await expect + .poll(() => forwardHalfAndMintButton.isEnabled().catch(() => false), { + timeout: 15000, + }) + .toBeTruthy(); await forwardHalfAndMintButton.click(); const walletNotificationPage = diff --git a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts index d9d2f978d..64b6e3df6 100644 --- a/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/ForwardHalfCustomAsset.test.ts @@ -76,7 +76,11 @@ test.describe('Forward Half Custom Asset', () => { page, 'Forward Half Custom Asset' ); - await page.waitForTimeout(2500); + await expect + .poll(() => forwardHalfCustomAssetButton.isEnabled().catch(() => false), { + timeout: 15000, + }) + .toBeTruthy(); await forwardHalfCustomAssetButton.click(); const walletNotificationPage = diff --git a/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts b/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts index 56cc1ec8b..6fabe8752 100644 --- a/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts +++ b/packages/e2e-contract-tests/playwright/e2e/MintAsset.test.ts @@ -54,7 +54,9 @@ test.describe('Mint Assets', () => { await mintInput.fill(mintAmount); const mintButton = getButtonByText(page, 'Mint', true); - await page.waitForTimeout(3000); + await expect + .poll(() => mintButton.isEnabled().catch(() => false), { timeout: 15000 }) + .toBeTruthy(); await mintButton.click(); // test asset is correct @@ -126,7 +128,9 @@ test.describe('Mint Assets', () => { await decimalsInput.fill(decimals); const mintButton = getButtonByText(page, 'Mint Asset configuration'); - await page.waitForTimeout(3000); + await expect + .poll(() => mintButton.isEnabled().catch(() => false), { timeout: 15000 }) + .toBeTruthy(); await mintButton.click(); // test asset is correct diff --git a/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts b/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts index b877da6b3..ee450339b 100644 --- a/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts +++ b/packages/e2e-contract-tests/playwright/e2e/utils/contract.ts @@ -1,5 +1,10 @@ import type { FuelWalletTestHelper } from '@fuels/playwright-utils'; -import { getButtonByText, getByAriaLabel } from '@fuels/playwright-utils'; +import { + expect, + getButtonByText, + getByAriaLabel, + hasText, +} from '@fuels/playwright-utils'; import type { Page } from '@playwright/test'; export const connect = async ( @@ -12,5 +17,14 @@ export const connect = async ( await getByAriaLabel(page, `Connect to ${walletName}`, true).click(); await fuelWalletTestHelper.walletConnect(); + await expect + .poll( + () => + hasText(page, 'Status: Connected') + .then(() => true) + .catch(() => false), + { timeout: 15000 } + ) + .toBeTruthy(); await page.waitForTimeout(3000); }; diff --git a/packages/e2e-contract-tests/src/components/AssetConfigurationCard.tsx b/packages/e2e-contract-tests/src/components/AssetConfigurationCard.tsx index 0bf91f9c1..b1a54b31b 100644 --- a/packages/e2e-contract-tests/src/components/AssetConfigurationCard.tsx +++ b/packages/e2e-contract-tests/src/components/AssetConfigurationCard.tsx @@ -3,6 +3,7 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { mint } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; export const AssetConfigurationCard = () => { const [assetData, setAssetData] = useState({ @@ -11,7 +12,28 @@ export const AssetConfigurationCard = () => { decimals: '', }); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); + const { disabled, execute, error } = useAction({ + isValid: + !!wallet && + !!assetData.amount && + !!assetData.subId && + !!assetData.decimals, + action: async () => { + if ( + wallet.wallet && + assetData.amount && + assetData.subId && + assetData.decimals + ) { + await mint({ + wallet: wallet.wallet!, + amount: bn.parseUnits(assetData.amount, Number(assetData.decimals)), + subId: assetData.subId, + }); + } + }, + }); return (
@@ -47,23 +69,10 @@ export const AssetConfigurationCard = () => { } />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/DepositAndMintMultiCall.tsx b/packages/e2e-contract-tests/src/components/DepositAndMintMultiCall.tsx index 017623478..71e00b4f8 100644 --- a/packages/e2e-contract-tests/src/components/DepositAndMintMultiCall.tsx +++ b/packages/e2e-contract-tests/src/components/DepositAndMintMultiCall.tsx @@ -3,14 +3,29 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { depositAndMintMultiCall } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; export const DepositAndMintMultiCalls = () => { const [forwardAmount, setForwardAmount] = useState(''); const [mintAmount, setMintAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!forwardAmount && !!mintAmount, + action: async () => { + if (baseAssetId && wallet.wallet && mintAmount && forwardAmount) { + await depositAndMintMultiCall({ + wallet: wallet.wallet!, + forwardAmount: bn.parseUnits(forwardAmount), + mintAmount: bn.parseUnits(mintAmount, 1).div(10), + assetId: baseAssetId, + baseAssetId, + }); + } + }, + }); return (
@@ -36,23 +51,10 @@ export const DepositAndMintMultiCalls = () => { value={mintAmount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/DepositHalfEthCard.tsx b/packages/e2e-contract-tests/src/components/DepositHalfEthCard.tsx index afdd4c4d3..59b4eb557 100644 --- a/packages/e2e-contract-tests/src/components/DepositHalfEthCard.tsx +++ b/packages/e2e-contract-tests/src/components/DepositHalfEthCard.tsx @@ -3,13 +3,26 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { depositHalf } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; export const DepositHalfEthCard = () => { const [amount, setAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!amount, + action: async () => { + if (baseAssetId && wallet.wallet && amount) { + await depositHalf({ + wallet: wallet.wallet!, + amount: bn.parseUnits(amount), + assetId: baseAssetId, + }); + } + }, + }); return (
@@ -24,21 +37,10 @@ export const DepositHalfEthCard = () => { value={amount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/ForwardCustomAssetCard.tsx b/packages/e2e-contract-tests/src/components/ForwardCustomAssetCard.tsx index e08246343..9e4ee1e63 100644 --- a/packages/e2e-contract-tests/src/components/ForwardCustomAssetCard.tsx +++ b/packages/e2e-contract-tests/src/components/ForwardCustomAssetCard.tsx @@ -4,17 +4,30 @@ import { useState } from 'react'; import { MAIN_CONTRACT_ID } from '../config'; import { deposit } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; import { calculateAssetId } from '../utils'; export const ForwardCustomAssetCard = () => { const [amount, setAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); const assetId = !!baseAssetId && calculateAssetId(MAIN_CONTRACT_ID, baseAssetId); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!amount, + action: async () => { + if (assetId && wallet.wallet && amount) { + await deposit({ + wallet: wallet.wallet!, + amount: bn.parseUnits(amount, 1).div(10), + assetId, + }); + } + }, + }); return (
@@ -27,21 +40,10 @@ export const ForwardCustomAssetCard = () => { value={amount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/ForwardEthCard.tsx b/packages/e2e-contract-tests/src/components/ForwardEthCard.tsx index 0d1dc095f..99002ee50 100644 --- a/packages/e2e-contract-tests/src/components/ForwardEthCard.tsx +++ b/packages/e2e-contract-tests/src/components/ForwardEthCard.tsx @@ -3,14 +3,26 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { deposit } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; export const ForwardEthCard = () => { const [amount, setAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!amount, + action: async () => { + await deposit({ + wallet: wallet.wallet!, + amount: bn.parseUnits(amount), + assetId: baseAssetId, + }); + }, + }); + return (

Forward ETH

@@ -22,21 +34,10 @@ export const ForwardEthCard = () => { value={amount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/ForwardHalfAndExternalMintCard.tsx b/packages/e2e-contract-tests/src/components/ForwardHalfAndExternalMintCard.tsx index 4ee6f831f..a5e7b08f6 100644 --- a/packages/e2e-contract-tests/src/components/ForwardHalfAndExternalMintCard.tsx +++ b/packages/e2e-contract-tests/src/components/ForwardHalfAndExternalMintCard.tsx @@ -3,15 +3,29 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { depositHalfAndExternalMint } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; export const ForwardHalfAndExternalMintCard = () => { const [forwardAmount, setForwardAmount] = useState(''); const [mintAmount, setMintAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!forwardAmount && !!mintAmount, + action: async () => { + await depositHalfAndExternalMint({ + wallet: wallet.wallet!, + forwardAmount: bn.parseUnits(forwardAmount), + mintAmount: bn.parseUnits(mintAmount, 1).div(10), + assetId: baseAssetId, + baseAssetId, + }); + }, + }); + return (

Forward Half and External Mint

@@ -32,23 +46,10 @@ export const ForwardHalfAndExternalMintCard = () => { value={mintAmount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/ForwardHalfAndMintCard.tsx b/packages/e2e-contract-tests/src/components/ForwardHalfAndMintCard.tsx index b345f7441..413b895fe 100644 --- a/packages/e2e-contract-tests/src/components/ForwardHalfAndMintCard.tsx +++ b/packages/e2e-contract-tests/src/components/ForwardHalfAndMintCard.tsx @@ -3,15 +3,29 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { depositHalfAndMint } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; export const ForwardHalfAndMintCard = () => { const [forwardAmount, setForwardAmount] = useState(''); const [mintAmount, setMintAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!forwardAmount && !!mintAmount, + action: async () => { + await depositHalfAndMint({ + wallet: wallet.wallet!, + forwardAmount: bn.parseUnits(forwardAmount), + mintAmount: bn.parseUnits(mintAmount, 1).div(10), + assetId: baseAssetId, + baseAssetId, + }); + }, + }); + return (

Forward Half and Mint

@@ -32,23 +46,10 @@ export const ForwardHalfAndMintCard = () => { value={mintAmount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/ForwardHalfCustomAssetCard.tsx b/packages/e2e-contract-tests/src/components/ForwardHalfCustomAssetCard.tsx index a27b66050..f1656ad2f 100644 --- a/packages/e2e-contract-tests/src/components/ForwardHalfCustomAssetCard.tsx +++ b/packages/e2e-contract-tests/src/components/ForwardHalfCustomAssetCard.tsx @@ -4,15 +4,28 @@ import { useState } from 'react'; import { MAIN_CONTRACT_ID } from '../config'; import { depositHalf } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; import { calculateAssetId } from '../utils'; export const ForwardHalfCustomAssetCard = () => { const [amount, setAmount] = useState(''); const { account } = useAccount(); - const wallet = useWallet(account); + const wallet = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!amount, + action: async () => { + if (assetId && wallet.wallet && amount) { + await depositHalf({ + wallet: wallet.wallet!, + amount: bn.parseUnits(amount, 1).div(10), + assetId, + }); + } + }, + }); const assetId = !!baseAssetId && calculateAssetId(MAIN_CONTRACT_ID, baseAssetId); @@ -28,21 +41,10 @@ export const ForwardHalfCustomAssetCard = () => { value={amount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/components/Header.tsx b/packages/e2e-contract-tests/src/components/Header.tsx index 485ad95e0..f6b597f57 100644 --- a/packages/e2e-contract-tests/src/components/Header.tsx +++ b/packages/e2e-contract-tests/src/components/Header.tsx @@ -1,11 +1,14 @@ import { useConnectUI } from '@fuels/react'; export const Header = () => { - const { connect } = useConnectUI(); + const { connect, isConnected } = useConnectUI(); return ( - + <> + +

Status: {isConnected ? 'Connected' : 'Disconnected'}

+ ); }; diff --git a/packages/e2e-contract-tests/src/components/MintAssetCard.tsx b/packages/e2e-contract-tests/src/components/MintAssetCard.tsx index 14087fab0..090bee8b1 100644 --- a/packages/e2e-contract-tests/src/components/MintAssetCard.tsx +++ b/packages/e2e-contract-tests/src/components/MintAssetCard.tsx @@ -3,14 +3,26 @@ import { bn } from 'fuels'; import { useState } from 'react'; import { mint } from '../contract_interactions'; +import { useAction } from '../hooks/useAction'; import { useBaseAssetId } from '../hooks/useBaseAssetId'; export const MintAssetCard = () => { const [amount, setAmount] = useState(''); const { account } = useAccount(); - const { wallet } = useWallet(account); + const { wallet } = useWallet({ account }); const baseAssetId = useBaseAssetId(); + const { disabled, execute, error } = useAction({ + isValid: !!baseAssetId && !!wallet && !!amount, + action: async () => { + await mint({ + wallet: wallet!, + amount: bn.parseUnits(amount, 1).div(10), + subId: baseAssetId, + }); + }, + }); + return (

Mint Custom Asset

@@ -24,21 +36,10 @@ export const MintAssetCard = () => { value={amount} />
- + {error &&

{error}

}
diff --git a/packages/e2e-contract-tests/src/hooks/useAction.ts b/packages/e2e-contract-tests/src/hooks/useAction.ts new file mode 100644 index 000000000..1985bfcf5 --- /dev/null +++ b/packages/e2e-contract-tests/src/hooks/useAction.ts @@ -0,0 +1,32 @@ +import { useCallback, useState } from 'react'; + +type UseActionParams = { + isValid: boolean; + action: () => Promise; +}; + +export const useAction = ({ isValid, action }: UseActionParams) => { + const [error, setError] = useState(null); + const [isExecuting, setIsExecuting] = useState(false); + + const execute = useCallback(async () => { + if (!isValid) return; + setIsExecuting(true); + setError(null); + try { + await action(); + } catch (err) { + setError( + (err as Error | undefined)?.message || 'An unexpected error occurred.' + ); + } finally { + setIsExecuting(false); + } + }, [isValid, action]); + + return { + disabled: !isValid || isExecuting, + execute, + error, + }; +}; From 8a20ddedbebe2c49c985d414766f2307e275db8b Mon Sep 17 00:00:00 2001 From: Rodrigo Branas Date: Thu, 31 Oct 2024 01:45:38 -0300 Subject: [PATCH 3/8] feat: indexed src20 assets (#1629) - Closes: #1396 https://github.com/user-attachments/assets/9ff8adda-0c8d-49a2-8729-e2394af92ec7 --------- Co-authored-by: Luiz Gomes <8636507+LuizAsFight@users.noreply.github.com> Co-authored-by: LuizAsFight --- .changeset/chatty-llamas-worry.md | 6 + .../BalanceAssets/BalanceAssets.tsx | 1 - .../src/systems/Account/services/account.ts | 29 +- .../src/systems/Asset/cache/AssetsCache.ts | 119 ++++ .../Asset/components/AssetItem/AssetItem.tsx | 59 +- .../components/AssetSelect/AssetSelect.tsx | 17 +- .../Asset/pages/UpsertAsset/UpsertAsset.tsx | 9 +- .../app/src/systems/Asset/services/assets.ts | 6 + packages/app/src/systems/Asset/utils/isNft.ts | 650 ++++++++++++++++++ .../app/src/systems/Core/utils/database.ts | 2 + .../systems/Core/utils/databaseVersioning.ts | 15 + packages/types/src/accounts.ts | 6 +- packages/types/src/asset.ts | 6 + 13 files changed, 904 insertions(+), 21 deletions(-) create mode 100644 .changeset/chatty-llamas-worry.md create mode 100644 packages/app/src/systems/Asset/cache/AssetsCache.ts create mode 100644 packages/app/src/systems/Asset/utils/isNft.ts diff --git a/.changeset/chatty-llamas-worry.md b/.changeset/chatty-llamas-worry.md new file mode 100644 index 000000000..f68fb8229 --- /dev/null +++ b/.changeset/chatty-llamas-worry.md @@ -0,0 +1,6 @@ +--- +"@fuel-wallet/types": minor +"fuels-wallet": minor +--- + +added SRC20 custom assets name, symbol and decimal resolve from indexer diff --git a/packages/app/src/systems/Account/components/BalanceAssets/BalanceAssets.tsx b/packages/app/src/systems/Account/components/BalanceAssets/BalanceAssets.tsx index 09254b34c..7956c3c25 100644 --- a/packages/app/src/systems/Account/components/BalanceAssets/BalanceAssets.tsx +++ b/packages/app/src/systems/Account/components/BalanceAssets/BalanceAssets.tsx @@ -35,7 +35,6 @@ export const BalanceAssets = ({ function toggle() { setShowUnknown((s) => !s); } - return ( {balancesToShow.map((balance) => ( diff --git a/packages/app/src/systems/Account/services/account.ts b/packages/app/src/systems/Account/services/account.ts index 0e99a099a..3c2005bb0 100644 --- a/packages/app/src/systems/Account/services/account.ts +++ b/packages/app/src/systems/Account/services/account.ts @@ -6,6 +6,7 @@ import type { CoinAsset, } from '@fuel-wallet/types'; import { Address, type Provider, bn } from 'fuels'; +import { AssetsCache } from '~/systems/Asset/cache/AssetsCache'; import { AssetService } from '~/systems/Asset/services'; import { getFuelAssetByAssetId } from '~/systems/Asset/utils'; import type { Maybe } from '~/systems/Core/types'; @@ -109,16 +110,34 @@ export class AccountService { const nextBalancesWithAssets = await balances.reduce( async (acc, balance) => { const prev = await acc; - const asset = await getFuelAssetByAssetId({ - assets, - assetId: balance.assetId, - }); + const asset = { + fuel: await getFuelAssetByAssetId({ + assets, + assetId: balance.assetId, + }), + }; + try { + const assetCached = await AssetsCache.getInstance().getAsset({ + chainId: provider.getChainId(), + assetId: balance.assetId, + provider, + }); + + if (assetCached && asset.fuel) { + asset.fuel = { + ...asset.fuel, + ...assetCached, + indexed: true, + }; + } + } catch (_) {} + return [ ...prev, { ...balance, amount: balance.amount, - asset, + asset: asset.fuel, }, ]; }, diff --git a/packages/app/src/systems/Asset/cache/AssetsCache.ts b/packages/app/src/systems/Asset/cache/AssetsCache.ts new file mode 100644 index 000000000..5a63fab3a --- /dev/null +++ b/packages/app/src/systems/Asset/cache/AssetsCache.ts @@ -0,0 +1,119 @@ +import type { AssetData } from '@fuel-wallet/types'; +import type { Asset, Provider } from 'fuels'; +import { db } from '~/systems/Core/utils/database'; +import { isNft } from '../utils/isNft'; + +type Endpoint = { + chainId: number; + url: string; +}; + +export class AssetsCache { + private cache: { [chainId: number]: { [assetId: string]: Asset } }; + private static instance: AssetsCache; + private endpoints: Endpoint[] = [ + { + chainId: 9889, + url: 'https://explorer-indexer-mainnet.fuel.network', + }, + { + chainId: 0, + url: 'https://explorer-indexer-testnet.fuel.network', + }, + ]; + private storage: IndexedAssetsDB; + + private constructor() { + this.cache = {}; + this.storage = new IndexedAssetsDB(); + } + + private getIndexerEndpoint(chainId: number) { + return this.endpoints.find( + (endpoint: Endpoint) => endpoint.chainId === chainId + ); + } + + private async fetchAssetFromIndexer(url: string, assetId: string) { + try { + const timeout = new Promise((_, reject) => + setTimeout(() => reject(new Error('Timeout')), 2000) + ); + // limit on 2000ms request time + const response = await Promise.race([ + fetch(`${url}/assets/${assetId}`), + timeout, + ]); + if (response instanceof Response) { + return response.json(); + } + } catch (_e: unknown) {} + } + + async getAsset({ + chainId, + assetId, + provider, + }: { chainId: number; assetId: string; provider: Provider }) { + if (chainId == null || !assetId) { + return; + } + const endpoint = this.getIndexerEndpoint(chainId); + if (!endpoint) return; + // try to get from memory cache first + this.cache[endpoint.chainId] = this.cache[endpoint.chainId] || {}; + if (this.cache[endpoint.chainId][assetId]) { + return this.cache[endpoint.chainId][assetId]; + } + // get from indexed db if not in memory + const savedAsset = await this.storage.getItem( + `${endpoint.chainId}/${assetId}` + ); + if (savedAsset) { + this.cache[endpoint.chainId][assetId] = savedAsset; + return savedAsset; + } + const assetFromIndexer = await this.fetchAssetFromIndexer( + endpoint.url, + assetId + ); + if (!assetFromIndexer) return; + + const isNftAsset = await isNft({ + assetId, + contractId: assetFromIndexer.contractId, + provider, + }); + + const asset = { + ...assetFromIndexer, + isNft: isNftAsset, + }; + + this.cache[endpoint.chainId][assetId] = asset; + this.storage.setItem(`${endpoint.chainId}/${assetId}`, asset); + return asset; + } + + static getInstance() { + if (!AssetsCache.instance) { + AssetsCache.instance = new AssetsCache(); + } + return AssetsCache.instance; + } +} + +class IndexedAssetsDB { + async getItem(key: string) { + return db.transaction('r', db.indexedAssets, async () => { + const asset = await db.indexedAssets.get({ key }); + return asset; + }); + } + + async setItem(key: string, data: AssetData) { + await db.transaction('rw', db.indexedAssets, async () => { + await db.indexedAssets.put({ key, ...data }); + }); + } +} diff --git a/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx b/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx index d710049d4..b5021e8be 100644 --- a/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx +++ b/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx @@ -1,6 +1,7 @@ import { cssObj } from '@fuel-ui/css'; import { Avatar, + Badge, Box, Button, CardList, @@ -126,7 +127,9 @@ export const AssetItem: AssetItemComponent = ({ delayDuration={0} open={visibility && tooltip ? undefined : false} > - + + This asset is flagged as suspicious, +
it may mimicking another asset. +
Proceed with caution. + + ); + return ( {icon ? ( @@ -161,20 +177,35 @@ export const AssetItem: AssetItemComponent = ({ )} - {name || ( - - Unknown + + {name || 'Unknown'} + {asset.suspicious ? ( + + + + ) : ( + '' + )} + {asset.isNft && ( + + NFT + + )} + {(!name || asset.indexed) && !asset.isNft && ( - - )} + )} + {symbol ? ( @@ -207,6 +238,11 @@ const styles = { textSize: 'sm', fontWeight: '$normal', }), + assetSuspicious: cssObj({ + marginLeft: 5, + marginRight: 5, + color: 'orange', + }), addAssetBtn: cssObj({ p: '0', ml: '$1', @@ -229,4 +265,9 @@ const styles = { color: '$intentsBase11 !important', }, }), + assetNft: cssObj({ + ml: '$2', + fontSize: '$sm', + lineHeight: 'normal', + }), }; diff --git a/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx b/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx index 754ab0014..eb8412b9d 100644 --- a/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx +++ b/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx @@ -1,6 +1,7 @@ import { cssObj, cx } from '@fuel-ui/css'; import { Avatar, + Badge, Box, Button, Dropdown, @@ -107,7 +108,7 @@ function AssetSelectBase({ items, selected, onSelect }: AssetSelectProps) { {(items || []).map((item) => { const assetId = item.assetId?.toString(); const itemAsset = items?.find((a) => a.assetId === assetId); - const { name, symbol, icon } = itemAsset || {}; + const { name, symbol, icon, isNft } = itemAsset || {}; return ( {name || 'Unknown'} + {isNft && ( + + NFT + + )} {symbol || shortAddress(assetId)} @@ -230,4 +240,9 @@ const styles = { dropdownRoot: cssObj({ zIndex: '1 !important', }), + assetNft: cssObj({ + ml: '$2', + fontSize: '$sm', + lineHeight: 'normal', + }), }; diff --git a/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx b/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx index a250083a9..af3a3fe60 100644 --- a/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx +++ b/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx @@ -1,7 +1,7 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Button, Focus, Text } from '@fuel-ui/react'; import { isB256 } from 'fuels'; -import { useNavigate, useParams } from 'react-router-dom'; +import { useLocation, useNavigate, useParams } from 'react-router-dom'; import { Layout } from '~/systems/Core'; import { AssetItem } from '../../components'; @@ -13,6 +13,7 @@ import useFuelAsset from '../../hooks/useFuelAsset'; export function UpsertAsset() { const navigate = useNavigate(); + const { state } = useLocation(); const params = useParams<{ name: string; assetId: string }>(); const name = params.name; @@ -22,11 +23,11 @@ export function UpsertAsset() { const { handlers, isLoading } = useAssets(); const form = useAssetForm({ defaultValues: { - name: '', - symbol: '', + name: state?.name || '', + symbol: state?.symbol || '', icon: '', ...asset, - decimals: fuelAsset?.decimals || 0, + decimals: state?.decimals || fuelAsset?.decimals || 0, assetId: fuelAsset?.assetId || params.assetId || '', }, }); diff --git a/packages/app/src/systems/Asset/services/assets.ts b/packages/app/src/systems/Asset/services/assets.ts index 1e49e2853..7d8c8ebe7 100644 --- a/packages/app/src/systems/Asset/services/assets.ts +++ b/packages/app/src/systems/Asset/services/assets.ts @@ -227,6 +227,12 @@ export class AssetService { }); } + static async getAssetById(assetId: string) { + return db.transaction('r', db.assets, async () => { + return db.assets.get({ assetId }); + }); + } + static async clearAssets() { return db.transaction('rw', db.assets, async () => { return db.assets.clear(); diff --git a/packages/app/src/systems/Asset/utils/isNft.ts b/packages/app/src/systems/Asset/utils/isNft.ts new file mode 100644 index 000000000..4d8c91cff --- /dev/null +++ b/packages/app/src/systems/Asset/utils/isNft.ts @@ -0,0 +1,650 @@ +import { Contract, type Provider } from 'fuels'; + +export const isNft = async ({ + assetId, + contractId, + provider, +}: { assetId: string; contractId: string; provider: Provider }) => { + const contract = new Contract(contractId, SRC_20_ABI, provider); + + const result = await contract + .multiCall([ + contract.functions.total_supply({ bits: assetId }), + contract.functions.decimals({ bits: assetId }), + ]) + .dryRun(); + + const [total_supply, decimals] = result.value; + + /* + according to sway standards this is how you recognize an NFT: + https://docs.fuel.network/docs/sway-standards/src-20-native-asset/#non-fungible-asset-restrictions + */ + return total_supply.toNumber() === 1 && !decimals; +}; + +const SRC_20_ABI = { + programType: 'contract', + specVersion: '1', + encodingVersion: '1', + concreteTypes: [ + { + type: '()', + concreteTypeId: + '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + type: 'b256', + concreteTypeId: + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + type: 'enum std::identity::Identity', + concreteTypeId: + 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + metadataTypeId: 0, + }, + { + type: 'enum std::option::Option', + concreteTypeId: + '7c06d929390a9aeeb8ffccf8173ac0d101a9976d99dda01cce74541a81e75ac0', + metadataTypeId: 1, + typeArguments: [ + '9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c', + ], + }, + { + type: 'enum std::option::Option', + concreteTypeId: + 'd852149004cc9ec0bbe7dc4e37bffea1d41469b759512b6136f2e865a4c06e7d', + metadataTypeId: 1, + typeArguments: [ + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + ], + }, + { + type: 'enum std::option::Option', + concreteTypeId: + '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + metadataTypeId: 1, + typeArguments: [ + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + ], + }, + { + type: 'str', + concreteTypeId: + '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + { + type: 'str[11]', + concreteTypeId: + '48e8455800b58e79d9db5ac584872b19d307a74a81dcad1d1f9ca34da17e1b31', + }, + { + type: 'str[6]', + concreteTypeId: + 'ed705f920eb2c423c81df912430030def10f03218f0a064bfab81b68de71ae21', + }, + { + type: 'struct std::asset_id::AssetId', + concreteTypeId: + 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + metadataTypeId: 5, + }, + { + type: 'struct std::string::String', + concreteTypeId: + '9a7f1d3e963c10e0a4ea70a8e20a4813d1dc5682e28f74cb102ae50d32f7f98c', + metadataTypeId: 9, + }, + { + type: 'u64', + concreteTypeId: + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + { + type: 'u8', + concreteTypeId: + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + }, + ], + metadataTypes: [ + { + type: 'enum std::identity::Identity', + metadataTypeId: 0, + components: [ + { + name: 'Address', + typeId: 4, + }, + { + name: 'ContractId', + typeId: 8, + }, + ], + }, + { + type: 'enum std::option::Option', + metadataTypeId: 1, + components: [ + { + name: 'None', + typeId: + '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + }, + { + name: 'Some', + typeId: 2, + }, + ], + typeParameters: [2], + }, + { + type: 'generic T', + metadataTypeId: 2, + }, + { + type: 'raw untyped ptr', + metadataTypeId: 3, + }, + { + type: 'struct std::address::Address', + metadataTypeId: 4, + components: [ + { + name: 'bits', + typeId: + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: 'struct std::asset_id::AssetId', + metadataTypeId: 5, + components: [ + { + name: 'bits', + typeId: + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: 'struct std::bytes::Bytes', + metadataTypeId: 6, + components: [ + { + name: 'buf', + typeId: 7, + }, + { + name: 'len', + typeId: + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: 'struct std::bytes::RawBytes', + metadataTypeId: 7, + components: [ + { + name: 'ptr', + typeId: 3, + }, + { + name: 'cap', + typeId: + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + }, + { + type: 'struct std::contract_id::ContractId', + metadataTypeId: 8, + components: [ + { + name: 'bits', + typeId: + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + ], + }, + { + type: 'struct std::string::String', + metadataTypeId: 9, + components: [ + { + name: 'bytes', + typeId: 6, + }, + ], + }, + ], + functions: [ + { + inputs: [ + { + name: 'sub_id', + concreteTypeId: + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + name: 'amount', + concreteTypeId: + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + name: 'burn', + output: + '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'doc-comment', + arguments: [ + ' Unconditionally burns assets sent with the default SubId.', + ], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Arguments'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * `sub_id`: [SubId] - The default SubId.'], + }, + { + name: 'doc-comment', + arguments: [' * `amount`: [u64] - The quantity of coins to burn.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Reads: `1`'], + }, + { + name: 'doc-comment', + arguments: [' * Writes: `1`'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Reverts'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * When the `sub_id` is not the default SubId.'], + }, + { + name: 'doc-comment', + arguments: [ + ' * When the transaction did not include at least `amount` coins.', + ], + }, + { + name: 'doc-comment', + arguments: [ + ' * When the transaction did not include the asset minted by this contract.', + ], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Examples'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' ```sway'], + }, + { + name: 'doc-comment', + arguments: [' use src3::SRC3;'], + }, + { + name: 'doc-comment', + arguments: [' use std::constants::DEFAULT_SUB_ID;'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' fn foo(contract_id: ContractId, asset_id: AssetId) {'], + }, + { + name: 'doc-comment', + arguments: [' let contract_abi = abi(SRC3, contract_id);'], + }, + { + name: 'doc-comment', + arguments: [' contract_abi {'], + }, + { + name: 'doc-comment', + arguments: [' gas: 10000,'], + }, + { + name: 'doc-comment', + arguments: [' coins: 100,'], + }, + { + name: 'doc-comment', + arguments: [' asset_id: asset_id,'], + }, + { + name: 'doc-comment', + arguments: [' }.burn(DEFAULT_SUB_ID, 100);'], + }, + { + name: 'doc-comment', + arguments: [' }'], + }, + { + name: 'doc-comment', + arguments: [' ```'], + }, + { + name: 'payable', + arguments: [], + }, + { + name: 'storage', + arguments: ['read', 'write'], + }, + ], + }, + { + inputs: [ + { + name: 'recipient', + concreteTypeId: + 'ab7cd04e05be58e3fc15d424c2c4a57f824a2a2d97d67252440a3925ebdc1335', + }, + { + name: 'sub_id', + concreteTypeId: + '7c5ee1cecf5f8eacd1284feb5f0bf2bdea533a51e2f0c9aabe9236d335989f3b', + }, + { + name: 'amount', + concreteTypeId: + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + }, + ], + name: 'mint', + output: + '2e38e77b22c314a449e91fafed92a43826ac6aa403ae6a8acb6cf58239fbaf5d', + attributes: [ + { + name: 'doc-comment', + arguments: [ + ' Unconditionally mints new assets using the default SubId.', + ], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Arguments'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [ + ' * `recipient`: [Identity] - The user to which the newly minted asset is transferred to.', + ], + }, + { + name: 'doc-comment', + arguments: [' * `sub_id`: [SubId] - The default SubId.'], + }, + { + name: 'doc-comment', + arguments: [' * `amount`: [u64] - The quantity of coins to mint.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Number of Storage Accesses'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * Reads: `1`'], + }, + { + name: 'doc-comment', + arguments: [' * Writes: `1`'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Reverts'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' * When the `sub_id` is not the default SubId.'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' # Examples'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' ```sway'], + }, + { + name: 'doc-comment', + arguments: [' use src3::SRC3;'], + }, + { + name: 'doc-comment', + arguments: [' use std::constants::DEFAULT_SUB_ID;'], + }, + { + name: 'doc-comment', + arguments: [''], + }, + { + name: 'doc-comment', + arguments: [' fn foo(contract_id: ContractId) {'], + }, + { + name: 'doc-comment', + arguments: [' let contract_abi = abi(SRC3, contract);'], + }, + { + name: 'doc-comment', + arguments: [ + ' contract_abi.mint(Identity::ContractId(contract_id), DEFAULT_SUB_ID, 100);', + ], + }, + { + name: 'doc-comment', + arguments: [' }'], + }, + { + name: 'doc-comment', + arguments: [' ```'], + }, + { + name: 'storage', + arguments: ['read', 'write'], + }, + ], + }, + { + inputs: [ + { + name: 'asset', + concreteTypeId: + 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + }, + ], + name: 'decimals', + output: + '2da102c46c7263beeed95818cd7bee801716ba8303dddafdcd0f6c9efda4a0f1', + attributes: [ + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [ + { + name: 'asset', + concreteTypeId: + 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + }, + ], + name: 'name', + output: + '7c06d929390a9aeeb8ffccf8173ac0d101a9976d99dda01cce74541a81e75ac0', + attributes: [ + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [ + { + name: 'asset', + concreteTypeId: + 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + }, + ], + name: 'symbol', + output: + '7c06d929390a9aeeb8ffccf8173ac0d101a9976d99dda01cce74541a81e75ac0', + attributes: [ + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [], + name: 'total_assets', + output: + '1506e6f44c1d6291cdf46395a8e573276a4fa79e8ace3fc891e092ef32d1b0a0', + attributes: [ + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + { + inputs: [ + { + name: 'asset', + concreteTypeId: + 'c0710b6731b1dd59799cf6bef33eee3b3b04a2e40e80a0724090215bbf2ca974', + }, + ], + name: 'total_supply', + output: + 'd852149004cc9ec0bbe7dc4e37bffea1d41469b759512b6136f2e865a4c06e7d', + attributes: [ + { + name: 'storage', + arguments: ['read'], + }, + ], + }, + ], + loggedTypes: [ + { + logId: '10098701174489624218', + concreteTypeId: + '8c25cb3686462e9a86d2883c5688a22fe738b0bbc85f458d2d2b5f3f667c6d5a', + }, + ], + messagesTypes: [], + configurables: [ + { + name: 'DECIMALS', + concreteTypeId: + 'c89951a24c6ca28c13fd1cfdc646b2b656d69e61a92b91023be7eb58eb914b6b', + offset: 15736, + }, + { + name: 'NAME', + concreteTypeId: + '48e8455800b58e79d9db5ac584872b19d307a74a81dcad1d1f9ca34da17e1b31', + offset: 15744, + }, + { + name: 'SYMBOL', + concreteTypeId: + 'ed705f920eb2c423c81df912430030def10f03218f0a064bfab81b68de71ae21', + offset: 15760, + }, + ], +}; diff --git a/packages/app/src/systems/Core/utils/database.ts b/packages/app/src/systems/Core/utils/database.ts index 089dfa8ff..848a8d399 100644 --- a/packages/app/src/systems/Core/utils/database.ts +++ b/packages/app/src/systems/Core/utils/database.ts @@ -24,6 +24,7 @@ export class FuelDB extends Dexie { connections!: Table; transactionsCursors!: Table; assets!: Table; + indexedAssets!: Table; abis!: Table; errors!: Table; integrityCheckInterval?: NodeJS.Timeout; @@ -91,6 +92,7 @@ export class FuelDB extends Dexie { this.connections.clear(), this.transactionsCursors.clear(), this.assets.clear(), + this.indexedAssets.clear(), this.abis.clear(), this.errors.clear(), ]); diff --git a/packages/app/src/systems/Core/utils/databaseVersioning.ts b/packages/app/src/systems/Core/utils/databaseVersioning.ts index 5dc153477..9389dbeec 100644 --- a/packages/app/src/systems/Core/utils/databaseVersioning.ts +++ b/packages/app/src/systems/Core/utils/databaseVersioning.ts @@ -187,6 +187,7 @@ export const applyDbVersioning = (db: Dexie) => { }); // DB VERSION 26 + // cleanup networks and add defaults db.version(26) .stores({ vaults: 'key', @@ -217,4 +218,18 @@ export const applyDbVersioning = (db: Dexie) => { }); } }); + + // DB VERSION 27 + // add indexedAssets table + db.version(27).stores({ + vaults: 'key', + accounts: '&address, &name', + networks: '&id, &url, &name, chainId', + connections: 'origin', + transactionsCursors: '++id, address, size, providerUrl, endCursor', + assets: '&name, &symbol', + indexedAssets: 'key', + abis: '&contractId', + errors: '&id', + }); }; diff --git a/packages/types/src/accounts.ts b/packages/types/src/accounts.ts index 4b52ce3da..83a1145a9 100644 --- a/packages/types/src/accounts.ts +++ b/packages/types/src/accounts.ts @@ -8,7 +8,11 @@ export type Vault = { }; export interface CoinAsset extends Coin { - asset?: AssetFuel; + asset?: AssetFuel & { + indexed?: boolean; + suspicious?: boolean; + isNft?: boolean; + }; } export type Account = { diff --git a/packages/types/src/asset.ts b/packages/types/src/asset.ts index 89d6eee35..5b52655e8 100644 --- a/packages/types/src/asset.ts +++ b/packages/types/src/asset.ts @@ -4,6 +4,9 @@ export type AssetData = Asset & { // override icon to don't be required icon?: string; isCustom?: boolean; + indexed?: boolean; + suspicious?: boolean; + isNft?: boolean; }; export type AssetAmount = AssetData & { @@ -14,6 +17,9 @@ export type AssetFuelData = AssetFuel & { // override icon to don't be required icon?: string; isCustom?: boolean; + indexed?: boolean; + suspicious?: boolean; + isNft?: boolean; }; export type AssetFuelAmount = AssetFuelData & { From 448d6db2f7ecf8dd53fd90c755b821aa1e4d0619 Mon Sep 17 00:00:00 2001 From: Arthur Geron <3487334+arthurgeron@users.noreply.github.com> Date: Thu, 31 Oct 2024 04:57:24 -0300 Subject: [PATCH 4/8] feat: require chainId on add network FE-827 (#1635) - Chain Id is now required when adding a new network - Provider's chain id is now validated against the user provided one - Chain Id can now be visualized when editing a network - Now uses chain id in `indexedDB` instead of dynamically fetching it - Fixes vulnerability where a malicious third-party could return malicious/altered chain id info --- .changeset/six-chairs-collect.md | 5 + .github/workflows/pr-tests-e2e-contracts.yml | 55 + .github/workflows/pr-tests-e2e-crx-lock.yml | 59 + .github/workflows/pr-tests-e2e.yml | 59 + .github/workflows/pr-tests-jest.yml | 50 + .github/workflows/pr-tests.yml | 183 -- package.json | 3 +- packages/app/package.json | 4 +- packages/app/playwright.config.ts | 6 +- packages/app/playwright/crx/crx.test.ts | 220 +- packages/app/playwright/crx/utils/popup.ts | 5 +- .../app/playwright/e2e/HomeWallet.test.ts | 3 + packages/app/playwright/e2e/Networks.test.ts | 200 +- packages/app/playwright/mocks/database.ts | 7 +- packages/app/src/networks.ts | 21 - .../background/services/BackgroundService.ts | 2 +- .../systems/CRX/background/services/types.ts | 4 +- .../ControlledField/ControlledField.tsx | 20 +- .../FundWallet/hooks/useFundWallet.tsx | 4 +- .../NetworkForm/NetworkForm.stories.tsx | 2 +- .../components/NetworkForm/NetworkForm.tsx | 92 +- .../NetworkList/NetworkList.stories.tsx | 24 - .../NetworkList/NetworkList.test.tsx | 17 - .../components/NetworkList/NetworkList.tsx | 19 - .../Network/components/NetworkList/index.tsx | 1 - .../NetworkReviewCard/NetworkReviewCard.tsx | 16 +- .../src/systems/Network/components/index.tsx | 1 - packages/app/src/systems/Network/events.tsx | 9 + .../src/systems/Network/hooks/useChainInfo.ts | 14 +- .../systems/Network/hooks/useNetworkForm.ts | 72 +- .../src/systems/Network/hooks/useNetworks.ts | 34 + .../Network/machines/chainInfoMachine.ts | 1 + .../Network/machines/networksMachine.test.ts | 180 -- .../Network/machines/networksMachine.ts | 95 +- .../Network/pages/AddNetwork/AddNetwork.tsx | 98 +- .../Network/pages/Networks/Networks.tsx | 27 +- .../pages/UpdateNetwork/UpdateNetwork.tsx | 10 +- .../src/systems/Network/services/network.ts | 6 +- packages/connections/src/utils/provider.ts | 2 +- .../e2e-contract-tests/playwright.config.ts | 7 +- .../playwright/e2e/DepositHalfEth.test.ts | 21 +- .../e2e/ForwardAndMintMulticall.test.ts | 20 +- .../playwright/e2e/ForwardCustomAsset.test.ts | 15 +- .../playwright/e2e/ForwardEth.test.ts | 20 +- .../e2e/ForwardHalfAndExternalMint.test.ts | 14 +- .../playwright/e2e/ForwardHalfAndMint.test.ts | 20 +- .../e2e/ForwardHalfCustomAsset.test.ts | 19 +- .../playwright/e2e/MintAsset.test.ts | 33 +- .../playwright/utils/setup.ts | 24 +- .../e2e-contract-tests/src/contract-ids.json | 4 +- .../src/contracts/contracts/CustomAsset.ts | 2 +- .../contracts/contracts/CustomAsset.ts.bak | 564 ++++ .../contracts/contracts/CustomAssetFactory.ts | 2 +- .../src/contracts/contracts/common.d.ts | 2 +- .../src/contracts/contracts/index.ts | 2 +- .../src/playwright-utils/button.ts | 21 +- .../playwright-utils/fuelWalletTestHelper.ts | 84 +- .../src/playwright-utils/seedWallet.ts | 2 +- pnpm-lock.yaml | 2762 ++++++++--------- 59 files changed, 3100 insertions(+), 2168 deletions(-) create mode 100644 .changeset/six-chairs-collect.md create mode 100644 .github/workflows/pr-tests-e2e-contracts.yml create mode 100644 .github/workflows/pr-tests-e2e-crx-lock.yml create mode 100644 .github/workflows/pr-tests-e2e.yml create mode 100644 .github/workflows/pr-tests-jest.yml delete mode 100644 .github/workflows/pr-tests.yml delete mode 100644 packages/app/src/systems/Network/components/NetworkList/NetworkList.stories.tsx delete mode 100644 packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx delete mode 100644 packages/app/src/systems/Network/components/NetworkList/NetworkList.tsx delete mode 100644 packages/app/src/systems/Network/components/NetworkList/index.tsx delete mode 100644 packages/app/src/systems/Network/machines/networksMachine.test.ts create mode 100644 packages/e2e-contract-tests/src/contracts/contracts/CustomAsset.ts.bak diff --git a/.changeset/six-chairs-collect.md b/.changeset/six-chairs-collect.md new file mode 100644 index 000000000..6058aaae8 --- /dev/null +++ b/.changeset/six-chairs-collect.md @@ -0,0 +1,5 @@ +--- +"fuels-wallet": patch +--- + +Require chainId on add network diff --git a/.github/workflows/pr-tests-e2e-contracts.yml b/.github/workflows/pr-tests-e2e-contracts.yml new file mode 100644 index 000000000..a1eeb8c3b --- /dev/null +++ b/.github/workflows/pr-tests-e2e-contracts.yml @@ -0,0 +1,55 @@ +name: Tests E2E - Contracts + +on: + pull_request: + branches: [main, master, sdk-v2] + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + tests-e2e-contracts: + name: Test + runs-on: buildjet-8vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v3 + - uses: FuelLabs/github-actions/setups/node@master + with: + node-version: 20.11.0 + pnpm-version: 9.5.0 + - uses: FuelLabs/github-actions/setups/docker@master + with: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: ./.github/actions/setup-rust + + - name: Run PNPM install + id: pnpm-cache + run: + pnpm recursive install --frozen-lockfile + + - name: Start Test Node + run: pnpm node:up + + - name: Generate .env app + run: cp packages/app/.env.example packages/app/.env + + - name: Build & Deploy Contracts + run: pnpm deploy:contracts + working-directory: ./packages/e2e-contract-tests + + - name: Run E2E Contract Tests - Local + uses: ./.github/actions/e2e-tests-contracts + with: + providerUrl: "http://localhost:4000/v1/graphql" + masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }} + genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298" + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-e2e-contract-tests-report + path: packages/e2e-contract-tests/playwright-results + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/pr-tests-e2e-crx-lock.yml b/.github/workflows/pr-tests-e2e-crx-lock.yml new file mode 100644 index 000000000..4954dd8a9 --- /dev/null +++ b/.github/workflows/pr-tests-e2e-crx-lock.yml @@ -0,0 +1,59 @@ +name: Tests E2E - CRX Lock + +on: + pull_request: + branches: [main, master, sdk-v2] + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + tests-e2e-crx-lock: + name: Test + runs-on: buildjet-8vcpu-ubuntu-2204 + timeout-minutes: 5 + steps: + - uses: actions/checkout@v3 + - uses: FuelLabs/github-actions/setups/node@master + with: + node-version: 20.11.0 + pnpm-version: 9.5.0 + - uses: FuelLabs/github-actions/setups/docker@master + with: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Start Test Node + run: pnpm node:up + + - name: Generate .env + run: cp packages/app/.env.example packages/app/.env + + - name: Build Application + run: pnpm build:app + env: + ## increase node.js m memory limit for building + ## with sourcemaps + NODE_OPTIONS: "--max-old-space-size=4096" + + # E2E tests running with Playwright + - name: Install Playwright Browsers + run: npx playwright install --with-deps chromium + + - name: Run E2E Tests + run: xvfb-run --auto-servernum -- pnpm test:e2e:crx-lock + timeout-minutes: 3 + env: + NODE_ENV: test + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-app-crx-lock-report + path: packages/app/playwright-results + retention-days: 30 + + - name: Stop Test Node + run: pnpm node:clean diff --git a/.github/workflows/pr-tests-e2e.yml b/.github/workflows/pr-tests-e2e.yml new file mode 100644 index 000000000..6ab616850 --- /dev/null +++ b/.github/workflows/pr-tests-e2e.yml @@ -0,0 +1,59 @@ +name: Tests E2E + +on: + pull_request: + branches: [main, master, sdk-v2] + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + tests-e2e: + name: Test + timeout-minutes: 20 + runs-on: buildjet-8vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v3 + - uses: FuelLabs/github-actions/setups/node@master + with: + node-version: 20.11.0 + pnpm-version: 9.5.0 + - uses: FuelLabs/github-actions/setups/docker@master + with: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Start Test Node + run: pnpm node:up + + - name: Generate .env + run: cp packages/app/.env.example packages/app/.env + + - name: Build Application + run: pnpm build:app + env: + ## increase node.js m memory limit for building + ## with sourcemaps + NODE_OPTIONS: "--max-old-space-size=4096" + + # E2E tests running with Playwright + - name: Install Playwright Browsers + run: npx playwright install --with-deps chromium + + - name: Run E2E Tests + run: xvfb-run --auto-servernum -- pnpm test:e2e + timeout-minutes: 15 + env: + NODE_ENV: test + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-app-report + path: packages/app/playwright-results + retention-days: 30 + + - name: Stop Test Node + run: pnpm node:clean diff --git a/.github/workflows/pr-tests-jest.yml b/.github/workflows/pr-tests-jest.yml new file mode 100644 index 000000000..1facc762a --- /dev/null +++ b/.github/workflows/pr-tests-jest.yml @@ -0,0 +1,50 @@ +name: Tests Unit + +on: + pull_request: + branches: [main, master, sdk-v2] + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + tests-jest: + name: Test + runs-on: buildjet-8vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v3 + - uses: FuelLabs/github-actions/setups/node@master + with: + node-version: 20.11.0 + pnpm-version: 9.5.0 + - uses: FuelLabs/github-actions/setups/docker@master + with: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Start Test Node + run: pnpm node:up + + - name: Generate .env + run: cp packages/app/.env.example packages/app/.env + + # Unit tests running with JEST + - name: Find PR number + uses: jwalton/gh-find-current-pr@v1 + id: findPr + + - name: Build libs + run: | + pnpm build:libs + + - name: Run Jest Tests + run: | + pnpm test:ci + timeout-minutes: 10 + env: + NODE_OPTIONS: "--max-old-space-size=4096" + + - name: Stop Test Node + run: pnpm node:clean diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml deleted file mode 100644 index 203f08d6d..000000000 --- a/.github/workflows/pr-tests.yml +++ /dev/null @@ -1,183 +0,0 @@ -name: Tests - -on: - pull_request: - branches: [main, master, sdk-v2] - types: [opened, synchronize, reopened] - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - tests-jest: - name: JEST Tests - runs-on: buildjet-8vcpu-ubuntu-2204 - steps: - - uses: actions/checkout@v3 - - uses: FuelLabs/github-actions/setups/node@master - with: - node-version: 20.11.0 - pnpm-version: 9.5.0 - - uses: FuelLabs/github-actions/setups/docker@master - with: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Start Test Node - run: pnpm node:up - - - name: Generate .env - run: cp packages/app/.env.example packages/app/.env - - # Unit tests running with JEST - - name: Find PR number - uses: jwalton/gh-find-current-pr@v1 - id: findPr - - - name: Build libs - run: | - pnpm build:libs - - - name: Run Jest Tests - run: | - pnpm test:ci - timeout-minutes: 10 - env: - NODE_OPTIONS: "--max-old-space-size=4096" - - - name: Stop Test Node - run: pnpm node:clean - - tests-e2e: - name: E2E Tests - timeout-minutes: 20 - runs-on: buildjet-8vcpu-ubuntu-2204 - steps: - - uses: actions/checkout@v3 - - uses: FuelLabs/github-actions/setups/node@master - with: - node-version: 20.11.0 - pnpm-version: 9.5.0 - - uses: FuelLabs/github-actions/setups/docker@master - with: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Start Test Node - run: pnpm node:up - - - name: Generate .env - run: cp packages/app/.env.example packages/app/.env - - - name: Build Application - run: pnpm build:app - env: - ## increase node.js m memory limit for building - ## with sourcemaps - NODE_OPTIONS: "--max-old-space-size=4096" - - # E2E tests running with Playwright - - name: Install Playwright Browsers - run: npx playwright install --with-deps chromium - - - name: Run E2E Tests - run: xvfb-run --auto-servernum -- pnpm test:e2e - timeout-minutes: 15 - env: - NODE_ENV: test - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-app-report - path: packages/app/playwright-results - retention-days: 30 - - - name: Stop Test Node - run: pnpm node:clean - - tests-e2e-crx-lock: - name: E2E Tests - Lock CRX - runs-on: buildjet-8vcpu-ubuntu-2204 - timeout-minutes: 5 - steps: - - uses: actions/checkout@v3 - - uses: FuelLabs/github-actions/setups/node@master - with: - node-version: 20.11.0 - pnpm-version: 9.5.0 - - uses: FuelLabs/github-actions/setups/docker@master - with: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Start Test Node - run: pnpm node:up - - - name: Generate .env - run: cp packages/app/.env.example packages/app/.env - - - name: Build Application - run: pnpm build:app - env: - ## increase node.js m memory limit for building - ## with sourcemaps - NODE_OPTIONS: "--max-old-space-size=4096" - - # E2E tests running with Playwright - - name: Install Playwright Browsers - run: npx playwright install --with-deps chromium - - - name: Run E2E Tests - run: xvfb-run --auto-servernum -- pnpm test:e2e:crx-lock - timeout-minutes: 3 - env: - NODE_ENV: test - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-app-crx-lock-report - path: packages/app/playwright-results - retention-days: 30 - - - name: Stop Test Node - run: pnpm node:clean - - tests-e2e-contracts: - name: E2E Contract Tests - Local - runs-on: buildjet-8vcpu-ubuntu-2204 - steps: - - uses: actions/checkout@v3 - - uses: FuelLabs/github-actions/setups/node@master - with: - node-version: 20.11.0 - pnpm-version: 9.5.0 - - uses: FuelLabs/github-actions/setups/docker@master - with: - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: ./.github/actions/setup-rust - - - name: Run PNPM install - id: pnpm-cache - run: - pnpm recursive install --frozen-lockfile - - - name: Start Test Node - run: pnpm node:up - - - name: Generate .env app - run: cp packages/app/.env.example packages/app/.env - - - name: Build & Deploy Contracts - run: pnpm deploy:contracts - working-directory: ./packages/e2e-contract-tests - - - name: Run E2E Contract Tests - Local - uses: ./.github/actions/e2e-tests-contracts - with: - providerUrl: "http://localhost:4000/v1/graphql" - masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }} - genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298" diff --git a/package.json b/package.json index 30a5e7e50..0a228ca9d 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,8 @@ "serve-static@<1.16.0": ">=1.16.0", "rollup@>=4.0.0 <4.22.4": ">=4.22.4", "fuels": "0.96.1", - "secp256k1@=5.0.0": ">=5.0.1" + "secp256k1@=5.0.0": ">=5.0.1", + "elliptic@<6.6.0": ">=6.6.0" } } } diff --git a/packages/app/package.json b/packages/app/package.json index b5d0c0142..1f3f4eff0 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -9,7 +9,7 @@ "build:crx": "./scripts/build.sh --app=crx", "build:storybook": "./scripts/build.sh --app=storybook", "dev": "vite", - "dev:crx": "vite --config vite.crx.config.ts", + "dev:crx": "vite --config vite.crx.config.ts --mode $NODE_ENV", "dev:storybook": "storybook dev -p 6006", "preview": "vite preview", "test": "jest --verbose", @@ -57,7 +57,7 @@ "tai64": "1.0.0", "vite-plugin-markdown": "2.2.0", "xstate": "4.38.2", - "yup": "1.3.2" + "yup": "1.4.0" }, "devDependencies": { "@crxjs/vite-plugin": "1.0.14", diff --git a/packages/app/playwright.config.ts b/packages/app/playwright.config.ts index 31dc26ab5..42d69f9ac 100644 --- a/packages/app/playwright.config.ts +++ b/packages/app/playwright.config.ts @@ -4,14 +4,16 @@ import { type PlaywrightTestConfig, defineConfig } from '@playwright/test'; import './load.envs'; const PORT = process.env.PORT; +const IS_CI = process.env.CI; export const playwrightConfig: PlaywrightTestConfig = { workers: 1, + retries: 1, testMatch: join(__dirname, './playwright/**/*.test.ts'), testDir: join(__dirname, './playwright/'), outputDir: join(__dirname, './playwright-results/'), // stop on first failure - maxFailures: 1, + maxFailures: IS_CI ? 1 : undefined, reporter: [ ['list', { printSteps: true }], ['html', { outputFolder: join(__dirname, './playwright-html/') }], @@ -25,9 +27,9 @@ export const playwrightConfig: PlaywrightTestConfig = { use: { baseURL: `http://localhost:${PORT}/`, permissions: ['clipboard-read', 'clipboard-write'], - headless: false, trace: 'on-first-retry', actionTimeout: 5000, + screenshot: 'only-on-failure', }, // ignore lock test because it takes too long and it will be tested in a separate config testIgnore: [join(__dirname, './playwright/crx/lock.test.ts')], diff --git a/packages/app/playwright/crx/crx.test.ts b/packages/app/playwright/crx/crx.test.ts index 3c3c3b5fe..d2f3ffc18 100644 --- a/packages/app/playwright/crx/crx.test.ts +++ b/packages/app/playwright/crx/crx.test.ts @@ -1,4 +1,4 @@ -import type { Account as WalletAccount } from '@fuel-wallet/types'; +import type { NetworkData, Account as WalletAccount } from '@fuel-wallet/types'; import { type Locator, type Page, expect } from '@playwright/test'; import { @@ -18,7 +18,7 @@ import { CUSTOM_ASSET_INPUT_2, CUSTOM_ASSET_INPUT_3, CUSTOM_ASSET_INPUT_4, - FUEL_NETWORK, + FUEL_LOCAL_NETWORK, PRIVATE_KEY, mockData, } from '../mocks'; @@ -26,6 +26,7 @@ import { import { Address, type Asset, + CHAIN_IDS, type NetworkFuel, Provider, Signer, @@ -43,6 +44,39 @@ import { waitWalletToLoad, } from './utils'; +export const NETWORK_IGNITION = { + id: '1', + name: 'Ignition', + url: 'https://mainnet.fuel.network/v1/graphql', + chainId: CHAIN_IDS.fuel.mainnet, + explorerUrl: 'https://app.fuel.network', + bridgeUrl: 'https://app.fuel.network/bridge', + isSelected: true, +}; +export const NETWORK_TESTNET = { + id: '2', + name: 'Fuel Sepolia Testnet', + url: 'https://testnet.fuel.network/v1/graphql', + chainId: CHAIN_IDS.fuel.testnet, + explorerUrl: 'https://app-testnet.fuel.network', + faucetUrl: 'https://faucet-testnet.fuel.network/', + bridgeUrl: 'https://app-testnet.fuel.network/bridge', + isSelected: false, +}; +export const NETWORK_DEVNET = { + id: '3', + name: 'Fuel Sepolia Devnet', + url: 'https://devnet.fuel.network/v1/graphql', + chainId: CHAIN_IDS.fuel.devnet, + explorerUrl: 'https://app-devnet.fuel.network', + faucetUrl: 'https://faucet-devnet.fuel.network/', + isSelected: false, +}; + +export const DEFAULT_NETWORKS: Array< + NetworkData & { faucetUrl?: string; bridgeUrl?: string; hidden?: boolean } +> = [NETWORK_IGNITION, NETWORK_TESTNET, NETWORK_DEVNET]; + const WALLET_PASSWORD = 'Qwe123456$'; // Increase timeout for this test @@ -186,12 +220,12 @@ test.describe('FuelWallet Extension', () => { return page; }); - await test.step('Should select local network', async () => { + await test.step('Should mock initial data', async () => { const page = await context.newPage(); - await mockData(page); + await mockData(page, 1, DEFAULT_NETWORKS); + await popupPage.reload(); await waitWalletToLoad(popupPage); - await getByAriaLabel(popupPage, 'Selected Network').click(); - await getElementByText(popupPage, 'Local network').click(); + await page.close(); }); await test.step('Add more accounts', async () => { @@ -266,7 +300,14 @@ test.describe('FuelWallet Extension', () => { predicate: (page) => page.url().includes(extensionId), }); - await hasText(connectPage, /connect/i); + await expect + .poll( + async () => { + return await hasText(connectPage, /connect/i).catch(() => false); + }, + { timeout: 10000 } + ) + .toBeTruthy(); // Account 1 should be toggled by default const toggleAccountOneLocator = await getByAriaLabel( @@ -308,6 +349,109 @@ test.describe('FuelWallet Extension', () => { await connectAccounts(); }); + await test.step('window.fuel.selectNetwork() for selecting a network', async () => { + async function testSelectNetwork(network: NetworkData) { + const selectingNetwork = blankPage.evaluate( + async ([network]) => { + return window.fuel.selectNetwork(network); + }, + [network] + ); + const selectNetworkPage = await context.waitForEvent('page', { + predicate: (page) => page.url().includes(extensionId), + }); + await hasText(selectNetworkPage, 'Switching To'); + await hasText(selectNetworkPage, network.name); + + await getButtonByText(selectNetworkPage, /switch network/i).click(); + await expect(selectingNetwork).resolves.toBeDefined(); + } + + await testSelectNetwork(NETWORK_TESTNET); + await popupPage.waitForTimeout(2000); + await testSelectNetwork(NETWORK_DEVNET); + await popupPage.waitForTimeout(2000); + await testSelectNetwork(NETWORK_IGNITION); + await popupPage.waitForTimeout(2000); + }); + + await test.step('window.fuel.selectNetwork() for adding a network', async () => { + async function addLocalNetwork() { + const selectingNetwork = blankPage.evaluate( + async ([network]) => { + return window.fuel.selectNetwork(network); + }, + [FUEL_LOCAL_NETWORK] + ); + + const selectNetworkPage = await context.waitForEvent('page', { + predicate: (page) => page.url().includes(extensionId), + }); + + await hasText(selectNetworkPage, 'Review the Network to be added:'); + await hasText(selectNetworkPage, 'Local network'); + await getButtonByText(selectNetworkPage, /add network/i).click(); + await expect(selectingNetwork).resolves.toBeDefined(); + await popupPage.reload(); + await waitWalletToLoad(popupPage); + } + + const initialNetworkAmount = 3; + const networkSelectorBeforeAdd = getByAriaLabel( + popupPage, + 'Selected Network' + ); + await networkSelectorBeforeAdd.click(); + + // Check initial amount of networks + const itemBeforeAdd = popupPage.locator('[aria-label*=fuel_network]'); + const networkItemsCountBeforeAdd = await itemBeforeAdd.count(); + expect(networkItemsCountBeforeAdd).toEqual(initialNetworkAmount); + + await addLocalNetwork(); + + const networkSelectorAfterAdd = getByAriaLabel( + popupPage, + 'Selected Network' + ); + await networkSelectorAfterAdd.click(); + + const itemAfterAdd = popupPage.locator('[aria-label*=fuel_network]'); + const networkItemsCountAfterAdd = await itemAfterAdd.count(); + expect(networkItemsCountAfterAdd).toEqual(initialNetworkAmount + 1); + + // Remove network so we can test adding it again + let testnetNetwork: Locator; + for (let i = 0; i < networkItemsCountAfterAdd; i += 1) { + const text = await itemAfterAdd.nth(i).innerText(); + if (text.includes('Local')) { + testnetNetwork = itemAfterAdd.nth(i); + } + } + await testnetNetwork.getByLabel(/Remove/).click(); + await hasText(popupPage, /Are you sure/i); + await getButtonByText(popupPage, /confirm/i).click(); + const itemsAfterRemove = popupPage.locator('[aria-label*=fuel_network]'); + await expect(itemsAfterRemove).toHaveCount(initialNetworkAmount); + + // Add network + await addLocalNetwork(); + + // Check initial amount of networks + const networkSelectorAfterFinished = getByAriaLabel( + popupPage, + 'Selected Network' + ); + await networkSelectorAfterFinished.click(); + + const itemsAfterAdd = popupPage.locator('[aria-label*=fuel_network]'); + await expect(itemsAfterAdd).toHaveCount(initialNetworkAmount + 1); + + // // Check if added network is selected + await expect(networkSelectorAfterFinished).toHaveText(/Local/); + await getByAriaLabel(popupPage, 'Close dialog').click(); + }); + await test.step('window.fuel.disconnect()', async () => { const isDisconnected = blankPage.evaluate(async () => { return window.fuel.disconnect(); @@ -398,9 +542,6 @@ test.describe('FuelWallet Extension', () => { await test.step('Changing to not connected wallet should keep Account 1 as connected', async () => { await switchAccount(popupPage, 'Account 2'); - // delay to avoid the page to get the wrong currentAccount - await delay(2000); - const currentAccountPromise = await blankPage.evaluate(async () => { return window.fuel.currentAccount(); }); @@ -707,65 +848,6 @@ test.describe('FuelWallet Extension', () => { ).rejects.toThrow(); }); - await test.step('window.fuel.addNetwork()', async () => { - function addNetwork(network: string) { - return blankPage.evaluate( - async ([network]) => { - return window.fuel.addNetwork(network); - }, - [network] - ); - } - - async function testAddNetwork() { - const addingNetwork = addNetwork(FUEL_NETWORK.testnet); - - const addNetworkPage = await context.waitForEvent('page', { - predicate: (page) => page.url().includes(extensionId), - }); - - await hasText(addNetworkPage, 'Review the Network to be added:'); - await getButtonByText(addNetworkPage, /add network/i).click(); - await expect(addingNetwork).resolves.toBeDefined(); - await popupPage.reload(); - } - - const initialNetworkAmount = 4; - let networkSelector = getByAriaLabel(popupPage, 'Selected Network'); - await networkSelector.click(); - - // Check initial amount of networks - const itemsAfterRemove = popupPage.locator('[aria-label*=fuel_network]'); - const networkItemsCount = await itemsAfterRemove.count(); - expect(networkItemsCount).toEqual(initialNetworkAmount); - - // Remove network so we can test adding it again - let testnetNetwork: Locator; - for (let i = 0; i < networkItemsCount; i += 1) { - const text = await itemsAfterRemove.nth(i).innerText(); - if (text.includes('Fuel Sepolia Testnet')) { - testnetNetwork = itemsAfterRemove.nth(i); - } - } - await testnetNetwork.getByLabel(/Remove/).click(); - await hasText(popupPage, /Are you sure/i); - await getButtonByText(popupPage, /confirm/i).click(); - await expect(itemsAfterRemove).toHaveCount(initialNetworkAmount - 1); - - // Add network - await testAddNetwork(); - - // Check initial amount of networks - await networkSelector.click(); - const itemsAfterAdd = popupPage.locator('[aria-label*=fuel_network]'); - await expect(itemsAfterAdd).toHaveCount(initialNetworkAmount); - - // Check if added network is selected - networkSelector = getByAriaLabel(popupPage, 'Selected Network'); - await expect(networkSelector).toHaveText(/Fuel Sepolia Testnet/); - await getByAriaLabel(popupPage, 'Close dialog').click(); - }); - await test.step('window.fuel.on("currentAccount") to a connected account', async () => { // Switch to account 2 await switchAccount(popupPage, 'Account 2'); diff --git a/packages/app/playwright/crx/utils/popup.ts b/packages/app/playwright/crx/utils/popup.ts index 721df9398..5449013e0 100644 --- a/packages/app/playwright/crx/utils/popup.ts +++ b/packages/app/playwright/crx/utils/popup.ts @@ -26,14 +26,17 @@ export async function switchAccount(popupPage: Page, name: string) { } await getByAriaLabel(popupPage, 'Accounts').click(); - // Add position to click on the element and not on copy button + + await popupPage.waitForTimeout(5000); await hasText(popupPage, name); + // Add position to click on the element and not on copy button await getByAriaLabel(popupPage, name).click({ position: { x: 10, y: 10, }, }); + await popupPage.waitForTimeout(2000); await waitAriaLabel(popupPage, `${name} selected`); // Return account to be used on tests diff --git a/packages/app/playwright/e2e/HomeWallet.test.ts b/packages/app/playwright/e2e/HomeWallet.test.ts index 47b72d862..ca8e95d02 100644 --- a/packages/app/playwright/e2e/HomeWallet.test.ts +++ b/packages/app/playwright/e2e/HomeWallet.test.ts @@ -34,7 +34,10 @@ test.describe('HomeWallet', () => { await getInputByName(faucetTab, 'agreement2').click(); await getInputByName(faucetTab, 'agreement3').click(); await getInputByValue(faucetTab, 'Give me Test Ether').click(); + await hasText(faucetTab, 'Test Ether sent to the wallet'); await page.bringToFront(); + await page.waitForTimeout(2000); + await page.reload(); await hasText(page, /Ethereum/i); await hasText(page, /ETH.0\.002/i); await getByAriaLabel(page, 'Selected Network').click(); diff --git a/packages/app/playwright/e2e/Networks.test.ts b/packages/app/playwright/e2e/Networks.test.ts index db0cc33a2..9afd6cc75 100644 --- a/packages/app/playwright/e2e/Networks.test.ts +++ b/packages/app/playwright/e2e/Networks.test.ts @@ -1,6 +1,7 @@ import type { Browser, Page } from '@playwright/test'; import test, { chromium, expect } from '@playwright/test'; +import { CHAIN_IDS } from 'fuels'; import { getButtonByText, getByAriaLabel, @@ -96,7 +97,7 @@ test.describe('Networks', () => { await expect(items.first()).toHaveAttribute('data-active', 'true'); }); - test('should be able to add a new network', async () => { + test('should NOT be able to add a new network with wrong chain ID', async () => { await visit(page, '/wallet'); await getByAriaLabel(page, 'Selected Network').click(); await hasText(page, /Add new network/i); @@ -106,14 +107,199 @@ test.describe('Networks', () => { const urlInput = getInputByName(page, 'url'); await expect(urlInput).toBeFocused(); await urlInput.fill('https://testnet.fuel.network/v1/graphql'); + const chainIdInput = getInputByName(page, 'chainId'); + await chainIdInput.fill('9999'); await hasText(page, /Test connection/i); + await expect + .poll( + async () => + await getByAriaLabel(page, 'Test connection') + .isEnabled() + .catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); await getByAriaLabel(page, 'Test connection').click(); - await hasText(page, /Fuel Sepolia Testnet/i, 0, 15000); - await expect(buttonCreate).toBeEnabled(); + await expect + .poll( + async () => + await hasText( + page, + /Informed Chain ID does not match the network Chain ID./i + ).catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + }); + + test('should be able to add a new network with a manual chain ID', async () => { + await visit(page, '/wallet'); + await getByAriaLabel(page, 'Selected Network').click(); + await hasText(page, /Add new network/i); + await getByAriaLabel(page, 'Add network').click(); + const buttonCreate = getButtonByText(page, /add/i); + await expect(buttonCreate).toBeDisabled(); + const urlInput = getInputByName(page, 'url'); + await expect(urlInput).toBeFocused(); + await urlInput.fill('https://testnet.fuel.network/v1/graphql'); + const chainIdInput = getInputByName(page, 'chainId'); + await chainIdInput.fill(CHAIN_IDS.fuel.testnet.toString()); + await hasText(page, /Test connection/i); + await expect + .poll( + async () => + await getByAriaLabel(page, 'Test connection') + .isEnabled() + .catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + await getByAriaLabel(page, 'Test connection').click(); + await expect + .poll( + async () => + await hasText(page, /Fuel Sepolia Testnet/i) + .then(() => true) + .catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + console.log('asd waiting for button to be enabled'); + await expect + .poll(async () => await buttonCreate.isEnabled(), { + timeout: 15000, + }) + .toBeTruthy(); + console.log('asd button is enabled'); + await buttonCreate.click(); + // Wait for popup to close + await expect + .poll( + async () => { + return await hasText(page, /Add network/i).catch(() => false); + }, + { + timeout: 15000, + } + ) + .toBeFalsy(); + await expect + .poll( + async () => { + await reload(page); + return await hasText(page, /Fuel Sepolia Testnet/i).catch( + () => false + ); + }, + { + timeout: 15000, + } + ) + .toBeTruthy(); + }); + + test('should be able to add a new network with wrong chainId then correct chainId', async () => { + await visit(page, '/wallet'); + await getByAriaLabel(page, 'Selected Network').click(); + await hasText(page, /Add new network/i); + await getByAriaLabel(page, 'Add network').click(); + const buttonCreate = getButtonByText(page, /add/i); + await expect(buttonCreate).toBeDisabled(); + const urlInput = getInputByName(page, 'url'); + await expect(urlInput).toBeFocused(); + await urlInput.fill('https://mainnet.fuel.network/v1/graphql'); + const chainIdInput = getInputByName(page, 'chainId'); + await chainIdInput.fill('999999'); + await hasText(page, /Test connection/i); + await expect + .poll( + async () => + await getByAriaLabel(page, 'Test connection') + .isEnabled() + .catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + await getByAriaLabel(page, 'Test connection').click(); + await expect + .poll( + async () => + await hasText( + page, + /Informed Chain ID does not match the network Chain ID./i + ).catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + await urlInput.fill('https://testnet.fuel.network/v1/graphql'); + await chainIdInput.fill(CHAIN_IDS.fuel.testnet.toString()); + await hasText(page, /Test connection/i); + await expect + .poll( + async () => + await getByAriaLabel(page, 'Test connection') + .isEnabled() + .catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + await getByAriaLabel(page, 'Test connection').click(); + await expect + .poll( + async () => + await hasText(page, /Fuel Sepolia Testnet/i) + .then(() => true) + .catch(() => false), + { + timeout: 15000, + } + ) + .toBeTruthy(); + console.log('asd waiting for button to be enabled'); + await expect + .poll(async () => await buttonCreate.isEnabled(), { + timeout: 15000, + }) + .toBeTruthy(); + console.log('asd button is enabled'); await buttonCreate.click(); - // Wait for save and close popup; - await page.waitForTimeout(2000); - await reload(page); - await hasText(page, /Fuel Sepolia Testnet/i); + await expect + .poll( + async () => { + return await hasText(page, /Add network/i).catch(() => false); + }, + { + timeout: 15000, + } + ) + .toBeFalsy(); + // Wait for popup to close + await expect + .poll( + async () => { + await reload(page); + return await hasText(page, /Fuel Sepolia Testnet/i).catch( + () => false + ); + }, + { + timeout: 15000, + } + ) + .toBeTruthy(); }); }); diff --git a/packages/app/playwright/mocks/database.ts b/packages/app/playwright/mocks/database.ts index 72197706f..c4bf45f8d 100644 --- a/packages/app/playwright/mocks/database.ts +++ b/packages/app/playwright/mocks/database.ts @@ -8,6 +8,7 @@ import type { Page } from '@playwright/test'; import type { Asset, AssetFuel, WalletManagerAccount } from 'fuels'; import { Address, + CHAIN_IDS, Mnemonic, TESTNET_NETWORK_URL, WalletManager, @@ -31,6 +32,7 @@ export const DEFAULT_NETWORKS: Array = [ isSelected: true, name: 'Local', url: VITE_FUEL_PROVIDER_URL, + faucetUrl: 'http://localhost:4040', }, { id: '2', @@ -126,8 +128,9 @@ export const ALT_ASSET = { ], }; -export const FUEL_NETWORK = { - testnet: TESTNET_NETWORK_URL, +export const FUEL_LOCAL_NETWORK = { + url: 'http://localhost:4000/v1/graphql', + chainId: CHAIN_IDS.fuel.testnet, }; export async function getAccount(page: Page) { diff --git a/packages/app/src/networks.ts b/packages/app/src/networks.ts index ea13866fb..e20b2c301 100644 --- a/packages/app/src/networks.ts +++ b/packages/app/src/networks.ts @@ -1,12 +1,5 @@ import type { NetworkData } from '@fuel-wallet/types'; import { CHAIN_IDS } from 'fuels'; -import { - IS_DEVELOPMENT, - IS_TEST, - VITE_EXPLORER_URL, - VITE_FUEL_FAUCET_URL, - VITE_FUEL_PROVIDER_URL, -} from './config'; export const DEFAULT_NETWORKS: Array< NetworkData & { faucetUrl?: string; bridgeUrl?: string; hidden?: boolean } @@ -37,17 +30,3 @@ export const DEFAULT_NETWORKS: Array< isSelected: false, }, ]; - -if ( - (IS_DEVELOPMENT || IS_TEST) && - !DEFAULT_NETWORKS.find((n) => n.url === VITE_FUEL_PROVIDER_URL) -) { - DEFAULT_NETWORKS.push({ - name: 'Local network', - url: VITE_FUEL_PROVIDER_URL, - chainId: CHAIN_IDS.fuel.testnet, - explorerUrl: VITE_EXPLORER_URL, - faucetUrl: VITE_FUEL_FAUCET_URL, - isSelected: false, - }); -} diff --git a/packages/app/src/systems/CRX/background/services/BackgroundService.ts b/packages/app/src/systems/CRX/background/services/BackgroundService.ts index b519124ab..9c1a980c0 100644 --- a/packages/app/src/systems/CRX/background/services/BackgroundService.ts +++ b/packages/app/src/systems/CRX/background/services/BackgroundService.ts @@ -458,7 +458,7 @@ export class BackgroundService { ): Promise { await NetworkService.validateNetworkExists(input.network); const { isSelected, network } = await NetworkService.validateNetworkSelect({ - chainId: undefined, + chainId: input.network.chainId, url: input.network.url, }); if (isSelected) { diff --git a/packages/app/src/systems/CRX/background/services/types.ts b/packages/app/src/systems/CRX/background/services/types.ts index 3681212dd..3b09f45a3 100644 --- a/packages/app/src/systems/CRX/background/services/types.ts +++ b/packages/app/src/systems/CRX/background/services/types.ts @@ -40,10 +40,10 @@ export type MessageInputs = { contractId: string; }; selectNetwork: { - network: SelectNetworkArguments; + network: NetworkData; }; addNetwork: { - network: Pick; + network: NetworkData; }; }; diff --git a/packages/app/src/systems/Core/components/ControlledField/ControlledField.tsx b/packages/app/src/systems/Core/components/ControlledField/ControlledField.tsx index 0a9529a7c..8ef392b79 100644 --- a/packages/app/src/systems/Core/components/ControlledField/ControlledField.tsx +++ b/packages/app/src/systems/Core/components/ControlledField/ControlledField.tsx @@ -1,5 +1,5 @@ import type { ThemeUtilsCSS } from '@fuel-ui/css'; -import { Form } from '@fuel-ui/react'; +import { Form, Tooltip } from '@fuel-ui/react'; import { mergeRefs } from '@react-aria/utils'; import type { ReactElement, ReactNode } from 'react'; import { forwardRef, useId } from 'react'; @@ -30,6 +30,7 @@ export type ControlledFieldProps = Omit, 'render'> & { render: (props: RenderProps) => ReactElement; hideError?: boolean; warning?: string; + tooltipContent?: string; }; // biome-ignore lint/suspicious/noExplicitAny: @@ -48,6 +49,7 @@ export const ControlledField = forwardRef( isReadOnly, hideError, warning, + tooltipContent, }, ref ) => { @@ -68,7 +70,13 @@ export const ControlledField = forwardRef( return ( {label && labelSide === 'left' && ( - {label} + + {label} + )} {render({ ...props, @@ -80,7 +88,13 @@ export const ControlledField = forwardRef( }, })} {label && labelSide === 'right' && ( - {label} + + {label} + )} {!hideError && props.fieldState.error && ( diff --git a/packages/app/src/systems/FundWallet/hooks/useFundWallet.tsx b/packages/app/src/systems/FundWallet/hooks/useFundWallet.tsx index 7ebe412d6..02363748a 100644 --- a/packages/app/src/systems/FundWallet/hooks/useFundWallet.tsx +++ b/packages/app/src/systems/FundWallet/hooks/useFundWallet.tsx @@ -15,8 +15,8 @@ export function useFundWallet() { (n) => n.url === selectedNetwork?.url ); return { - bridgeUrl: network?.bridgeUrl ?? null, - faucetUrl: network?.faucetUrl ?? null, + bridgeUrl: (network?.bridgeUrl || selectedNetwork?.bridgeUrl) ?? null, + faucetUrl: (network?.faucetUrl || selectedNetwork?.faucetUrl) ?? null, }; }, [selectedNetwork]); diff --git a/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.stories.tsx b/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.stories.tsx index bfadf1ce9..19cae414d 100644 --- a/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.stories.tsx +++ b/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.stories.tsx @@ -11,7 +11,7 @@ export default { }; export const Usage = () => { - const form = useNetworkForm(); + const form = useNetworkForm({}); return ( diff --git a/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx b/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx index cefee853f..0eebab47d 100644 --- a/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx +++ b/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx @@ -1,10 +1,19 @@ import { cssObj } from '@fuel-ui/css'; -import { Box, Button, HelperIcon, Input, Spinner } from '@fuel-ui/react'; +import { + Box, + Button, + Checkbox, + Form, + HelperIcon, + Input, + Tooltip, +} from '@fuel-ui/react'; import { motion } from 'framer-motion'; import { ControlledField, animations } from '~/systems/Core'; import { NetworkReviewCard } from '~/systems/Network'; import { useEffect, useState } from 'react'; +import { useWatch } from 'react-hook-form'; import type { UseNetworkFormReturn } from '../../hooks'; const MotionInput = motion(Input); @@ -15,51 +24,44 @@ export type NetworkFormProps = { isEditing: boolean; isLoading?: boolean; onClickReview?: () => void; - isValidUrl?: boolean; + isValid?: boolean; + providerChainId?: number; + isReviewing?: boolean; + chainName?: string; }; export function NetworkForm({ form, isEditing, isLoading, - onClickReview, - isValidUrl, + isValid, + isReviewing, + chainName, }: NetworkFormProps) { - const [isFirstClickedReview, setIsFirstClickedReview] = useState(false); const [isFirstShownTestConnectionBtn, setIsFirstShownTestConnectionBtn] = useState(false); - const { control, formState, getValues } = form; + const { control, formState } = form; - const name = getValues('name'); - const url = getValues('url'); - const showReview = !isEditing && name; - - function onChangeUrl() { - form.setValue('name', '', { shouldValidate: true }); - } - - function onClickCheckNetwork() { - setIsFirstClickedReview(true); - onClickReview?.(); - } + const url = useWatch({ control, name: 'url' }); + const chainId = useWatch({ control, name: 'chainId' }); useEffect(() => { - if (isValidUrl) { + if (isValid && chainId) { setIsFirstShownTestConnectionBtn(true); } - }, [isValidUrl]); + }, [isValid, chainId]); return ( - {showReview && ( + {isReviewing && ( )} - {!showReview && ( + {!isReviewing && ( <> } - hideError={!isFirstClickedReview} render={({ field }) => ( + + )} + /> + + Chain ID + + } + render={({ field }) => ( + + )} /> + {!!formState.errors?.chainId && ( + + {formState.errors?.chainId?.message} + + )} {!isEditing && isFirstShownTestConnectionBtn && ( )} + {isEditing && ( <> ( - - - -); diff --git a/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx b/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx deleted file mode 100644 index c9f2b7e31..000000000 --- a/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { render, screen } from '@fuel-ui/test-utils'; -import { uniqueId } from 'xstate/lib/utils'; -import { TestWrapper } from '~/systems/Core/components/TestWrapper'; - -import { MOCK_NETWORKS } from '../../__mocks__/networks'; - -import { NetworkList } from './NetworkList'; - -const NETWORKS = MOCK_NETWORKS.map((i) => ({ ...i, id: uniqueId() })); - -describe('NetworkList', () => { - it('should render a list of networks', () => { - render(, { wrapper: TestWrapper }); - expect(screen.getByText(NETWORKS[0].name)).toBeInTheDocument(); - expect(screen.getByText(NETWORKS[1].name)).toBeInTheDocument(); - }); -}); diff --git a/packages/app/src/systems/Network/components/NetworkList/NetworkList.tsx b/packages/app/src/systems/Network/components/NetworkList/NetworkList.tsx deleted file mode 100644 index 4f5d9a466..000000000 --- a/packages/app/src/systems/Network/components/NetworkList/NetworkList.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { CardList } from '@fuel-ui/react'; -import type { NetworkData } from '@fuel-wallet/types'; - -import type { NetworkItemProps } from '../NetworkItem'; -import { NetworkItem } from '../NetworkItem'; - -export type NetworkListProps = Omit & { - networks: NetworkData[]; -}; - -export function NetworkList({ networks = [], ...props }: NetworkListProps) { - return ( - - {networks.map((network) => ( - - ))} - - ); -} diff --git a/packages/app/src/systems/Network/components/NetworkList/index.tsx b/packages/app/src/systems/Network/components/NetworkList/index.tsx deleted file mode 100644 index cc5128656..000000000 --- a/packages/app/src/systems/Network/components/NetworkList/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './NetworkList'; diff --git a/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx b/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx index 260cbcda2..c86e5af91 100644 --- a/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx +++ b/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx @@ -1,5 +1,5 @@ import { cssObj } from '@fuel-ui/css'; -import { Button, Card, Text } from '@fuel-ui/react'; +import { Card, Text } from '@fuel-ui/react'; import { motion } from 'framer-motion'; import { animations } from '~/systems/Core'; @@ -8,31 +8,31 @@ const MotionCard = motion(Card); export type NetworkReviewCardProps = { headerText: string; name: string; - onChangeUrl?: () => void; + chainId?: number | string; url: string; }; export function NetworkReviewCard({ headerText, name, - onChangeUrl, + chainId, url, }: NetworkReviewCardProps) { return ( {headerText} - {onChangeUrl && ( - - )} {name} {url} + {chainId && ( + + Chain ID: {chainId} + + )} ); diff --git a/packages/app/src/systems/Network/components/index.tsx b/packages/app/src/systems/Network/components/index.tsx index 4a152cb7a..e05c7a226 100644 --- a/packages/app/src/systems/Network/components/index.tsx +++ b/packages/app/src/systems/Network/components/index.tsx @@ -1,6 +1,5 @@ export * from './NetworkDropdown'; export * from './NetworkForm'; export * from './NetworkItem'; -export * from './NetworkList'; export * from './NetworkReviewCard'; export * from './NetworkSelector'; diff --git a/packages/app/src/systems/Network/events.tsx b/packages/app/src/systems/Network/events.tsx index f28e37713..43b3bf1aa 100644 --- a/packages/app/src/systems/Network/events.tsx +++ b/packages/app/src/systems/Network/events.tsx @@ -12,6 +12,12 @@ export function networkEvents(store: Store) { input, }); }, + validateAddNetwork(input: NetworkInputs['validateAddNetwork']) { + store.send(Services.networks, { + type: 'VALIDATE_ADD_NETWORK', + input, + }); + }, editNetwork(input: NetworkInputs['editNetwork']) { store.send(Services.networks, { type: 'EDIT_NETWORK', @@ -24,6 +30,9 @@ export function networkEvents(store: Store) { input, }); }, + clearChainInfo() { + store.send(Services.networks, { type: 'CLEAR_CHAIN_INFO' }); + }, removeNetwork(network: NetworkData) { store.send(Services.networks, { type: 'REMOVE_NETWORK', diff --git a/packages/app/src/systems/Network/hooks/useChainInfo.ts b/packages/app/src/systems/Network/hooks/useChainInfo.ts index 710849a05..1b06dddb8 100644 --- a/packages/app/src/systems/Network/hooks/useChainInfo.ts +++ b/packages/app/src/systems/Network/hooks/useChainInfo.ts @@ -25,6 +25,13 @@ export function useChainInfo(providerUrl?: string) { [] ); + const clearChainInfo = useCallback( + debounce(() => { + send('CLEAR_CHAIN_INFO'); + }, 750), + [] + ); + // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { if (providerUrl) { @@ -34,5 +41,10 @@ export function useChainInfo(providerUrl?: string) { } }, [providerUrl]); - return { chainInfo, error, isLoading, handlers: { fetchChainInfo } }; + return { + chainInfo, + error, + isLoading, + handlers: { fetchChainInfo, clearChainInfo }, + }; } diff --git a/packages/app/src/systems/Network/hooks/useNetworkForm.ts b/packages/app/src/systems/Network/hooks/useNetworkForm.ts index 327d0490c..f380393b7 100644 --- a/packages/app/src/systems/Network/hooks/useNetworkForm.ts +++ b/packages/app/src/systems/Network/hooks/useNetworkForm.ts @@ -6,26 +6,53 @@ import type { Maybe } from '~/systems/Core'; import { isValidNetworkUrl } from '../utils'; -export type NetworkFormValues = { - name: string; - url: string; - explorerUrl?: string; -}; +export type NetworkFormValues = yup.InferType; const schema = yup .object({ - name: yup.string().required('Name is required'), + name: yup + .string() + .test('is-required', 'Name is required', function (value) { + return !this.options?.context?.isEditing || !!value; + }), url: yup .string() .test('is-url-valid', 'URL is not valid', isValidNetworkUrl) + .test('is-network-valid', 'Network is not valid', function (url) { + return ( + !url || this.options.context?.chainInfoError !== 'Invalid network URL' + ); + }) .required('URL is required'), explorerUrl: yup .string() - .test('is-url-valid', 'Explorer URL is not valid', (url) => { - if (!url) return true; - return isValidNetworkUrl(url); - }) + .test( + 'is-url-valid', + 'Explorer URL is not valid', + (url) => !url || isValidNetworkUrl(url) + ) .optional(), + chainId: yup + .mixed() + .transform((value) => + value != null && value !== '' ? Number(value) : undefined + ) + .required('Chain ID is required') + .test( + 'chainId-match', + 'Informed Chain ID does not match the network Chain ID.', + function (value) { + return ( + !value || + this.options.context?.chainInfoError !== `Chain ID doesn't match` + ); + } + ) + .test( + 'is-numbers-only', + 'Chain ID must contain only numbers', + (value) => value == null || Number.isInteger(value) + ), }) .required(); @@ -33,26 +60,37 @@ const DEFAULT_VALUES = { name: '', url: '', explorerUrl: '', + chainId: undefined, }; export type UseNetworkFormReturn = ReturnType; export type UseAddNetworkOpts = { defaultValues?: Maybe; + context?: { + providerChainId?: number; + isEditing?: boolean; + chainInfoError?: string; + }; }; -export function useNetworkForm(opts: UseAddNetworkOpts = {}) { +export function useNetworkForm({ defaultValues, context }: UseAddNetworkOpts) { const form = useForm({ - resolver: yupResolver(schema), + resolver: yupResolver(schema), reValidateMode: 'onChange', - mode: 'onChange', - defaultValues: opts.defaultValues || DEFAULT_VALUES, + mode: 'all', + resetOptions: { + keepValues: true, + }, + defaultValues: defaultValues || DEFAULT_VALUES, + context, }); - // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { - opts.defaultValues && form.reset(opts.defaultValues); - }, [opts.defaultValues?.name, opts.defaultValues?.url]); + if (defaultValues) { + form.reset(defaultValues); + } + }, [defaultValues, form]); return form; } diff --git a/packages/app/src/systems/Network/hooks/useNetworks.ts b/packages/app/src/systems/Network/hooks/useNetworks.ts index 70cc584d0..d11d5e677 100644 --- a/packages/app/src/systems/Network/hooks/useNetworks.ts +++ b/packages/app/src/systems/Network/hooks/useNetworks.ts @@ -24,6 +24,18 @@ const selectors = { (id && state.context?.networks?.find((n) => n.id === id)) || undefined ); }, + reviewingAddNetwork: (state: NetworksMachineState) => { + return state.hasTag('reviewingAddNetwork'); + }, + chainInfoToAdd: (state: NetworksMachineState) => { + return state.context?.chainInfoToAdd; + }, + loadingChainInfo: (state: NetworksMachineState) => { + return state.hasTag('loadingChainInfo'); + }, + chainInfoError: (state: NetworksMachineState) => { + return state.context?.chainInfoError; + }, }; export function useNetworks() { @@ -33,6 +45,14 @@ export function useNetworks() { const networks = store.useSelector(Services.networks, selectors.networks); const network = store.useSelector(Services.networks, selectors.network); const isLoading = store.useSelector(Services.networks, selectors.isLoading); + const isLoadingChainInfo = store.useSelector( + Services.networks, + selectors.loadingChainInfo + ); + const isReviewingAddNetwork = store.useSelector( + Services.networks, + selectors.reviewingAddNetwork + ); const editingNetwork = store.useSelector( Services.networks, useMemo( @@ -44,6 +64,14 @@ export function useNetworks() { Services.networks, selectors.selectedNetwork ); + const chainInfoToAdd = store.useSelector( + Services.networks, + selectors.chainInfoToAdd + ); + const chainInfoError = store.useSelector( + Services.networks, + selectors.chainInfoError + ); const selectedNetwork = useMemo(() => { const networkFromDefault = DEFAULT_NETWORKS.find( @@ -89,17 +117,23 @@ export function useNetworks() { handlers: { closeDialog, goToUpdate, + validateAddNetwork: store.validateAddNetwork, addNetwork: store.addNetwork, openNetworks: store.openNetworksList, openNetworksAdd: store.openNetworksAdd, removeNetwork: store.removeNetwork, selectNetwork: store.selectNetwork, updateNetwork: store.updateNetwork, + clearChainInfo: store.clearChainInfo, }, isLoading, + isLoadingChainInfo, + isReviewingAddNetwork, + chainInfoToAdd, selectedNetwork, editingNetwork, network, networks, + chainInfoError, }; } diff --git a/packages/app/src/systems/Network/machines/chainInfoMachine.ts b/packages/app/src/systems/Network/machines/chainInfoMachine.ts index 7ff3acfd5..336ac490d 100644 --- a/packages/app/src/systems/Network/machines/chainInfoMachine.ts +++ b/packages/app/src/systems/Network/machines/chainInfoMachine.ts @@ -84,6 +84,7 @@ export const chainInfoMachine = createMachine( }), clearChainInfo: assign({ chainInfo: undefined, + error: undefined, }), assignError: assign({ error: (_, ev) => (ev.data.error as Error).message, diff --git a/packages/app/src/systems/Network/machines/networksMachine.test.ts b/packages/app/src/systems/Network/machines/networksMachine.test.ts deleted file mode 100644 index b72f89c2c..000000000 --- a/packages/app/src/systems/Network/machines/networksMachine.test.ts +++ /dev/null @@ -1,180 +0,0 @@ -import type { NetworkData } from '@fuel-wallet/types'; -import { interpret } from 'xstate'; -import { waitFor } from 'xstate/lib/waitFor'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; - -import { MOCK_NETWORKS } from '../__mocks__/networks'; -import { NetworkService } from '../services'; - -import type { NetworksMachineService } from './networksMachine'; -import { networksMachine } from './networksMachine'; - -const NETWORK = MOCK_NETWORKS[0]; - -const machine = networksMachine - .withConfig({ - actions: { - redirectToList() {}, - redirectToHome() {}, - notifyUpdateAccounts() {}, - }, - delays: {}, - } as Parameters<(typeof networksMachine)['withConfig']>[0]) - .withContext({}); - -describe('networksMachine', () => { - let service: NetworksMachineService; - let state: ReturnType; - - beforeEach(async () => { - await NetworkService.clearNetworks(); - await NetworkService.addNetwork({ data: NETWORK }); - service = interpret(machine).start(); - state = service.getSnapshot(); - }); - - afterEach(() => { - service.stop(); - state = service.getSnapshot(); - }); - - it('should be on fetchingNetworks state by default', () => { - expect(state.context.networks).toBeUndefined(); - expect(state.value).toBe('fetchingNetworks'); - expect(state.hasTag('loading')).toBeTruthy(); - }); - - describe('list', () => { - it('should fetch list of networks', async () => { - state = await expectStateMatch(service, 'idle'); - expect(state.context.networks?.length).toBe(1); - }); - - it('should have one network selected in context', async () => { - state = await expectStateMatch(service, 'idle'); - expect(state.context.network).toBeDefined(); - }); - }); - - describe('add', () => { - // biome-ignore lint/suspicious/noExplicitAny: - const addEv: any = { - type: 'ADD_NETWORK', - input: { - data: MOCK_NETWORKS[1], - }, - }; - - it('should be able to remove a network', async () => { - await expectStateMatch(service, 'idle'); - - service.send(addEv); - state = await expectStateMatch(service, 'idle'); - const networks = state.context.networks || []; - - // biome-ignore lint/suspicious/noExplicitAny: - const removeEv: any = { - type: 'REMOVE_NETWORK', - input: { id: networks[1]?.id }, - }; - - const nextState = service.nextState(removeEv); - expect(nextState.value).toBe('removingNetwork'); - - service.send(removeEv); - state = await expectStateMatch(service, 'idle'); - expect(state.context.networks?.length).toBe(1); - }); - - it('should be able to add a new network', async () => { - state = await expectStateMatch(service, 'idle'); - - const nextState = service.nextState(addEv); - expect(nextState.value).toBe('addingNetwork'); - expect(nextState.hasTag('loading')).toBeTruthy(); - - service.send(addEv); - state = await expectStateMatch(service, 'idle'); - const networks = state.context.networks || []; - expect(networks?.length).toBe(2); - const networkId = networks?.[1].id; - await NetworkService.removeNetwork({ id: networkId as string }); - }); - - it('should be able to select a new network', async () => { - await expectStateMatch(service, 'idle'); - - service.send(addEv); - state = await expectStateMatch(service, 'idle'); - - let networks = state.context.networks || []; - const idx = networks.findIndex((n) => n.id === state.context.network?.id); - if (idx === -1) throw new Error('Network ID not found'); - const invertIdx = idx === 0 ? 1 : 0; - expect(networks[idx]?.isSelected).toBeTruthy(); - expect(networks[invertIdx]?.isSelected).toBeFalsy(); - // biome-ignore lint/suspicious/noExplicitAny: - const selectEv: any = { - type: 'SELECT_NETWORK', - input: { id: networks[invertIdx]?.id }, - }; - - const nextState = service.nextState(selectEv); - expect(nextState.value).toBe('selectingNetwork'); - - service.send(selectEv); - await expectStateMatch(service, 'selectingNetwork'); - state = await expectStateMatch(service, 'idle'); - networks = state.context.networks || []; - expect(networks[idx]?.isSelected).toBeFalsy(); - expect(networks[invertIdx]?.isSelected).toBeTruthy(); - }); - }); - - describe('update', () => { - let network: NetworkData | undefined; - // biome-ignore lint/suspicious/noExplicitAny: - let editEv: any; - - beforeEach(async () => { - editEv = { - type: 'EDIT_NETWORK', - input: { - // biome-ignore lint/suspicious/noExplicitAny: - id: network?.id as any, - }, - }; - }); - - it('should have networkId and network save on context', async () => { - service.send(editEv); - expect(state.context.network).toBeUndefined(); - - state = await waitFor(service, (state) => state.matches('idle')); - expect(state.context.network).toBeDefined(); - }); - - it('should be able to update a network', async () => { - state = await expectStateMatch(service, 'idle'); - const networks = state.context.networks || []; - - // biome-ignore lint/suspicious/noExplicitAny: - const updateEv: any = { - type: 'UPDATE_NETWORK', - input: { - id: networks[0].id, - data: { - name: 'Test', - }, - }, - }; - - const nextState = service.nextState(updateEv); - expect(nextState.value).toBe('updatingNetwork'); - - service.send(updateEv); - state = await waitFor(service, (state) => state.matches('idle')); - expect(state.context.networks?.[0].name).toBe('Test'); - }); - }); -}); diff --git a/packages/app/src/systems/Network/machines/networksMachine.ts b/packages/app/src/systems/Network/machines/networksMachine.ts index e26e68f0d..62f91cca7 100644 --- a/packages/app/src/systems/Network/machines/networksMachine.ts +++ b/packages/app/src/systems/Network/machines/networksMachine.ts @@ -9,19 +9,22 @@ import { store } from '~/store'; import type { FetchResponse, Maybe } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core'; -import { createProvider } from '@fuel-wallet/connections'; +import type { ChainInfo } from 'fuels'; import { type NetworkInputs, NetworkService } from '../services'; type MachineContext = { networks?: NetworkData[]; network?: Maybe; error?: unknown; + chainInfoToAdd?: ChainInfo; + chainInfoError?: string; }; export type AddNetworkInput = { data: { name: string; url: string; + chainId: number; }; }; @@ -48,6 +51,8 @@ type MachineServices = { type MachineEvents = | { type: 'ADD_NETWORK'; input: AddNetworkInput } + | { type: 'VALIDATE_ADD_NETWORK'; input: NetworkInputs['validateAddNetwork'] } + | { type: 'CLEAR_CHAIN_INFO'; input?: null } | { type: 'EDIT_NETWORK'; input: NetworkInputs['editNetwork'] } | { type: 'UPDATE_NETWORK'; input: NetworkInputs['updateNetwork'] } | { type: 'REMOVE_NETWORK'; input: NetworkInputs['removeNetwork'] } @@ -84,8 +89,11 @@ export const networksMachine = createMachine( }, idle: { on: { - ADD_NETWORK: { - target: 'addingNetwork', + VALIDATE_ADD_NETWORK: { + target: 'validatingAddNetwork', + }, + CLEAR_CHAIN_INFO: { + actions: ['clearChainInfoToAdd', 'clearChainError'], }, EDIT_NETWORK: { target: 'fetchingNetworks', @@ -101,8 +109,36 @@ export const networksMachine = createMachine( }, }, }, + validatingAddNetwork: { + tags: ['loadingChainInfo'], + invoke: { + src: 'validateAddNetwork', + data: { + input: (_: MachineContext, ev: MachineEvents) => ev.input, + }, + onDone: [ + { + target: 'idle', + cond: FetchMachine.hasError, + actions: ['assignChainInfoError'], + }, + { + target: 'waitingAddNetwork', + actions: ['assignChainInfo'], + }, + ], + }, + }, + waitingAddNetwork: { + tags: ['reviewingAddNetwork'], + on: { + ADD_NETWORK: { + target: 'addingNetwork', + }, + }, + }, addingNetwork: { - tags: ['loading'], + tags: ['reviewingAddNetwork', 'loading'], invoke: { src: 'addNetwork', data: { @@ -285,6 +321,23 @@ export const networksMachine = createMachine( notifyUpdateAccounts: () => { store.updateAccounts(); }, + assignChainInfo: assign({ + chainInfoToAdd: (_, ev) => { + return ev.data as ChainInfo; + }, + }), + assignChainInfoError: assign({ + chainInfoError: (_, ev) => { + // biome-ignore lint/suspicious/noExplicitAny: + return (ev.data as any)?.error?.message || ''; + }, + }), + clearChainInfoToAdd: assign({ + chainInfoToAdd: undefined, + }), + clearChainError: assign({ + chainInfoError: undefined, + }), }, services: { fetchNetworks: FetchMachine.create({ @@ -294,6 +347,37 @@ export const networksMachine = createMachine( return networks; }, }), + validateAddNetwork: FetchMachine.create< + NetworkInputs['validateAddNetwork'], + ChainInfo + >({ + maxAttempts: 1, + showError: false, + async fetch({ input }) { + if (!input?.url) { + throw new Error('Inputs not provided'); + } + + let chainInfoToAdd: ChainInfo | undefined; + try { + chainInfoToAdd = await NetworkService.getChainInfo({ + providerUrl: input.url, + }); + } catch (_) { + throw new Error('Invalid network URL'); + } + + if ( + !chainInfoToAdd || + input.chainId !== + chainInfoToAdd.consensusParameters.chainId.toString(10) + ) { + throw new Error(`Chain ID doesn't match`); + } + + return chainInfoToAdd; + }, + }), addNetwork: FetchMachine.create({ showError: true, async fetch({ input }) { @@ -303,8 +387,7 @@ export const networksMachine = createMachine( await NetworkService.validateNetworkExists(input.data); await NetworkService.validateNetworkVersion(input.data); - const provider = await createProvider(input.data.url); - const chainId = provider.getChainId(); + const chainId = input.data?.chainId; const createdNetwork = await NetworkService.addNetwork({ data: { diff --git a/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx b/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx index 96224426a..b31643cf8 100644 --- a/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx +++ b/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx @@ -1,55 +1,75 @@ import { Box, Button, Dialog, Focus, Icon } from '@fuel-ui/react'; import { motion } from 'framer-motion'; -import { useEffect } from 'react'; +import { useEffect, useMemo } from 'react'; +import { useWatch } from 'react-hook-form'; import { animations, styles } from '~/systems/Core'; import type { NetworkFormValues } from '~/systems/Network'; -import { - NetworkForm, - useChainInfo, - useNetworkForm, - useNetworks, -} from '~/systems/Network'; +import { NetworkForm, useNetworkForm, useNetworks } from '~/systems/Network'; import { OverlayDialogTopbar } from '~/systems/Overlay'; -// biome-ignore lint/suspicious/noExplicitAny: -const MotionStack = motion(Box.Stack); +const MotionStack = motion(Box.Stack); export function AddNetwork() { - const form = useNetworkForm(); - const { isDirty, invalid } = form.getFieldState('url', form.formState); - const isValidUrl = isDirty && !invalid; - const { handlers, isLoading } = useNetworks(); + const isEditing = false; const { - chainInfo, - error: chainInfoError, - isLoading: isLoadingChainInfo, - handlers: chainInfoHandlers, - } = useChainInfo(); + handlers, + isLoading, + isReviewingAddNetwork, + chainInfoToAdd, + isLoadingChainInfo, + chainInfoError, + } = useNetworks(); + + const context = useMemo( + () => ({ + providerChainId: chainInfoToAdd?.consensusParameters?.chainId?.toNumber(), + chainInfoError, + }), + [chainInfoToAdd?.consensusParameters?.chainId, chainInfoError] + ); + + const form = useNetworkForm({ context }); + const url = useWatch({ control: form.control, name: 'url' }); + const chainId = useWatch({ control: form.control, name: 'chainId' }); + const isValid = + form.formState.isDirty && + form.formState.isValid && + !Object.keys(form.formState.errors ?? {}).length; - // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { - if (isValidUrl && !isLoadingChainInfo && chainInfo) { - form.setValue('name', chainInfo.name, { shouldValidate: true }); + if (chainId != null && url) { + handlers.clearChainInfo(); } - }, [chainInfo, isLoadingChainInfo, isValidUrl]); + }, [url, chainId, handlers.clearChainInfo]); - // biome-ignore lint/correctness/useExhaustiveDependencies: useEffect(() => { if (chainInfoError) { - form.setError('url', { - type: 'manual', - message: 'Invalid network', - }); + form.trigger('url'); + form.trigger('chainId'); } - }, [chainInfoError]); + }, [chainInfoError, form]); function onSubmit(data: NetworkFormValues) { - handlers.addNetwork({ data }); + if (data.chainId == null || !data.url) { + throw new Error('Missing required fields'); + } + + if (!isValid) return; + handlers.validateAddNetwork({ + url: data.url, + chainId: data.chainId.toString(), + }); } - function onClickReview() { - if (!isValidUrl) return; - chainInfoHandlers.fetchChainInfo(form.getValues('url')); + function onAddNetwork() { + const name = chainInfoToAdd?.name || ''; + handlers.addNetwork({ + data: { + chainId: Number(chainId), + name, + url, + }, + }); } return ( @@ -58,7 +78,6 @@ export function AddNetwork() { as="form" gap="$4" onSubmit={form.handleSubmit(onSubmit)} - autoComplete="off" > Add Network @@ -67,10 +86,11 @@ export function AddNetwork() { @@ -79,11 +99,11 @@ export function AddNetwork() { Cancel