Skip to content

feat: implement network switch #8727

feat: implement network switch

feat: implement network switch #8727

Triggered via pull request February 11, 2025 13:10
Status Failure
Total duration 10m 6s
Artifacts

test.yml

on: pull_request
Matrix: application-components
Matrix: application-hooks
Matrix: application
Matrix: domains-contact
Matrix: domains-error
Matrix: domains-exchange
Matrix: domains-message
Matrix: domains-network
Matrix: domains-profile
Matrix: domains-vote
Matrix: domains-wallet
Matrix: router
Matrix: utils
Fit to window
Zoom out
Zoom in

Annotations

25 errors and 1 warning
Unhandled error: src/utils/network-utils.ts#L104
TypeError: Cannot read properties of undefined (reading 'id') ❯ isCustomNetwork src/utils/network-utils.ts:104:17 ❯ src/utils/network-utils.ts:142:7 ❯ profileAllEnabledNetworks src/utils/network-utils.ts:141:30 ❯ Module.profileAllEnabledNetworkIds src/utils/network-utils.ts:150:2 ❯ Module.getErroredNetworks src/utils/profile-utils.ts:42:29 ❯ src/app/hooks/use-profile-synchronizer.ts:414:33 ❯ syncProfile src/app/hooks/use-profile-synchronizer.ts:488:10 ❯ runNextTicks node:internal/process/task_queues:60:5 ❯ listOnTimeout node:internal/timers:540:9 This error originated in "src/app/App.blocks.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "should redirect to login page if profile changes". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
application (20.12.2)
Final attempt failed. Child_process exited with error code 1
domains-message (20.12.2)
Final attempt failed. Child_process exited with error code 1
src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx > ExchangeForm > should show `Sign` and `Manual Transfer` buttons if from currency is ARK: src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx#L1461
AssertionError: promise rejected "TestingLibraryElementError: Unable to fin…" instead of resolving ❯ src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx:1461:64 Caused by: Caused by: TestingLibraryElementError: Unable to find an element with the text: Manual Transfer. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body style="overflow-y: overlay;" > <div aria-live="polite" aria-relevant="additions text" id="a11y-status-message" role="status" style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px;" /> <div /> <div> <form class="space-y-5" data-testid="ExchangeForm" > <div> <div class="flex flex-col" > <span class="mx-auto mb-2 inline-block font-semibold text-theme-secondary-text sm:hidden" /> <ul class="flex space-x-3" > <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-warning-300" /> <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-warning-300" /> <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-primary-100 dark:bg-theme-secondary-800" /> <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-primary-100 dark:bg-theme-secondary-800" /> </ul> </div> <div class="mb-24 mt-6 sm:mb-0 sm:mt-8" > <div data-testid="tab-pabel__active-panel" > <div class="space-y-4" data-testid="ExchangeForm__review-step" > <div class="flex flex-col rounded-xl border border-theme-secondary-300 dark:border-theme-secondary-800" > <div class="flex flex-col gap-2 px-6 py-5" > <span class="text-sm font-semibold text-theme-secondary-500 dark:text-theme-secondary-700" > You Send </span> <span class="whitespace-nowrap text-lg font-semibold" data-testid="Amount" > 1 ARK </span> <span class="pt-1 text-xs font-semibold" > 1 ARK ≈ <span class="whitespace-nowrap" data-testid="Amount" > 37,042.3588384 BTC </span> </span> </div> <div class="relative border-t border-theme-secondary-300 dark:border-theme-secondary-800" > <div class="absolute right-6 top-1/2 flex h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-theme-secondary-300 bg-theme-background dark:border-theme-secondary-800" > <div class="text-theme-secondary-900 dark:text-white" > <div style="height: 20px; width: 20px;" > <svg fill="none" style="height: 100%; width: 100%;" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(#clip0_12944_131082)" > <path
src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx > ExchangeForm > should proceed to the status step when `Manual Transfer` is clicked: src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx#L1483
AssertionError: promise rejected "TestingLibraryElementError: Unable to fin…" instead of resolving ❯ src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx:1483:64 Caused by: Caused by: TestingLibraryElementError: Unable to find an element with the text: Manual Transfer. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, script, style <body style="overflow-y: overlay;" > <div aria-live="polite" aria-relevant="additions text" id="a11y-status-message" role="status" style="border: 0px; height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px;" /> <div /> <div> <form class="space-y-5" data-testid="ExchangeForm" > <div> <div class="flex flex-col" > <span class="mx-auto mb-2 inline-block font-semibold text-theme-secondary-text sm:hidden" /> <ul class="flex space-x-3" > <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-warning-300" /> <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-warning-300" /> <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-primary-100 dark:bg-theme-secondary-800" /> <li class="h-0.5 flex-1 rounded-lg transition-colors duration-300 bg-theme-primary-100 dark:bg-theme-secondary-800" /> </ul> </div> <div class="mb-24 mt-6 sm:mb-0 sm:mt-8" > <div data-testid="tab-pabel__active-panel" > <div class="space-y-4" data-testid="ExchangeForm__review-step" > <div class="flex flex-col rounded-xl border border-theme-secondary-300 dark:border-theme-secondary-800" > <div class="flex flex-col gap-2 px-6 py-5" > <span class="text-sm font-semibold text-theme-secondary-500 dark:text-theme-secondary-700" > You Send </span> <span class="whitespace-nowrap text-lg font-semibold" data-testid="Amount" > 1 ARK </span> <span class="pt-1 text-xs font-semibold" > 1 ARK ≈ <span class="whitespace-nowrap" data-testid="Amount" > 37,042.3588384 BTC </span> </span> </div> <div class="relative border-t border-theme-secondary-300 dark:border-theme-secondary-800" > <div class="absolute right-6 top-1/2 flex h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-theme-secondary-300 bg-theme-background dark:border-theme-secondary-800" > <div class="text-theme-secondary-900 dark:text-white" > <div style="height: 20px; width: 20px;" > <svg fill="none" style="height: 100%; width: 100%;" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" > <g clip-path="url(#clip0_12944_131082)" > <path
src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx > ExchangeForm > should show Sign Transfer modal when `Sign` is clicked: src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx#L1519
Error: expect(element).toHaveTextContent() Expected element to have text content: Sign Received: Continue ❯ src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx:1519:28
src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx > ExchangeForm > should trigger `onClose`: src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx#L1556
Error: expect(element).toHaveTextContent() Expected element to have text content: Sign Received: Continue ❯ src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx:1556:28
src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx > ExchangeForm > should trigger `onSuccess`: src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx#L1605
Error: expect(element).toHaveTextContent() Expected element to have text content: Sign Received: Continue ❯ src/domains/exchange/components/ExchangeForm/ExchangeForm.test.tsx:1605:28
domains-exchange (20.12.2)
Final attempt failed. Child_process exited with error code 1
src/domains/profile/pages/Welcome/Welcome.test.tsx > Welcome with deeplink > should show a warning if there are no available senders for network: src/domains/profile/pages/Welcome/Welcome.test.tsx#L52
AssertionError: expected "update" to be called with arguments: [ Any<String>, 'error', { …(9) } ] Received: 1st update call: Array [ - Any<String>, + "12", "error", <Trans - i18nKey="TRANSACTION.VALIDATION.NETWORK_NO_WALLETS" + i18nKey="TRANSACTION.VALIDATION.NETWORK_NOT_ENABLED" parent={[Function WrapperURI]} values={ Object { "network": "ARK", } } />, ] Number of calls: 1 Ignored nodes: comments, script, style <html class="light" > <head> <title /> </head> <body style="overflow-y: overlay;" > <div /> <div /> </body> </html> ❯ src/domains/profile/pages/Welcome/Welcome.test.tsx:52:45 ❯ runWithExpensiveErrorDiagnosticsDisabled node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/config.js:47:12 ❯ checkCallback node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/wait-for.js:124:77 ❯ Timeout.checkRealTimersCallback node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/wait-for.js:118:16
src/domains/profile/pages/Welcome/Welcome.test.tsx > Welcome with deeplink > should show a warning if there are no available senders for the network with the given nethash: src/domains/profile/pages/Welcome/Welcome.test.tsx#L52
AssertionError: expected "update" to be called with arguments: [ Any<String>, 'error', { …(9) } ] Received: 1st update call: Array [ - Any<String>, + "16", "error", <Trans - i18nKey="TRANSACTION.VALIDATION.NETWORK_NO_WALLETS" + i18nKey="TRANSACTION.VALIDATION.NETWORK_NOT_ENABLED" parent={[Function WrapperURI]} values={ Object { "network": "ARK", } } />, ] Number of calls: 1 Ignored nodes: comments, script, style <html class="light" > <head> <title /> </head> <body style="overflow-y: overlay;" > <div /> <div /> </body> </html> ❯ src/domains/profile/pages/Welcome/Welcome.test.tsx:52:45 ❯ runWithExpensiveErrorDiagnosticsDisabled node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/config.js:47:12 ❯ checkCallback node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/wait-for.js:124:77 ❯ Timeout.checkRealTimersCallback node_modules/.pnpm/@testing-library[email protected]/node_modules/@testing-library/dom/dist/wait-for.js:118:16
domains-profile (20.12.2)
Final attempt failed. Child_process exited with error code 1
Unhandled error: src/app/contexts/Ledger/Ledger.tsx#L8
Error: React act warning detected: Warning: An update to %s inside a test was not wrapped in act(...). When testing, code that causes React state updates should be wrapped into act(...): act(() => { /* fire events that update state */ }); /* assert on the output */ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act%s LedgerProvider at LedgerProvider (/home/runner/work/arkvault/arkvault/src/app/contexts/Ledger/Ledger.tsx:8:27) at EnvironmentProvider (/home/runner/work/arkvault/arkvault/src/app/contexts/Environment/Environment.tsx:9:32) at I18nextProvider (/home/runner/work/arkvault/arkvault/node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/I18nextProvider.js:7:5) at WithProviders (/home/runner/work/arkvault/arkvault/src/utils/testing-library.tsx:74:26) at RouterWrapper (/home/runner/work/arkvault/arkvault/src/utils/testing-library.tsx:164:28) ❯ LedgerProvider src/app/contexts/Ledger/Ledger.tsx:8:27 ❯ EnvironmentProvider src/app/contexts/Environment/Environment.tsx:9:32 ❯ I18nextProvider node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected]/node_modules/react-i18next/dist/es/I18nextProvider.js:7:5 ❯ WithProviders src/utils/testing-library.tsx:74:26 ❯ RouterWrapper src/utils/testing-library.tsx:164:28 ❯ Console.<anonymous> src/utils/test-plugins.ts:9:11 ❯ Console.mockCall node_modules/.pnpm/@vitest[email protected]/node_modules/@vitest/spy/dist/index.js:61:17 ❯ Console.error node_modules/.pnpm/[email protected]/node_modules/tinyspy/dist/index.js:45:80 ❯ printWarning node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:86:30 ❯ error node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:60:7 ❯ warnIfUpdatesNotWrappedWithActDEV node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27628:9 ❯ scheduleUpdateOnFiber node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25547:5 ❯ dispatchReducerAction node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:16633:7 ❯ src/app/contexts/Ledger/hooks/connection.ts:131:3 ❯ src/app/contexts/Ledger/hooks/connection.ts:41:3 This error originated in "src/domains/wallet/pages/ImportWallet/ImportWallet.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "should import by address and name". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
Unhandled error: src/domains/wallet/pages/ImportWallet/Ledger/LedgerConnectionStep.tsx#L103
TypeError: Cannot read properties of undefined (reading 'coin') ❯ LedgerConnectionStep src/domains/wallet/pages/ImportWallet/Ledger/LedgerConnectionStep.tsx:103:6 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:15486:18 ❯ mountIndeterminateComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20103:13 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21626:16 ❯ beginWork$1 node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27465:14 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26599:12 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26505:5 ❯ renderRootSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26473:7 ❯ recoverFromConcurrentError node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25889:20 ❯ performConcurrentWorkOnRoot node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:25789:22 This error originated in "src/domains/wallet/pages/ImportWallet/Ledger/LedgerTabs.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running. The latest test that might've caused the error is "should render connection step". It might mean one of the following: - The error was thrown, while Vitest was running this test. - If the error occurred after the test had been completed, this was the last documented test before it was thrown.
src/domains/wallet/hooks/use-display-wallets.test.tsx > useDisplayWallets > should return list of wallets by only one selected network: src/domains/wallet/hooks/use-display-wallets.test.tsx#L71
AssertionError: expected [ Wallet{}, Wallet{} ] to have a length of 3 but got 2 - Expected + Received - 3 + 2 ❯ src/domains/wallet/hooks/use-display-wallets.test.tsx:71:36
src/domains/wallet/hooks/use-display-wallets.test.tsx > useDisplayWallets > should return all list wallets: src/domains/wallet/hooks/use-display-wallets.test.tsx#L104
AssertionError: expected [ Wallet{}, Wallet{} ] to have a length of 3 but got 2 - Expected + Received - 3 + 2 ❯ src/domains/wallet/hooks/use-display-wallets.test.tsx:104:36
src/domains/wallet/hooks/use-display-wallets.test.tsx > useDisplayWallets > should return properly sorted wallets: src/domains/wallet/hooks/use-display-wallets.test.tsx#L129
AssertionError: expected [ …(2) ] to strictly equal [ …(3) ] - Expected + Received Array [ Wallet {}, Wallet {}, - Wallet {}, ] ❯ src/domains/wallet/hooks/use-display-wallets.test.tsx:129:36
src/domains/wallet/hooks/use-display-wallets.test.tsx > useDisplayWallets > should filter starred wallet types: src/domains/wallet/hooks/use-display-wallets.test.tsx#L155
AssertionError: expected [ …(2) ] to have a length of 3 but got 2 - Expected + Received - 3 + 2 ❯ src/domains/wallet/hooks/use-display-wallets.test.tsx:155:36
src/domains/wallet/hooks/use-display-wallets.test.tsx > useDisplayWallets > should filter ledger wallet type: src/domains/wallet/hooks/use-display-wallets.test.tsx#L180
AssertionError: expected [ …(2) ] to have a length of 3 but got 2 - Expected + Received - 3 + 2 ❯ src/domains/wallet/hooks/use-display-wallets.test.tsx:180:36
src/domains/wallet/hooks/use-wallet-config.test.tsx > useWalletConfig > should have default configuration: src/domains/wallet/hooks/use-wallet-config.test.tsx#L37
AssertionError: expected [] to have a length of 2 but got +0 - Expected + Received - 2 + 0 ❯ src/domains/wallet/hooks/use-wallet-config.test.tsx:37:35
src/domains/wallet/hooks/use-wallet-import.test.tsx > useWalletImport > should import wallet from mnemonic with bip39: src/app/contexts/Environment/Environment.tsx#L58
Error: [useEnvironment] Component not wrapped within a Provider ❯ Module.useEnvironmentContext src/app/contexts/Environment/Environment.tsx:58:9 ❯ Module.useWalletImport src/domains/wallet/hooks/use-wallet-import.ts:52:17 ❯ src/domains/wallet/hooks/use-wallet-import.test.tsx:27:24 ❯ TestComponent node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected]_@types+reac_x5rj3xwonxhnmkxmlc6ezsylf4/node_modules/@testing-library/react/dist/pure.js:309:27 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:15486:18 ❯ mountIndeterminateComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20103:13 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21626:16 ❯ beginWork$1 node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27465:14 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26599:12 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26505:5
src/domains/wallet/hooks/use-wallet-import.test.tsx > useWalletImport > should reject import wallet from mnemonic with bip44: src/app/contexts/Environment/Environment.tsx#L58
Error: [useEnvironment] Component not wrapped within a Provider ❯ Module.useEnvironmentContext src/app/contexts/Environment/Environment.tsx:58:9 ❯ Module.useWalletImport src/domains/wallet/hooks/use-wallet-import.ts:52:17 ❯ src/domains/wallet/hooks/use-wallet-import.test.tsx:44:25 ❯ TestComponent node_modules/.pnpm/@testing-library[email protected]_@[email protected]_@[email protected]_@types+reac_x5rj3xwonxhnmkxmlc6ezsylf4/node_modules/@testing-library/react/dist/pure.js:309:27 ❯ renderWithHooks node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:15486:18 ❯ mountIndeterminateComponent node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:20103:13 ❯ beginWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:21626:16 ❯ beginWork$1 node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:27465:14 ❯ performUnitOfWork node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26599:12 ❯ workLoopSync node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom.development.js:26505:5
src/app/components/SelectNetworkDropdown/SelectNetworkDropdown.test.tsx > SelectNetworkDropdown > should change network: src/app/components/SelectNetworkDropdown/SelectNetworkDropdown.test.tsx#L76
AssertionError: expected "spy" to be called with arguments: [ undefined ] Received: 1st spy call: Array [ - undefined, + Network {}, ] 2nd spy call: Array [ - undefined, + Object { + "coin": [Function coin], + "coinName": [Function coinName], + "id": [Function id], + "isLive": [Function isLive], + "isTest": [Function isTest], + "ticker": [Function ticker], + }, ] Number of calls: 2 ❯ src/app/components/SelectNetworkDropdown/SelectNetworkDropdown.test.tsx:76:20
src/app/components/SelectNetworkDropdown/SelectNetworkDropdown.test.tsx > SelectNetworkDropdown > should change network: src/app/components/SelectNetworkDropdown/SelectNetworkDropdown.test.tsx#L76
AssertionError: expected "spy" to be called with arguments: [ undefined ] Received: 1st spy call: Array [ - undefined, + Network {}, ] 2nd spy call: Array [ - undefined, + Object { + "coin": [Function coin], + "coinName": [Function coinName], + "id": [Function id], + "isLive": [Function isLive], + "isTest": [Function isTest], + "ticker": [Function ticker], + }, ] Number of calls: 2 ❯ src/app/components/SelectNetworkDropdown/SelectNetworkDropdown.test.tsx:76:20
application-components (20.12.2)
Final attempt failed. Child_process exited with error code 1
application-components (20.12.2)
Attempt 1 failed. Reason: Child_process exited with error code 1