From 771951051573f16dcd70421e52a208c34f761b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Est=C3=A1cio=20=7C=20stacio=2Eeth?= Date: Thu, 14 Sep 2023 17:15:24 +0100 Subject: [PATCH] feat: update prettify, eslint and tsconfig to use fuels packs (#858) --- .changeset/config.json | 2 +- .changeset/rich-ligers-thank.md | 2 + .eslintrc | 12 + .eslintrc.js | 20 - .prettierrc | 9 +- package.json | 3 + packages/app/jest.config.ts | 1 - packages/app/package.json | 4 +- packages/app/src/App.tsx | 3 +- packages/app/src/routes.tsx | 11 +- .../systems/Account/__mocks__/accounts.tsx | 3 +- .../components/AccountForm/AccountForm.tsx | 3 +- .../AccountInfo/AccountInfo.stories.tsx | 3 +- .../AccountInfo/AccountInfo.test.tsx | 5 +- .../components/AccountInfo/AccountInfo.tsx | 3 +- .../AccountInfo/AccountInfoLoader.tsx | 1 - .../AccountItem/AccountItem.test.tsx | 3 +- .../components/AccountItem/AccountItem.tsx | 3 +- .../AccountList/AccountList.test.tsx | 3 +- .../BalanceWidget/BalanceWidget.test.tsx | 5 +- .../BalanceWidget/BalanceWidget.tsx | 7 +- .../components/EthAddress/EthAddress.tsx | 1 - .../components/FuelAddress/FuelAddress.tsx | 1 - .../ImportAccountForm/ImportAccountForm.tsx | 3 +- packages/app/src/systems/Account/events.tsx | 1 - .../systems/Account/hooks/useAccountForm.ts | 4 +- .../src/systems/Account/hooks/useAccounts.tsx | 5 +- .../systems/Account/hooks/useEditAccount.tsx | 5 +- .../Account/hooks/useExportAccount.tsx | 1 - .../Account/hooks/useImportAccount.tsx | 3 +- .../Account/hooks/useImportAccountForm.ts | 3 +- .../Account/machines/accountsMachine.test.ts | 5 +- .../Account/machines/accountsMachine.tsx | 7 +- .../machines/addAccountMachine.test.ts | 3 +- .../Account/machines/addAccountMachine.tsx | 5 +- .../machines/editAccountMachine.test.ts | 3 +- .../Account/machines/editAccountMachine.tsx | 7 +- .../machines/exportAccountMachine.test.tsx | 3 +- .../Account/machines/exportAccountMachine.tsx | 7 +- .../machines/importAccountMachine.test.ts | 3 +- .../Account/machines/importAccountMachine.tsx | 7 +- .../pages/Accounts/Accounts.stories.tsx | 5 +- .../Account/pages/Accounts/Accounts.tsx | 5 +- .../pages/EditAccount/EditAccount.stories.tsx | 5 +- .../Account/pages/EditAccount/EditAccount.tsx | 5 +- .../ExportAccount/ExportAccount.stories.tsx | 5 +- .../pages/ExportAccount/ExportAccount.tsx | 7 +- .../ImportAccount/ImportAccount.stories.tsx | 5 +- .../pages/ImportAccount/ImportAccount.tsx | 5 +- .../Account/pages/Logout/Logout.stories.tsx | 5 +- .../systems/Account/pages/Logout/Logout.tsx | 5 +- .../systems/Account/services/account.test.ts | 5 +- .../src/systems/Account/services/account.ts | 2 - .../app/src/systems/Account/utils/storage.tsx | 1 - .../Asset/components/AssetForm/AssetForm.tsx | 3 +- .../components/AssetItem/AssetItem.test.tsx | 3 +- .../Asset/components/AssetItem/AssetItem.tsx | 5 +- .../components/AssetList/AssetList.test.tsx | 5 +- .../components/AssetList/AssetListEmpty.tsx | 1 - .../AssetSelect/AssetSelect.test.tsx | 3 +- .../components/AssetSelect/AssetSelect.tsx | 1 - .../components/AssetsAmount/AssetsAmount.tsx | 5 +- packages/app/src/systems/Asset/events.tsx | 5 +- .../app/src/systems/Asset/hooks/useAsset.tsx | 4 +- .../src/systems/Asset/hooks/useAssetForm.tsx | 4 +- .../app/src/systems/Asset/hooks/useAssets.tsx | 5 +- .../Asset/machines/assetsMachine.test.tsx | 3 +- .../systems/Asset/machines/assetsMachine.tsx | 3 +- .../src/systems/Asset/pages/Assets/Assets.tsx | 3 +- .../Asset/pages/UpsertAsset/UpsertAsset.tsx | 3 +- .../app/src/systems/Asset/services/assets.ts | 1 - .../background/services/BackgroundService.ts | 9 +- .../services/CommunicationProtocol.ts | 1 - .../CRX/background/services/DatabaseEvents.ts | 5 +- .../background/services/DatabaseObservable.ts | 1 - .../CRX/background/services/PopUpService.ts | 5 +- .../CRX/background/services/VaultService.ts | 5 +- .../systems/CRX/components/PrivateRoute.tsx | 3 +- .../src/systems/CRX/scripts/contentScript.ts | 3 +- .../app/src/systems/CRX/scripts/pageScript.ts | 1 - packages/app/src/systems/CRX/utils/popups.ts | 4 +- .../systems/Core/__tests__/utils/mockVault.ts | 6 +- .../ConnectInfo/ConnectInfo.stories.tsx | 3 +- .../ConnectInfo/ConnectInfo.test.tsx | 5 +- .../Core/components/Layout/Layout.stories.tsx | 5 +- .../systems/Core/components/Layout/Layout.tsx | 7 +- .../systems/Core/components/Layout/TopBar.tsx | 5 +- .../components/Mnemonic/Mnemonic.stories.tsx | 3 +- .../components/Mnemonic/Mnemonic.test.tsx | 1 - .../components/Mnemonic/MnemonicInput.tsx | 1 - .../Core/components/Providers/Providers.tsx | 3 +- .../components/TestWrapper/TestWrapper.tsx | 9 +- .../src/systems/Core/hooks/useIsLogged.tsx | 4 +- packages/app/src/systems/Core/styles/core.ts | 1 - .../app/src/systems/Core/utils/database.ts | 4 +- .../app/src/systems/Core/utils/graphql.tsx | 1 - packages/app/src/systems/Core/utils/math.ts | 1 - packages/app/src/systems/Core/utils/wallet.ts | 1 - .../systems/DApp/__mocks__/dapp-provider.ts | 1 - .../DApp/__mocks__/dapp-transaction.ts | 1 - packages/app/src/systems/DApp/events.ts | 6 +- .../systems/DApp/hooks/useAddAssetRequest.tsx | 3 +- .../DApp/hooks/useAddNetworkRequest.tsx | 3 +- .../systems/DApp/hooks/useConnectRequest.tsx | 5 +- .../DApp/hooks/useSignatureRequest.tsx | 3 +- .../DApp/hooks/useTransactionRequest.tsx | 8 +- .../DApp/machines/addAssetRequestMachine.tsx | 1 - .../machines/addNetworkRequestMachine.tsx | 1 - .../machines/connectRequestMachine.test.ts | 5 +- .../DApp/machines/connectRequestMachine.ts | 5 +- .../machines/messageRequestMachine.test.ts | 5 +- .../DApp/machines/messageRequestMachine.tsx | 1 - .../transactionRequestMachine.test.ts | 7 +- .../machines/transactionRequestMachine.tsx | 1 - packages/app/src/systems/DApp/methods.ts | 1 - .../pages/AddAssetRequest/AddAssetRequest.tsx | 5 +- .../AddNetworkRequest.stories.tsx | 4 +- .../AddNetworkRequest/AddNetworkRequest.tsx | 5 +- .../ConnectionRequest.stories.tsx | 5 +- .../ConnectionRequest/ConnectionRequest.tsx | 7 +- .../SignatureRequest.stories.tsx | 4 +- .../SignatureRequest/SignatureRequest.tsx | 5 +- .../TransactionRequest.stories.tsx | 6 +- .../TransactionRequest/TransactionRequest.tsx | 5 +- .../systems/DApp/services/connection.test.ts | 3 +- .../src/systems/DApp/services/connection.ts | 1 - .../Error/machines/reportErrorMachine.tsx | 3 +- .../Error/pages/ReportErrors/ReportErrors.tsx | 5 +- .../Error/services/ReportErrorService.tsx | 5 +- .../Faucet/components/FaucetDialog.test.tsx | 3 +- .../Faucet/components/FaucetDialog.tsx | 5 +- .../src/systems/Faucet/hooks/useCaptcha.ts | 3 +- .../systems/Faucet/hooks/useFaucetDialog.tsx | 3 +- .../src/systems/Faucet/hooks/useOpenFaucet.ts | 1 - .../Faucet/machines/captchaMachine.tsx | 1 - .../Faucet/machines/faucetMachine.test.ts | 3 +- .../systems/Faucet/machines/faucetMachine.tsx | 1 - .../HomeActions/HomeActions.test.tsx | 3 +- .../components/HomeActions/HomeActions.tsx | 1 - .../Home/components/QRCode/QRCode.test.tsx | 3 +- .../UserAddressCard/UserAddressCard.test.tsx | 3 +- .../systems/Home/pages/Home/Home.stories.tsx | 5 +- .../app/src/systems/Home/pages/Home/Home.tsx | 5 +- .../systems/Home/pages/Receive/Receive.tsx | 5 +- .../components/NetworkForm/NetworkForm.tsx | 5 +- .../NetworkItem/NetworkItem.test.tsx | 3 +- .../NetworkList/NetworkList.test.tsx | 3 +- .../NetworkReviewCard/NetworkReviewCard.tsx | 1 - .../NetworkSelector.stories.tsx | 3 +- .../NetworkSelector/NetworkSelector.test.tsx | 5 +- .../NetworkSelector/NetworkSelector.tsx | 1 - packages/app/src/systems/Network/events.tsx | 5 +- .../systems/Network/hooks/useNetworkForm.ts | 4 +- .../src/systems/Network/hooks/useNetworks.ts | 5 +- .../Network/machines/chainInfoMachine.test.ts | 5 +- .../Network/machines/chainInfoMachine.ts | 5 +- .../Network/machines/networksMachine.test.ts | 3 +- .../Network/machines/networksMachine.ts | 5 +- .../pages/AddNetwork/AddNetwork.stories.tsx | 5 +- .../Network/pages/AddNetwork/AddNetwork.tsx | 1 - .../pages/Networks/Networks.stories.tsx | 5 +- .../Network/pages/Networks/Networks.tsx | 1 - .../UpdateNetwork/UpdateNetwork.stories.tsx | 5 +- .../pages/UpdateNetwork/UpdateNetwork.tsx | 1 - .../src/systems/Network/services/network.ts | 3 +- .../OverlayDialog/OverlayDialog.tsx | 1 - .../src/systems/Overlay/hooks/useOverlay.tsx | 4 +- .../app/src/systems/Send/__mocks__/send.tsx | 1 - .../Send/components/Send/Send.stories.tsx | 9 +- .../Send/components/Send/Send.test.tsx | 5 +- .../Send/components/SendSelect/SendSelect.tsx | 5 +- .../app/src/systems/Send/hooks/useSend.tsx | 9 +- .../systems/Send/machines/sendMachine.test.ts | 7 +- .../src/systems/Send/machines/sendMachine.ts | 1 - .../Send/pages/SendPage/SendPage.stories.tsx | 9 +- .../systems/Send/pages/SendPage/SendPage.tsx | 3 +- .../systems/Settings/__mocks__/connection.ts | 1 - .../systems/Settings/__test__/testQueries.ts | 2 - .../ConnectionEdit/ConnectionEdit.test.tsx | 5 +- .../ConnectionEdit/ConnectionEdit.tsx | 5 +- .../ConnectionItem/ConnectionItem.tsx | 3 +- .../ConnectionList/ConnectionList.test.tsx | 5 +- .../ConnectionList/ConnectionList.tsx | 7 +- .../src/systems/Settings/hooks/useSettings.ts | 5 +- .../machines/connectionsMachine.test.ts | 5 +- .../Settings/machines/connectionsMachine.tsx | 1 - .../machines/exportVaultMachine.test.tsx | 3 +- .../Settings/machines/exportVaultMachine.ts | 1 - .../machines/settingsMachine.test.tsx | 5 +- .../Settings/machines/settingsMachine.ts | 1 - .../ChangePassword/ChangePassword.stories.tsx | 5 +- .../pages/ChangePassword/ChangePassword.tsx | 5 +- .../pages/Connections/Connections.test.tsx | 7 +- .../pages/Connections/Connections.tsx | 3 +- .../ViewSeedPhrase/ViewSeedPhrase.stories.tsx | 5 +- .../pages/ViewSeedPhrase/ViewSeedPhrase.tsx | 5 +- .../app/src/systems/Settings/services/abi.ts | 1 - .../Sidebar/components/Menu/Menu.test.tsx | 3 +- .../systems/Sidebar/components/Menu/Menu.tsx | 1 - .../Sidebar/components/Sidebar/Sidebar.tsx | 5 +- .../systems/Sidebar/constants/sidebarItems.ts | 4 +- .../CreatePassword/CreatePassword.test.tsx | 33 +- .../CreatePassword/CreatePassword.tsx | 9 +- .../MnemonicRead/MnemonicRead.test.tsx | 28 +- .../components/MnemonicRead/MnemonicRead.tsx | 3 +- .../MnemonicWrite/MnemonicWrite.test.tsx | 79 +- .../MnemonicWrite/MnemonicWrite.tsx | 3 +- .../SignUpProvider/SignUpProvider.tsx | 4 +- .../WalletCreated/WalletCreated.stories.tsx | 3 +- .../WalletCreated/WalletCreated.test.tsx | 22 +- .../WalletCreated/WalletCreated.tsx | 9 +- .../systems/SignUp/hooks/useMnemonicForm.tsx | 3 +- .../src/systems/SignUp/hooks/useSignUp.tsx | 3 +- .../SignUp/machines/signUpMachine.test.ts | 5 +- .../systems/SignUp/machines/signUpMachine.ts | 5 +- .../pages/BackupWallet/BackupWallet.tsx | 4 +- .../pages/ConfirmWallet/ConfirmWallet.tsx | 4 +- .../SignUp/pages/CreatedWallet/index.tsx | 4 +- .../pages/EncryptWallet/EncryptWallet.tsx | 4 +- .../pages/RecoverWallet/RecoverWallet.tsx | 4 +- .../SignUp/pages/TermsOfUse/TermsOfUse.tsx | 5 +- .../pages/WelcomeScreen/WelcomeScreen.tsx | 3 +- .../ActivityItem/ActivityItem.stories.tsx | 2 - .../ActivityItem/ActivityItem.test.tsx | 3 +- .../components/ActivityItem/ActivityItem.tsx | 3 +- .../ActivityList/ActivityList.stories.tsx | 3 +- .../ActivityList/ActivityList.test.tsx | 5 +- .../ActivityList/ActivityListEmpty.tsx | 1 - .../FunctionCalls/FunctionCalls.tsx | 1 - .../components/TxContent/TxContent.tsx | 1 - .../components/TxFromTo/TxFromTo.test.tsx | 5 +- .../components/TxFromTo/TxFromTo.tsx | 3 +- .../components/TxIcon/TxIcon.test.tsx | 11 +- .../Transaction/components/TxIcon/TxIcon.tsx | 3 +- .../TxOperation/TxOperation.test.tsx | 3 +- .../components/TxOperation/TxOperation.tsx | 5 +- .../components/TxOperations/TxOperations.tsx | 3 +- .../TxRecipientCard/TxRecipientCard.test.tsx | 5 +- .../TxRecipientCard/TxRecipientCard.tsx | 3 +- .../Transaction/hooks/useExplorerLink.tsx | 1 - .../Transaction/hooks/useTxMetadata.tsx | 3 +- .../machines/transactionHistoryMachine.tsx | 5 +- .../machines/transactionMachine.test.tsx | 3 +- .../machines/transactionMachine.tsx | 5 +- .../pages/TxApprove/TxApprove.stories.tsx | 5 +- .../Transaction/pages/TxApprove/TxApprove.tsx | 1 - .../pages/TxView/TxView.stories.tsx | 7 +- .../Transaction/pages/TxView/TxView.tsx | 7 +- .../ViewActivity/ViewActivity.stories.tsx | 7 +- .../pages/ViewActivity/ViewActivity.tsx | 7 +- .../Transaction/services/transaction.test.ts | 3 +- .../Transaction/services/transaction.tsx | 7 +- .../app/src/systems/Transaction/utils/abi.ts | 2 - .../ResetDialog/ResetDialog.stories.tsx | 5 +- .../components/ResetDialog/ResetDialog.tsx | 5 +- .../UnlockCard/UnlockCard.stories.tsx | 4 +- .../components/UnlockCard/UnlockCard.tsx | 3 +- .../components/UnlockForm/UnlockForm.tsx | 3 +- .../src/systems/Unlock/hooks/useUnlock.tsx | 5 +- .../Unlock/machines/unlockMachine.test.tsx | 5 +- .../systems/Unlock/machines/unlockMachine.tsx | 1 - .../app/src/systems/Unlock/pages/Unlock.tsx | 3 +- .../Vault/connectors/VaultWebConnector.ts | 5 +- .../src/systems/Vault/services/VaultClient.ts | 3 +- .../src/systems/Vault/services/VaultServer.ts | 1 - packages/app/src/vite-env.d.ts | 4 + packages/app/tsconfig.json | 2 +- packages/app/vite-utils/vite.base.config.ts | 1 - packages/asset-list/tsconfig.json | 2 +- packages/config/index.js | 96 -- packages/config/package.json | 35 - packages/docs/.eslintrc.js | 23 - packages/docs/examples/AddAbi.tsx | 9 +- packages/docs/examples/AddAssets.tsx | 1 - packages/docs/examples/AddNetwork.tsx | 1 - packages/docs/examples/Connectors.tsx | 1 - packages/docs/examples/Network.tsx | 1 - packages/docs/package.json | 2 +- packages/docs/src/components/Breadcrumb.tsx | 1 - packages/docs/src/components/CodeImport.tsx | 3 +- packages/docs/src/components/DocFooter.tsx | 1 - packages/docs/src/components/Search.tsx | 1 - packages/docs/src/components/Sidebar.tsx | 3 +- packages/docs/src/components/SidebarLink.tsx | 1 - .../docs/src/components/SidebarSubmenu.tsx | 3 +- .../docs/src/components/TableOfContent.tsx | 1 - packages/docs/src/hooks/useDocContext.tsx | 1 - packages/docs/src/lib/api.ts | 5 +- packages/docs/src/lib/code-import.ts | 1 - packages/docs/src/lib/toc.ts | 2 - packages/docs/src/screens/DocPage.tsx | 1 - packages/docs/tsconfig.json | 2 +- packages/sdk/jest.config.ts | 1 - packages/sdk/load.envs.ts | 2 - packages/sdk/package.json | 4 +- .../sdk/src/connections/WindowConnection.ts | 1 - packages/sdk/src/utils/createReadOnly.ts | 1 - packages/sdk/tsconfig.json | 2 +- packages/types/package.json | 4 +- packages/types/tsconfig.json | 2 +- pnpm-lock.yaml | 862 +++++++++++------- tsconfig.base.json | 26 - tsconfig.eslint.json | 2 +- tsconfig.json | 2 +- 304 files changed, 1006 insertions(+), 1293 deletions(-) create mode 100644 .changeset/rich-ligers-thank.md create mode 100644 .eslintrc delete mode 100644 .eslintrc.js delete mode 100644 packages/config/index.js delete mode 100644 packages/config/package.json delete mode 100644 packages/docs/.eslintrc.js delete mode 100644 tsconfig.base.json diff --git a/.changeset/config.json b/.changeset/config.json index 656dd0f34..6054d5987 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -14,7 +14,7 @@ "access": "public", "baseBranch": "master", "updateInternalDependencies": "patch", - "ignore": ["docs", "asset-list", "@fuel-wallet/config"], + "ignore": ["docs", "asset-list"], "snapshot": { "useCalculatedVersion": true, "prereleaseTemplate": "{tag}-{commit}" diff --git a/.changeset/rich-ligers-thank.md b/.changeset/rich-ligers-thank.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/rich-ligers-thank.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 000000000..c3a7c2d80 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,12 @@ +{ + "extends": ["plugin:@fuels/base"], + "rules": { + "import/prefer-default-export": "off", + "import/no-named-as-default": "off", + "import/export": "off", + "import/default": "off", + "no-console": "error", + "@typescript-eslint/no-empty-function": "off", + "jsx-a11y/alt-text": "off" + } +} diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 14674f6cf..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,20 +0,0 @@ -const config = require('./packages/config'); -const path = require('path'); - -const resolveRoot = (dir = '') => path.resolve(__dirname, dir); - -module.exports = { - ...config, - parserOptions: { - ...config.parserOptions, - tsConfigRootDir: resolveRoot(), - project: [ - resolveRoot('./tsconfig.eslint.json'), - resolveRoot('./**/**/tsconfig.json'), - ], - }, - rules: { - ...config.rules, - 'import/order': config.rules['import/order'], - }, -}; diff --git a/.prettierrc b/.prettierrc index d7e5e5f71..47e4b208b 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,8 +1 @@ -{ - "printWidth": 80, - "semi": true, - "tabWidth": 2, - "useTabs": false, - "singleQuote": true, - "bracketSpacing": true -} +"@fuels/prettier-config" diff --git a/package.json b/package.json index 01d527718..51bd61408 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,9 @@ "@babel/core": "^7.22.10", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", + "@fuels/eslint-plugin": "0.0.9", + "@fuels/prettier-config": "0.0.9", + "@fuels/ts-config": "0.0.9", "@jest/types": "29.6.1", "@playwright/test": "^1.37.1", "@swc/core": "1.3.75", diff --git a/packages/app/jest.config.ts b/packages/app/jest.config.ts index 863cc48f4..e03b70cf0 100644 --- a/packages/app/jest.config.ts +++ b/packages/app/jest.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import baseDefaultConfig from '@fuel-ui/test-utils/config'; import type { JestConfigWithTsJest } from 'ts-jest'; import { defaultsESM as tsjPreset } from 'ts-jest/presets'; diff --git a/packages/app/package.json b/packages/app/package.json index 4a5cc86ea..c10366736 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -21,7 +21,7 @@ }, "dependencies": { "@fontsource/source-code-pro": "^5.0.8", - "@fuel-ts/wallet-manager": "0.56.1", + "@fuel-ts/wallet-manager": "0.57.0", "@fuel-ui/config": "0.17.0", "@fuel-ui/css": "0.19.1", "@fuel-ui/icons": "0.19.1", @@ -46,7 +46,7 @@ "events": "^3.3.0", "fake-indexeddb": "^4.0.2", "framer-motion": "^10.16.1", - "fuels": "0.56.1", + "fuels": "0.57.0", "graphql": "^16.8.0", "graphql-request": "^6.1.0", "graphql-tag": "^2.12.6", diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 919aebdda..1a1de3d46 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -1,10 +1,9 @@ import React from 'react'; +import { Providers } from '~/systems/Core'; import { IS_DEVELOPMENT, IS_TEST } from './config'; import { getRoutes } from './routes'; -import { Providers } from '~/systems/Core'; - const ThrowError = React.lazy( () => import('./systems/Error/components/ThrowError') ); diff --git a/packages/app/src/routes.tsx b/packages/app/src/routes.tsx index 83925db5f..ba2a076dd 100644 --- a/packages/app/src/routes.tsx +++ b/packages/app/src/routes.tsx @@ -1,4 +1,9 @@ import { Navigate, Route, Routes } from 'react-router-dom'; +import { assetRoutes } from '~/systems/Asset'; +import { PrivateRoute, PublicRoute } from '~/systems/Core'; +import { Pages } from '~/systems/Core/types'; +import { homeRoutes } from '~/systems/Home'; +import { signUpRoutes } from '~/systems/SignUp'; import { IS_CRX, IS_CRX_POPUP } from './config'; import { CRXPrivateRoute, CRXPublicRoute } from './systems/CRX/components'; @@ -8,12 +13,6 @@ import { settingsRoutes } from './systems/Settings'; import { transactionRoutes } from './systems/Transaction/routes'; import { UnlockGuard } from './systems/Unlock'; -import { assetRoutes } from '~/systems/Asset'; -import { PrivateRoute, PublicRoute } from '~/systems/Core'; -import { Pages } from '~/systems/Core/types'; -import { homeRoutes } from '~/systems/Home'; -import { signUpRoutes } from '~/systems/SignUp'; - const walletRoutes = ( <> {homeRoutes} diff --git a/packages/app/src/systems/Account/__mocks__/accounts.tsx b/packages/app/src/systems/Account/__mocks__/accounts.tsx index 32d94b806..a40e0d3c2 100644 --- a/packages/app/src/systems/Account/__mocks__/accounts.tsx +++ b/packages/app/src/systems/Account/__mocks__/accounts.tsx @@ -1,11 +1,10 @@ import { WalletManager } from '@fuel-ts/wallet-manager'; import { Wallet } from 'fuels'; +import { db, Storage } from '~/systems/Core'; import { AccountService } from '../services'; import { IndexedDBStorage } from '../utils'; -import { db, Storage } from '~/systems/Core'; - const wallet1 = Wallet.generate(); const wallet2 = Wallet.generate(); const wallet3 = Wallet.generate(); diff --git a/packages/app/src/systems/Account/components/AccountForm/AccountForm.tsx b/packages/app/src/systems/Account/components/AccountForm/AccountForm.tsx index 49f19fcd0..969664bea 100644 --- a/packages/app/src/systems/Account/components/AccountForm/AccountForm.tsx +++ b/packages/app/src/systems/Account/components/AccountForm/AccountForm.tsx @@ -1,9 +1,8 @@ import { Box, HelperIcon, Input } from '@fuel-ui/react'; +import { ControlledField } from '~/systems/Core'; import type { UseAccountFormReturn } from '../../hooks/useAccountForm'; -import { ControlledField } from '~/systems/Core'; - export type AccountFormProps = { isLoading?: boolean; form: UseAccountFormReturn; diff --git a/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.stories.tsx b/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.stories.tsx index 37dd51cce..513c2af79 100644 --- a/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.stories.tsx +++ b/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.stories.tsx @@ -1,10 +1,9 @@ import { Box } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; import { AccountInfo } from './AccountInfo'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; - export default { component: AccountInfo, title: 'DApp/Components/AccountInfo', diff --git a/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.test.tsx b/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.test.tsx index 8e21612c6..3f682d930 100644 --- a/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.test.tsx +++ b/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.test.tsx @@ -1,10 +1,9 @@ import { render, screen, testA11y, waitFor } from '@fuel-ui/test-utils'; - -import { AccountInfo } from './AccountInfo'; - import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; import { shortAddress, TestWrapper } from '~/systems/Core'; +import { AccountInfo } from './AccountInfo'; + const PROPS = { account: MOCK_ACCOUNTS[0], headerText: 'Connect to', diff --git a/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.tsx b/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.tsx index affd6f762..267b46903 100644 --- a/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.tsx +++ b/packages/app/src/systems/Account/components/AccountInfo/AccountInfo.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { Card } from '@fuel-ui/react'; import type { Account } from '@fuel-wallet/types'; +import { AccountItem } from '~/systems/Account'; import { AccountInfoLoader } from './AccountInfoLoader'; -import { AccountItem } from '~/systems/Account'; - export type AccountInfoProps = { headerText: string; account?: Account; diff --git a/packages/app/src/systems/Account/components/AccountInfo/AccountInfoLoader.tsx b/packages/app/src/systems/Account/components/AccountInfo/AccountInfoLoader.tsx index 0690f0bcd..1b0e269ae 100644 --- a/packages/app/src/systems/Account/components/AccountInfo/AccountInfoLoader.tsx +++ b/packages/app/src/systems/Account/components/AccountInfo/AccountInfoLoader.tsx @@ -1,6 +1,5 @@ import type { ContentLoaderProps } from '@fuel-ui/react'; import { Card, ContentLoader } from '@fuel-ui/react'; - import { AccountItemLoader } from '~/systems/Account/components/AccountItem/AccountItemLoader'; export const AccountInfoLoader = (props: ContentLoaderProps) => ( diff --git a/packages/app/src/systems/Account/components/AccountItem/AccountItem.test.tsx b/packages/app/src/systems/Account/components/AccountItem/AccountItem.test.tsx index cfc0a2af9..d708b1418 100644 --- a/packages/app/src/systems/Account/components/AccountItem/AccountItem.test.tsx +++ b/packages/app/src/systems/Account/components/AccountItem/AccountItem.test.tsx @@ -1,11 +1,10 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; +import { shortAddress } from '~/systems/Core'; import { MOCK_ACCOUNTS } from '../../__mocks__'; import { AccountItem } from './AccountItem'; -import { shortAddress } from '~/systems/Core'; - const ACCOUNT = MOCK_ACCOUNTS[0]; const SHORT_ADDRESS = shortAddress(ACCOUNT.address); diff --git a/packages/app/src/systems/Account/components/AccountItem/AccountItem.tsx b/packages/app/src/systems/Account/components/AccountItem/AccountItem.tsx index 3d5e1c6db..1f1999b7f 100644 --- a/packages/app/src/systems/Account/components/AccountItem/AccountItem.tsx +++ b/packages/app/src/systems/Account/components/AccountItem/AccountItem.tsx @@ -12,11 +12,10 @@ import { } from '@fuel-ui/react'; import type { Account } from '@fuel-wallet/types'; import type { FC } from 'react'; +import { FuelAddress } from '~/systems/Account'; import { AccountItemLoader } from './AccountItemLoader'; -import { FuelAddress } from '~/systems/Account'; - export type AccountItemProps = { css?: ThemeUtilsCSS; account: Account; diff --git a/packages/app/src/systems/Account/components/AccountList/AccountList.test.tsx b/packages/app/src/systems/Account/components/AccountList/AccountList.test.tsx index 2afda448d..c293b8e68 100644 --- a/packages/app/src/systems/Account/components/AccountList/AccountList.test.tsx +++ b/packages/app/src/systems/Account/components/AccountList/AccountList.test.tsx @@ -1,11 +1,10 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; +import { store } from '~/store'; import { MOCK_ACCOUNTS } from '../../__mocks__'; import { AccountList } from './AccountList'; -import { store } from '~/store'; - describe('AccountList', () => { it('a11y', async () => { await testA11y( diff --git a/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.test.tsx b/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.test.tsx index 87f4ccd50..3b43cb75c 100644 --- a/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.test.tsx +++ b/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.test.tsx @@ -1,14 +1,13 @@ import { screen, testA11y } from '@fuel-ui/test-utils'; import { fireEvent } from '@storybook/testing-library'; import { act } from 'react-dom/test-utils'; +import { shortAddress, TestWrapper } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__/utils'; import { MOCK_ACCOUNTS } from '../../__mocks__'; import { BalanceWidget } from './BalanceWidget'; -import { shortAddress, TestWrapper } from '~/systems/Core'; -import { renderWithProvider } from '~/systems/Core/__tests__/utils'; - const ACCOUNT = { ...MOCK_ACCOUNTS[0], balance: '4999989994', diff --git a/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.tsx b/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.tsx index 24b69dd8f..3a3281576 100644 --- a/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.tsx +++ b/packages/app/src/systems/Account/components/BalanceWidget/BalanceWidget.tsx @@ -2,15 +2,14 @@ import { cssObj } from '@fuel-ui/css'; import { Avatar, Box, Button, Heading, Icon, Text } from '@fuel-ui/react'; import type { Account } from '@fuel-wallet/types'; import type { ReactNode } from 'react'; +import { FuelAddress } from '~/systems/Account'; +import type { Maybe } from '~/systems/Core'; +import { AmountVisibility, VisibilityButton } from '~/systems/Core'; import { useAccounts } from '../../hooks'; import { BalanceWidgetLoader } from './BalanceWidgetLoader'; -import { FuelAddress } from '~/systems/Account'; -import type { Maybe } from '~/systems/Core'; -import { AmountVisibility, VisibilityButton } from '~/systems/Core'; - type BalanceWidgetWrapperProps = { top: ReactNode; bottom: ReactNode; diff --git a/packages/app/src/systems/Account/components/EthAddress/EthAddress.tsx b/packages/app/src/systems/Account/components/EthAddress/EthAddress.tsx index 370632a79..204b6a99b 100644 --- a/packages/app/src/systems/Account/components/EthAddress/EthAddress.tsx +++ b/packages/app/src/systems/Account/components/EthAddress/EthAddress.tsx @@ -2,7 +2,6 @@ import type { ThemeUtilsCSS } from '@fuel-ui/css'; import { cssObj } from '@fuel-ui/css'; import { Copyable, Box, Text, Tooltip } from '@fuel-ui/react'; import { bn } from 'fuels'; - import { isValidEthAddress, shortAddress } from '~/systems/Core'; export type EthAddressProps = { diff --git a/packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx b/packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx index f5aa1c24d..1b6f72bd8 100644 --- a/packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx +++ b/packages/app/src/systems/Account/components/FuelAddress/FuelAddress.tsx @@ -2,7 +2,6 @@ import type { ThemeUtilsCSS } from '@fuel-ui/css'; import { cssObj } from '@fuel-ui/css'; import { Box, Copyable, Text, Tooltip } from '@fuel-ui/react'; import { Address, isB256, isBech32 } from 'fuels'; - import { shortAddress } from '~/systems/Core'; export type AddressProps = { diff --git a/packages/app/src/systems/Account/components/ImportAccountForm/ImportAccountForm.tsx b/packages/app/src/systems/Account/components/ImportAccountForm/ImportAccountForm.tsx index 0348bd143..835ecbc5b 100644 --- a/packages/app/src/systems/Account/components/ImportAccountForm/ImportAccountForm.tsx +++ b/packages/app/src/systems/Account/components/ImportAccountForm/ImportAccountForm.tsx @@ -1,9 +1,8 @@ import { Box, HelperIcon, Input } from '@fuel-ui/react'; +import { ControlledField } from '~/systems/Core'; import type { UseImportAccountFormReturn } from '../../hooks/useImportAccountForm'; -import { ControlledField } from '~/systems/Core'; - export type ImportAccountFormProps = { isLoading?: boolean; form: UseImportAccountFormReturn; diff --git a/packages/app/src/systems/Account/events.tsx b/packages/app/src/systems/Account/events.tsx index 8b9af6e30..50868a1bd 100644 --- a/packages/app/src/systems/Account/events.tsx +++ b/packages/app/src/systems/Account/events.tsx @@ -1,5 +1,4 @@ import type { Account } from '@fuel-wallet/types'; - import type { Store } from '~/store'; import { Services } from '~/store'; diff --git a/packages/app/src/systems/Account/hooks/useAccountForm.ts b/packages/app/src/systems/Account/hooks/useAccountForm.ts index 9585cb4bc..eaa7dc243 100644 --- a/packages/app/src/systems/Account/hooks/useAccountForm.ts +++ b/packages/app/src/systems/Account/hooks/useAccountForm.ts @@ -1,14 +1,12 @@ -/* eslint-disable @typescript-eslint/no-unused-expressions */ import type { Account } from '@fuel-wallet/types'; import { yupResolver } from '@hookform/resolvers/yup'; import { useEffect } from 'react'; import { useForm } from 'react-hook-form'; import * as yup from 'yup'; +import type { Maybe } from '~/systems/Core'; import { useAccountFormName } from './useAccountFormName'; -import type { Maybe } from '~/systems/Core'; - export type AccountFormValues = { name: string; }; diff --git a/packages/app/src/systems/Account/hooks/useAccounts.tsx b/packages/app/src/systems/Account/hooks/useAccounts.tsx index 1900f1602..3f44035d4 100644 --- a/packages/app/src/systems/Account/hooks/useAccounts.tsx +++ b/packages/app/src/systems/Account/hooks/useAccounts.tsx @@ -1,13 +1,12 @@ import type { Asset } from '@fuel-wallet/types'; import { bn } from 'fuels'; import { useEffect, useRef } from 'react'; - -import type { AccountsMachineState } from '../machines'; - import { store, Services } from '~/store'; import { useAssets } from '~/systems/Asset'; import { useOverlay } from '~/systems/Overlay'; +import type { AccountsMachineState } from '../machines'; + enum AccountStatus { idle = 'idle', loading = 'loading', diff --git a/packages/app/src/systems/Account/hooks/useEditAccount.tsx b/packages/app/src/systems/Account/hooks/useEditAccount.tsx index c03545b40..cb0706e2c 100644 --- a/packages/app/src/systems/Account/hooks/useEditAccount.tsx +++ b/packages/app/src/systems/Account/hooks/useEditAccount.tsx @@ -1,11 +1,10 @@ import { useMachine, useSelector } from '@xstate/react'; +import type { AccountInputs } from '~/systems/Account'; +import { useOverlay } from '~/systems/Overlay'; import type { EditAccountMachineState } from '../machines'; import { editAccountMachine } from '../machines'; -import type { AccountInputs } from '~/systems/Account'; -import { useOverlay } from '~/systems/Overlay'; - const selectors = { account: (state: EditAccountMachineState) => state.context?.account, isLoading: (state: EditAccountMachineState) => state.hasTag('loading'), diff --git a/packages/app/src/systems/Account/hooks/useExportAccount.tsx b/packages/app/src/systems/Account/hooks/useExportAccount.tsx index cbb580717..b308c3751 100644 --- a/packages/app/src/systems/Account/hooks/useExportAccount.tsx +++ b/packages/app/src/systems/Account/hooks/useExportAccount.tsx @@ -1,5 +1,4 @@ import { useMachine, useSelector } from '@xstate/react'; - import type { ExportAccountMachineState } from '~/systems/Account'; import { exportAccountMachine } from '~/systems/Account'; import { useOverlay } from '~/systems/Overlay'; diff --git a/packages/app/src/systems/Account/hooks/useImportAccount.tsx b/packages/app/src/systems/Account/hooks/useImportAccount.tsx index 3e71b668c..028e74ba8 100644 --- a/packages/app/src/systems/Account/hooks/useImportAccount.tsx +++ b/packages/app/src/systems/Account/hooks/useImportAccount.tsx @@ -1,10 +1,9 @@ import { useMachine, useSelector } from '@xstate/react'; +import type { AccountInputs } from '~/systems/Account'; import type { ImportAccountMachineState } from '../machines'; import { importAccountMachine } from '../machines'; -import type { AccountInputs } from '~/systems/Account'; - const selectors = { isLoading: (state: ImportAccountMachineState) => state.hasTag('loading'), }; diff --git a/packages/app/src/systems/Account/hooks/useImportAccountForm.ts b/packages/app/src/systems/Account/hooks/useImportAccountForm.ts index 34ea35a42..e11962a33 100644 --- a/packages/app/src/systems/Account/hooks/useImportAccountForm.ts +++ b/packages/app/src/systems/Account/hooks/useImportAccountForm.ts @@ -3,11 +3,10 @@ import { yupResolver } from '@hookform/resolvers/yup'; import { isB256 } from 'fuels'; import { useForm } from 'react-hook-form'; import * as yup from 'yup'; +import type { Maybe } from '~/systems/Core'; import { useAccountFormName } from './useAccountFormName'; -import type { Maybe } from '~/systems/Core'; - export type ImportAccountFormValues = { privateKey: string; name: string; diff --git a/packages/app/src/systems/Account/machines/accountsMachine.test.ts b/packages/app/src/systems/Account/machines/accountsMachine.test.ts index 193bb0a67..4cb5e06fc 100644 --- a/packages/app/src/systems/Account/machines/accountsMachine.test.ts +++ b/packages/app/src/systems/Account/machines/accountsMachine.test.ts @@ -1,5 +1,7 @@ import { bn } from 'fuels'; import { interpret } from 'xstate'; +import { db, Storage } from '~/systems/Core'; +import { expectStateMatch } from '~/systems/Core/__tests__/utils'; import { MOCK_ACCOUNTS, createMockAccount } from '../__mocks__'; import { AccountService } from '../services'; @@ -10,9 +12,6 @@ import type { } from './accountsMachine'; import { accountsMachine } from './accountsMachine'; -import { db, Storage } from '~/systems/Core'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; - const MOCK_ACCOUNT = { ...MOCK_ACCOUNTS[0], balance: bn(0), diff --git a/packages/app/src/systems/Account/machines/accountsMachine.tsx b/packages/app/src/systems/Account/machines/accountsMachine.tsx index 07f27b7d9..cd3d4ad04 100644 --- a/packages/app/src/systems/Account/machines/accountsMachine.tsx +++ b/packages/app/src/systems/Account/machines/accountsMachine.tsx @@ -1,16 +1,15 @@ import type { Account } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import type { AccountInputs } from '../services/account'; -import { AccountService } from '../services/account'; - import { IS_LOGGED_KEY } from '~/config'; import { store } from '~/store'; import type { Maybe } from '~/systems/Core'; import { CoreService, FetchMachine, Storage } from '~/systems/Core'; import { NetworkService } from '~/systems/Network'; +import { AccountService } from '../services/account'; +import type { AccountInputs } from '../services/account'; + type MachineContext = { accounts?: Account[]; account?: Maybe; diff --git a/packages/app/src/systems/Account/machines/addAccountMachine.test.ts b/packages/app/src/systems/Account/machines/addAccountMachine.test.ts index 0485257f3..237315d32 100644 --- a/packages/app/src/systems/Account/machines/addAccountMachine.test.ts +++ b/packages/app/src/systems/Account/machines/addAccountMachine.test.ts @@ -1,12 +1,11 @@ import { interpret } from 'xstate'; +import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; import { AccountService } from '../services'; import type { AddAccountMachineService } from './addAccountMachine'; import { addAccountMachine } from './addAccountMachine'; -import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; - const machine = addAccountMachine.withContext({}).withConfig({ actions: { notifyUpdateAccounts() {}, diff --git a/packages/app/src/systems/Account/machines/addAccountMachine.tsx b/packages/app/src/systems/Account/machines/addAccountMachine.tsx index 736377eae..bdc9c959e 100644 --- a/packages/app/src/systems/Account/machines/addAccountMachine.tsx +++ b/packages/app/src/systems/Account/machines/addAccountMachine.tsx @@ -2,13 +2,12 @@ import { toast } from '@fuel-ui/react'; import type { Account } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { createMachine } from 'xstate'; - -import { AccountService } from '../services/account'; - import { store } from '~/store'; import { FetchMachine } from '~/systems/Core'; import { VaultService } from '~/systems/Vault'; +import { AccountService } from '../services/account'; + type MachineContext = { accountName?: string; }; diff --git a/packages/app/src/systems/Account/machines/editAccountMachine.test.ts b/packages/app/src/systems/Account/machines/editAccountMachine.test.ts index a36a2b3aa..6b2990bf4 100644 --- a/packages/app/src/systems/Account/machines/editAccountMachine.test.ts +++ b/packages/app/src/systems/Account/machines/editAccountMachine.test.ts @@ -1,5 +1,6 @@ import { bn } from 'fuels'; import { interpret } from 'xstate'; +import { expectStateMatch } from '~/systems/Core/__tests__/utils'; import { MOCK_ACCOUNTS } from '../__mocks__'; import { AccountService } from '../services'; @@ -10,8 +11,6 @@ import type { } from './editAccountMachine'; import { editAccountMachine } from './editAccountMachine'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; - const MOCK_ACCOUNT = { ...MOCK_ACCOUNTS[0], balance: bn(0), diff --git a/packages/app/src/systems/Account/machines/editAccountMachine.tsx b/packages/app/src/systems/Account/machines/editAccountMachine.tsx index fa32590cd..6a50d17f2 100644 --- a/packages/app/src/systems/Account/machines/editAccountMachine.tsx +++ b/packages/app/src/systems/Account/machines/editAccountMachine.tsx @@ -1,14 +1,13 @@ import type { Account } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import type { AccountInputs } from '../services/account'; -import { AccountService } from '../services/account'; - import { store } from '~/store'; import type { Maybe } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core'; +import { AccountService } from '../services/account'; +import type { AccountInputs } from '../services/account'; + type MachineContext = { account?: Maybe; /** diff --git a/packages/app/src/systems/Account/machines/exportAccountMachine.test.tsx b/packages/app/src/systems/Account/machines/exportAccountMachine.test.tsx index 562decf39..6e8c99cff 100644 --- a/packages/app/src/systems/Account/machines/exportAccountMachine.test.tsx +++ b/packages/app/src/systems/Account/machines/exportAccountMachine.test.tsx @@ -1,10 +1,9 @@ import { interpret } from 'xstate'; +import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; import type { ExportAccountMachineService } from './exportAccountMachine'; import { exportAccountMachine } from './exportAccountMachine'; -import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; - describe('exportAccountMachine', () => { let service: ExportAccountMachineService; let state: ReturnType; diff --git a/packages/app/src/systems/Account/machines/exportAccountMachine.tsx b/packages/app/src/systems/Account/machines/exportAccountMachine.tsx index 309507e0b..40b0263fa 100644 --- a/packages/app/src/systems/Account/machines/exportAccountMachine.tsx +++ b/packages/app/src/systems/Account/machines/exportAccountMachine.tsx @@ -1,15 +1,14 @@ import type { Account } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import type { AccountInputs } from '../services/account'; -import { AccountService } from '../services/account'; - import type { Maybe } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core'; import type { VaultInputs } from '~/systems/Vault'; import { VaultService } from '~/systems/Vault'; +import { AccountService } from '../services/account'; +import type { AccountInputs } from '../services/account'; + type MachineContext = { account?: Maybe; address?: string; diff --git a/packages/app/src/systems/Account/machines/importAccountMachine.test.ts b/packages/app/src/systems/Account/machines/importAccountMachine.test.ts index 7cd7c10d2..37074c920 100644 --- a/packages/app/src/systems/Account/machines/importAccountMachine.test.ts +++ b/packages/app/src/systems/Account/machines/importAccountMachine.test.ts @@ -1,13 +1,12 @@ import { toast } from '@fuel-ui/react'; import { interpret } from 'xstate'; +import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; import { AccountService } from '../services'; import type { ImportAccountMachineService } from './importAccountMachine'; import { importAccountMachine } from './importAccountMachine'; -import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; - const machine = importAccountMachine.withContext({}).withConfig({ actions: { notifyUpdateAccounts() {}, diff --git a/packages/app/src/systems/Account/machines/importAccountMachine.tsx b/packages/app/src/systems/Account/machines/importAccountMachine.tsx index f8fbd1714..2bd2bc1d4 100644 --- a/packages/app/src/systems/Account/machines/importAccountMachine.tsx +++ b/packages/app/src/systems/Account/machines/importAccountMachine.tsx @@ -3,14 +3,13 @@ import type { Account } from '@fuel-wallet/types'; import { Wallet } from 'fuels'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { createMachine } from 'xstate'; - -import type { AccountInputs } from '../services/account'; -import { AccountService } from '../services/account'; - import { store } from '~/store'; import { FetchMachine } from '~/systems/Core'; import { VaultService } from '~/systems/Vault'; +import { AccountService } from '../services/account'; +import type { AccountInputs } from '../services/account'; + type MachineServices = { importAccount: { data: Account; diff --git a/packages/app/src/systems/Account/pages/Accounts/Accounts.stories.tsx b/packages/app/src/systems/Account/pages/Accounts/Accounts.stories.tsx index 843471d16..3baa9d03a 100644 --- a/packages/app/src/systems/Account/pages/Accounts/Accounts.stories.tsx +++ b/packages/app/src/systems/Account/pages/Accounts/Accounts.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; +import { store } from '~/store'; +import { Layout } from '~/systems/Core'; import { AccountService, MOCK_ACCOUNTS, useAccounts } from '../..'; import { Accounts } from './Accounts'; -import { store } from '~/store'; -import { Layout } from '~/systems/Core'; - export default { component: Accounts, title: 'Account/Pages/Accounts', diff --git a/packages/app/src/systems/Account/pages/Accounts/Accounts.tsx b/packages/app/src/systems/Account/pages/Accounts/Accounts.tsx index 8ec004d53..202d9472f 100644 --- a/packages/app/src/systems/Account/pages/Accounts/Accounts.tsx +++ b/packages/app/src/systems/Account/pages/Accounts/Accounts.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Dialog, Icon } from '@fuel-ui/react'; +import { coreStyles } from '~/systems/Core/styles'; +import { OverlayDialogTopbar } from '~/systems/Overlay'; import { AccountList } from '../../components'; import { useAccounts, useAddAccount } from '../../hooks'; -import { coreStyles } from '~/systems/Core/styles'; -import { OverlayDialogTopbar } from '~/systems/Overlay'; - export const Accounts = () => { const { accounts, canHideAccounts, hasHiddenAccounts, isLoading, handlers } = useAccounts(); diff --git a/packages/app/src/systems/Account/pages/EditAccount/EditAccount.stories.tsx b/packages/app/src/systems/Account/pages/EditAccount/EditAccount.stories.tsx index 3b2e342f7..c14c51981 100644 --- a/packages/app/src/systems/Account/pages/EditAccount/EditAccount.stories.tsx +++ b/packages/app/src/systems/Account/pages/EditAccount/EditAccount.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; +import { store } from '~/store'; +import { Layout } from '~/systems/Core'; import { AccountService, MOCK_ACCOUNTS, useAccounts } from '../..'; import { EditAccount } from './EditAccount'; -import { store } from '~/store'; -import { Layout } from '~/systems/Core'; - export default { component: EditAccount, title: 'Account/Pages/3. EditAccount', diff --git a/packages/app/src/systems/Account/pages/EditAccount/EditAccount.tsx b/packages/app/src/systems/Account/pages/EditAccount/EditAccount.tsx index 809df99f6..a9a93a2ab 100644 --- a/packages/app/src/systems/Account/pages/EditAccount/EditAccount.tsx +++ b/packages/app/src/systems/Account/pages/EditAccount/EditAccount.tsx @@ -1,13 +1,12 @@ import { Box, Button, Dialog, Focus, Icon } from '@fuel-ui/react'; +import { styles } from '~/systems/Core'; +import { OverlayDialogTopbar } from '~/systems/Overlay'; import { AccountForm } from '../../components'; import { useAccounts, useEditAccount } from '../../hooks'; import { useAccountForm } from '../../hooks/useAccountForm'; import type { AccountFormValues } from '../../hooks/useAccountForm'; -import { styles } from '~/systems/Core'; -import { OverlayDialogTopbar } from '~/systems/Overlay'; - export const EditAccount = () => { const { accounts, handlers: accountsHandlers } = useAccounts(); const { account, handlers, isLoading } = useEditAccount(); diff --git a/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.stories.tsx b/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.stories.tsx index 13a2cb1d9..8a9a02b6c 100644 --- a/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.stories.tsx +++ b/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button, Text } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; +import { store } from '~/store'; +import { Layout } from '~/systems/Core'; import { createMockAccount, useAccounts } from '../..'; import { ExportAccount } from './ExportAccount'; -import { store } from '~/store'; -import { Layout } from '~/systems/Core'; - export default { component: ExportAccount, title: 'Account/Pages/ExportAccount', diff --git a/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.tsx b/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.tsx index 44da3580b..2ca246731 100644 --- a/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.tsx +++ b/packages/app/src/systems/Account/pages/ExportAccount/ExportAccount.tsx @@ -1,14 +1,13 @@ import { cssObj } from '@fuel-ui/css'; import { Card, Copyable, Dialog, Text, Box, Alert } from '@fuel-ui/react'; +import { styles as coreStyles } from '~/systems/Core'; +import { OverlayDialogTopbar } from '~/systems/Overlay'; +import { UnlockCard } from '~/systems/Unlock'; import { AccountItem } from '../../components'; import { useAccounts } from '../../hooks'; import { useExportAccount } from '../../hooks/useExportAccount'; -import { styles as coreStyles } from '~/systems/Core'; -import { OverlayDialogTopbar } from '~/systems/Overlay'; -import { UnlockCard } from '~/systems/Unlock'; - export const ExportAccount = () => { const { handlers: accountsHandlers } = useAccounts(); const { account, exportedKey, handlers, error, isUnlockOpened, isLoading } = diff --git a/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.stories.tsx b/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.stories.tsx index 92d4a7e59..cda6886fe 100644 --- a/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.stories.tsx +++ b/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; +import { store } from '~/store'; +import { Layout } from '~/systems/Core'; import { useAccounts } from '../..'; import { ImportAccount } from './ImportAccount'; -import { store } from '~/store'; -import { Layout } from '~/systems/Core'; - export default { component: ImportAccount, title: 'Account/Pages/ImportAccount', diff --git a/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.tsx b/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.tsx index 07ea27458..3c772a1b4 100644 --- a/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.tsx +++ b/packages/app/src/systems/Account/pages/ImportAccount/ImportAccount.tsx @@ -1,13 +1,12 @@ import { Box, Button, Dialog, Icon } from '@fuel-ui/react'; +import { styles } from '~/systems/Core'; +import { OverlayDialogTopbar } from '~/systems/Overlay'; import { ImportAccountForm } from '../../components/ImportAccountForm'; import { useAccounts, useImportAccount } from '../../hooks'; import { useImportAccountForm } from '../../hooks/useImportAccountForm'; import type { ImportAccountFormValues } from '../../hooks/useImportAccountForm'; -import { styles } from '~/systems/Core'; -import { OverlayDialogTopbar } from '~/systems/Overlay'; - export const ImportAccount = () => { const { accounts, handlers: accountsHandlers } = useAccounts(); const { handlers, isLoading } = useImportAccount(); diff --git a/packages/app/src/systems/Account/pages/Logout/Logout.stories.tsx b/packages/app/src/systems/Account/pages/Logout/Logout.stories.tsx index b55a41167..0a00aebc7 100644 --- a/packages/app/src/systems/Account/pages/Logout/Logout.stories.tsx +++ b/packages/app/src/systems/Account/pages/Logout/Logout.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; +import { store } from '~/store'; +import { Layout } from '~/systems/Core'; import { AccountService, MOCK_ACCOUNTS, useAccounts } from '../..'; import { Logout } from './Logout'; -import { store } from '~/store'; -import { Layout } from '~/systems/Core'; - export default { component: Logout, title: 'Account/Pages/Logout', diff --git a/packages/app/src/systems/Account/pages/Logout/Logout.tsx b/packages/app/src/systems/Account/pages/Logout/Logout.tsx index 471b7bd64..84d24a110 100644 --- a/packages/app/src/systems/Account/pages/Logout/Logout.tsx +++ b/packages/app/src/systems/Account/pages/Logout/Logout.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Card, Dialog, Icon, Text } from '@fuel-ui/react'; - -import { useAccounts } from '../../hooks'; - import { styles as rootStyles } from '~/systems/Core'; import { OverlayDialogTopbar } from '~/systems/Overlay'; +import { useAccounts } from '../../hooks'; + export const Logout = () => { const { isLoading, handlers } = useAccounts(); diff --git a/packages/app/src/systems/Account/services/account.test.ts b/packages/app/src/systems/Account/services/account.test.ts index 5ffaa987f..02dbbd899 100644 --- a/packages/app/src/systems/Account/services/account.test.ts +++ b/packages/app/src/systems/Account/services/account.test.ts @@ -1,12 +1,11 @@ import { bn, BaseAssetId } from 'fuels'; +import { mockServer } from '~/mocks/server'; +import { mockBalancesOnGraphQL } from '~/systems/Asset/__mocks__/assets'; import { MOCK_ACCOUNTS } from '../__mocks__'; import { AccountService } from './account'; -import { mockServer } from '~/mocks/server'; -import { mockBalancesOnGraphQL } from '~/systems/Asset/__mocks__/assets'; - const MOCK_ACCOUNT = MOCK_ACCOUNTS[0]; const MOCK_BALANCES = [ { diff --git a/packages/app/src/systems/Account/services/account.ts b/packages/app/src/systems/Account/services/account.ts index cb992de08..980514945 100644 --- a/packages/app/src/systems/Account/services/account.ts +++ b/packages/app/src/systems/Account/services/account.ts @@ -1,7 +1,5 @@ -/* eslint-disable consistent-return */ import type { Account } from '@fuel-wallet/types'; import { Address, bn, Provider } from 'fuels'; - import { isEth } from '~/systems/Asset/utils/asset'; import type { Maybe } from '~/systems/Core/types'; import { db } from '~/systems/Core/utils/database'; diff --git a/packages/app/src/systems/Account/utils/storage.tsx b/packages/app/src/systems/Account/utils/storage.tsx index 7871d0df8..d3843c57c 100644 --- a/packages/app/src/systems/Account/utils/storage.tsx +++ b/packages/app/src/systems/Account/utils/storage.tsx @@ -1,5 +1,4 @@ import type { StorageAbstract } from '@fuel-ts/wallet-manager'; - import { db } from '~/systems/Core/utils/database'; export class IndexedDBStorage implements StorageAbstract { diff --git a/packages/app/src/systems/Asset/components/AssetForm/AssetForm.tsx b/packages/app/src/systems/Asset/components/AssetForm/AssetForm.tsx index 162880f7e..5db10953c 100644 --- a/packages/app/src/systems/Asset/components/AssetForm/AssetForm.tsx +++ b/packages/app/src/systems/Asset/components/AssetForm/AssetForm.tsx @@ -1,9 +1,8 @@ import { Input, Box } from '@fuel-ui/react'; +import { ControlledField } from '~/systems/Core'; import type { UseAssetFormReturn } from '../../hooks/useAssetForm'; -import { ControlledField } from '~/systems/Core'; - export type AssetFormProps = { form: UseAssetFormReturn; isEditing: boolean; diff --git a/packages/app/src/systems/Asset/components/AssetItem/AssetItem.test.tsx b/packages/app/src/systems/Asset/components/AssetItem/AssetItem.test.tsx index 20a66f149..93f69d1fe 100644 --- a/packages/app/src/systems/Asset/components/AssetItem/AssetItem.test.tsx +++ b/packages/app/src/systems/Asset/components/AssetItem/AssetItem.test.tsx @@ -1,11 +1,10 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; import { MOCK_ASSETS } from '../../__mocks__/assets'; import { AssetItem } from './AssetItem'; -import { TestWrapper } from '~/systems/Core'; - describe('AssetItem', () => { it('a11y', async () => { await testA11y(, { diff --git a/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx b/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx index c4f5c294c..38215d957 100644 --- a/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx +++ b/packages/app/src/systems/Asset/components/AssetItem/AssetItem.tsx @@ -15,14 +15,13 @@ import type { AssetAmount } from '@fuel-wallet/types'; import { bn } from 'fuels'; import type { FC } from 'react'; import { useNavigate } from 'react-router-dom'; +import { AmountVisibility, Pages, shortAddress } from '~/systems/Core'; +import { useBalanceVisibility } from '~/systems/Core/hooks/useVisibility'; import { AssetRemoveDialog } from '../AssetRemoveDialog'; import { AssetItemLoader } from './AssetItemLoader'; -import { AmountVisibility, Pages, shortAddress } from '~/systems/Core'; -import { useBalanceVisibility } from '~/systems/Core/hooks/useVisibility'; - export type AssetItemProps = { asset: AssetAmount; showActions?: boolean; diff --git a/packages/app/src/systems/Asset/components/AssetList/AssetList.test.tsx b/packages/app/src/systems/Asset/components/AssetList/AssetList.test.tsx index 414975aaf..413ad3ef9 100644 --- a/packages/app/src/systems/Asset/components/AssetList/AssetList.test.tsx +++ b/packages/app/src/systems/Asset/components/AssetList/AssetList.test.tsx @@ -1,12 +1,11 @@ import { screen, testA11y } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { MOCK_ASSETS } from '../../__mocks__/assets'; import { AssetList } from './AssetList'; -import { TestWrapper } from '~/systems/Core'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - describe('AssetList', () => { it('a11y', async () => { await testA11y(, { diff --git a/packages/app/src/systems/Asset/components/AssetList/AssetListEmpty.tsx b/packages/app/src/systems/Asset/components/AssetList/AssetListEmpty.tsx index 011c5194d..ab7c54d06 100644 --- a/packages/app/src/systems/Asset/components/AssetList/AssetListEmpty.tsx +++ b/packages/app/src/systems/Asset/components/AssetList/AssetListEmpty.tsx @@ -1,6 +1,5 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Card, Heading, Icon, Text } from '@fuel-ui/react'; - import { useOpenFaucet } from '~/systems/Faucet'; export type AssetListEmptyProps = { diff --git a/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.test.tsx b/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.test.tsx index 96c4e40dd..384a80245 100644 --- a/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.test.tsx +++ b/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.test.tsx @@ -1,12 +1,11 @@ import { act, fireEvent, render, screen } from '@fuel-ui/test-utils'; import { useState } from 'react'; +import { TestWrapper } from '~/systems/Core'; import { MOCK_ASSETS_AMOUNTS } from '../../__mocks__/assets'; import { AssetSelect } from './AssetSelect'; -import { TestWrapper } from '~/systems/Core'; - const onSelect = jest.fn(); type ContentProps = { diff --git a/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx b/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx index c2eda66dd..17211339d 100644 --- a/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx +++ b/packages/app/src/systems/Asset/components/AssetSelect/AssetSelect.tsx @@ -13,7 +13,6 @@ import { import type { AssetAmount } from '@fuel-wallet/types'; import { bn } from 'fuels'; import { useState } from 'react'; - import type { Maybe } from '~/systems/Core'; import { shortAddress, formatAmount } from '~/systems/Core'; diff --git a/packages/app/src/systems/Asset/components/AssetsAmount/AssetsAmount.tsx b/packages/app/src/systems/Asset/components/AssetsAmount/AssetsAmount.tsx index 9b244eb41..6755f3f1a 100644 --- a/packages/app/src/systems/Asset/components/AssetsAmount/AssetsAmount.tsx +++ b/packages/app/src/systems/Asset/components/AssetsAmount/AssetsAmount.tsx @@ -3,13 +3,12 @@ import { Avatar, Box, Copyable, Grid, Text } from '@fuel-ui/react'; import type { AssetAmount } from '@fuel-wallet/types'; import { bn } from 'fuels'; import type { FC } from 'react'; +import { shortAddress } from '~/systems/Core'; +import type { GroupedError } from '~/systems/Transaction'; import { AssetsAmountLoader } from './AssetsAmountLoader'; import { styles } from './styles'; -import { shortAddress } from '~/systems/Core'; -import type { GroupedError } from '~/systems/Transaction'; - export type AssetsAmountProps = { amounts: AssetAmount[]; title?: string; diff --git a/packages/app/src/systems/Asset/events.tsx b/packages/app/src/systems/Asset/events.tsx index 966c8fdef..9b16eac61 100644 --- a/packages/app/src/systems/Asset/events.tsx +++ b/packages/app/src/systems/Asset/events.tsx @@ -1,10 +1,9 @@ import type { StoreClass } from '@fuels/react-xstore'; - -import type { AssetInputs } from './services'; - import type { StoreMachines } from '~/store'; import { Services } from '~/store'; +import type { AssetInputs } from './services'; + export function assetEvents(store: StoreClass) { return { addAsset(input: AssetInputs['addAsset']) { diff --git a/packages/app/src/systems/Asset/hooks/useAsset.tsx b/packages/app/src/systems/Asset/hooks/useAsset.tsx index f4a6cf70c..9831bb80d 100644 --- a/packages/app/src/systems/Asset/hooks/useAsset.tsx +++ b/packages/app/src/systems/Asset/hooks/useAsset.tsx @@ -1,7 +1,7 @@ -import type { AssetsMachineState } from '../machines'; - import { Services, store } from '~/store'; +import type { AssetsMachineState } from '../machines'; + const selectors = { asset(assetId: string) { return (state: AssetsMachineState) => { diff --git a/packages/app/src/systems/Asset/hooks/useAssetForm.tsx b/packages/app/src/systems/Asset/hooks/useAssetForm.tsx index cbd568677..f8bf37416 100644 --- a/packages/app/src/systems/Asset/hooks/useAssetForm.tsx +++ b/packages/app/src/systems/Asset/hooks/useAssetForm.tsx @@ -1,11 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unused-expressions */ + import { yupResolver } from '@hookform/resolvers/yup'; import { isB256 } from 'fuels'; import { useEffect } from 'react'; import { useForm } from 'react-hook-form'; import * as yup from 'yup'; - import type { Maybe } from '~/systems/Core'; export type AssetFormValues = { @@ -22,7 +21,6 @@ function isValidId(id: any) { function isValidUrl(url: any) { if (url === '') return true; try { - // eslint-disable-next-line no-new new URL(url); } catch (e) { return false; diff --git a/packages/app/src/systems/Asset/hooks/useAssets.tsx b/packages/app/src/systems/Asset/hooks/useAssets.tsx index 3e2c915f6..ebe3e1260 100644 --- a/packages/app/src/systems/Asset/hooks/useAssets.tsx +++ b/packages/app/src/systems/Asset/hooks/useAssets.tsx @@ -1,10 +1,9 @@ import { useNavigate } from 'react-router-dom'; - -import type { AssetsMachineState } from '../machines'; - import { Services, store } from '~/store'; import { Pages } from '~/systems/Core'; +import type { AssetsMachineState } from '../machines'; + const selectors = { assets(state: AssetsMachineState) { return state.context.assets || []; diff --git a/packages/app/src/systems/Asset/machines/assetsMachine.test.tsx b/packages/app/src/systems/Asset/machines/assetsMachine.test.tsx index 6f8c3a0fc..b1a77ee73 100644 --- a/packages/app/src/systems/Asset/machines/assetsMachine.test.tsx +++ b/packages/app/src/systems/Asset/machines/assetsMachine.test.tsx @@ -1,12 +1,11 @@ import { interpret } from 'xstate'; +import { expectStateMatch } from '~/systems/Core/__tests__/utils'; import { MOCK_CUSTOM_ASSET } from '../__mocks__/assets'; import type { AssetsMachineService } from './assetsMachine'; import { assetsMachine } from './assetsMachine'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; - const machine = assetsMachine.withContext({}).withConfig({ actions: { navigateBack() {}, diff --git a/packages/app/src/systems/Asset/machines/assetsMachine.tsx b/packages/app/src/systems/Asset/machines/assetsMachine.tsx index 0cb6875a4..a79ab318f 100644 --- a/packages/app/src/systems/Asset/machines/assetsMachine.tsx +++ b/packages/app/src/systems/Asset/machines/assetsMachine.tsx @@ -3,12 +3,11 @@ import type { Asset } from '@fuel-wallet/types'; import { AssetList } from 'asset-list'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; +import { FetchMachine } from '~/systems/Core'; import type { AssetInputs } from '../services'; import { AssetService } from '../services'; -import { FetchMachine } from '~/systems/Core'; - export enum AssetsStatus { loading = 'loading', isEmpty = 'isEmpty', diff --git a/packages/app/src/systems/Asset/pages/Assets/Assets.tsx b/packages/app/src/systems/Asset/pages/Assets/Assets.tsx index 3f6be1e1d..104000cd0 100644 --- a/packages/app/src/systems/Asset/pages/Assets/Assets.tsx +++ b/packages/app/src/systems/Asset/pages/Assets/Assets.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Icon, Tabs } from '@fuel-ui/react'; import { AnimatePresence } from 'framer-motion'; +import { Layout, scrollable } from '~/systems/Core'; import { AssetList } from '../../components'; import { useAssets } from '../../hooks'; -import { Layout, scrollable } from '~/systems/Core'; - export function Assets() { const state = useAssets(); diff --git a/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx b/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx index e9935e918..79852d398 100644 --- a/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx +++ b/packages/app/src/systems/Asset/pages/UpsertAsset/UpsertAsset.tsx @@ -2,6 +2,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 { Layout } from '~/systems/Core'; import { AssetItem } from '../../components'; import { AssetForm } from '../../components/AssetForm'; @@ -9,8 +10,6 @@ import { useAsset, useAssets } from '../../hooks'; import type { AssetFormValues } from '../../hooks/useAssetForm'; import { useAssetForm } from '../../hooks/useAssetForm'; -import { Layout } from '~/systems/Core'; - export function UpsertAsset() { const navigate = useNavigate(); const params = useParams<{ id: string }>(); diff --git a/packages/app/src/systems/Asset/services/assets.ts b/packages/app/src/systems/Asset/services/assets.ts index cdb564d3b..53515bff1 100644 --- a/packages/app/src/systems/Asset/services/assets.ts +++ b/packages/app/src/systems/Asset/services/assets.ts @@ -1,6 +1,5 @@ import type { Asset } from '@fuel-wallet/types'; import { isB256 } from 'fuels'; - import { db } from '~/systems/Core/utils/database'; import { getUniqueString } from '~/systems/Core/utils/string'; diff --git a/packages/app/src/systems/CRX/background/services/BackgroundService.ts b/packages/app/src/systems/CRX/background/services/BackgroundService.ts index 2e892fa2d..3abffe562 100644 --- a/packages/app/src/systems/CRX/background/services/BackgroundService.ts +++ b/packages/app/src/systems/CRX/background/services/BackgroundService.ts @@ -12,11 +12,6 @@ import type { JSONRPCServerMiddlewareNext, } from 'json-rpc-2.0'; import { JSONRPCServer } from 'json-rpc-2.0'; - -import type { CommunicationProtocol } from './CommunicationProtocol'; -import { PopUpService } from './PopUpService'; -import type { MessageInputs } from './types'; - import { APP_VERSION } from '~/config'; import { AccountService } from '~/systems/Account/services'; import { AssetService } from '~/systems/Asset/services'; @@ -25,6 +20,10 @@ import { ConnectionService } from '~/systems/DApp/services'; import { NetworkService } from '~/systems/Network/services'; import { AbiService } from '~/systems/Settings/services'; +import type { CommunicationProtocol } from './CommunicationProtocol'; +import { PopUpService } from './PopUpService'; +import type { MessageInputs } from './types'; + type EventOrigin = { origin: string; title: string; diff --git a/packages/app/src/systems/CRX/background/services/CommunicationProtocol.ts b/packages/app/src/systems/CRX/background/services/CommunicationProtocol.ts index 82b560c9a..479e39a79 100644 --- a/packages/app/src/systems/CRX/background/services/CommunicationProtocol.ts +++ b/packages/app/src/systems/CRX/background/services/CommunicationProtocol.ts @@ -58,7 +58,6 @@ export class CommunicationProtocol extends BaseConnection { }; getPortId = (port: chrome.runtime.Port) => { - // eslint-disable-next-line no-restricted-syntax for (const [key, value] of this.ports.entries()) { if (value === port) { return key; diff --git a/packages/app/src/systems/CRX/background/services/DatabaseEvents.ts b/packages/app/src/systems/CRX/background/services/DatabaseEvents.ts index f8fd4f5fd..4bee8ba85 100644 --- a/packages/app/src/systems/CRX/background/services/DatabaseEvents.ts +++ b/packages/app/src/systems/CRX/background/services/DatabaseEvents.ts @@ -5,13 +5,12 @@ import type { EventMessageEvents, } from '@fuel-wallet/types'; import { CONTENT_SCRIPT_NAME, MessageTypes } from '@fuel-wallet/types'; +import { AssetService } from '~/systems/Asset/services'; +import { ConnectionService } from '~/systems/DApp/services'; import type { CommunicationProtocol } from './CommunicationProtocol'; import { DatabaseObservable } from './DatabaseObservable'; -import { AssetService } from '~/systems/Asset/services'; -import { ConnectionService } from '~/systems/DApp/services'; - export class DatabaseEvents { readonly databaseObservable: DatabaseObservable< ['networks', 'accounts', 'assets', 'connections'] diff --git a/packages/app/src/systems/CRX/background/services/DatabaseObservable.ts b/packages/app/src/systems/CRX/background/services/DatabaseObservable.ts index 91068b218..adb946cb8 100644 --- a/packages/app/src/systems/CRX/background/services/DatabaseObservable.ts +++ b/packages/app/src/systems/CRX/background/services/DatabaseObservable.ts @@ -3,7 +3,6 @@ import type { DatabaseObservableEvent, } from '@fuel-wallet/types'; import EventEmitter from 'events'; - import { db } from '~/systems/Core/utils/database'; export class DatabaseObservable< diff --git a/packages/app/src/systems/CRX/background/services/PopUpService.ts b/packages/app/src/systems/CRX/background/services/PopUpService.ts index 571f93608..441e55c83 100644 --- a/packages/app/src/systems/CRX/background/services/PopUpService.ts +++ b/packages/app/src/systems/CRX/background/services/PopUpService.ts @@ -4,6 +4,8 @@ import { POPUP_SCRIPT_NAME, MessageTypes } from '@fuel-wallet/types'; import type { ResponseMessage, UIEventMessage } from '@fuel-wallet/types'; import type { JSONRPCRequest } from 'json-rpc-2.0'; import { JSONRPCClient } from 'json-rpc-2.0'; +import { CRXPages } from '~/systems/Core/types'; +import { uniqueId } from '~/systems/Core/utils/string'; import { closePopUp, @@ -15,9 +17,6 @@ import { import type { CommunicationProtocol } from './CommunicationProtocol'; import type { MessageInputs } from './types'; -import { CRXPages } from '~/systems/Core/types'; -import { uniqueId } from '~/systems/Core/utils/string'; - const popups = new Map(); export class PopUpService { diff --git a/packages/app/src/systems/CRX/background/services/VaultService.ts b/packages/app/src/systems/CRX/background/services/VaultService.ts index 2206f6e8c..dc0d5c9fe 100644 --- a/packages/app/src/systems/CRX/background/services/VaultService.ts +++ b/packages/app/src/systems/CRX/background/services/VaultService.ts @@ -3,6 +3,8 @@ import { POPUP_SCRIPT_NAME, VAULT_SCRIPT_NAME, } from '@fuel-wallet/types'; +import { AUTO_LOCK_IN_MINUTES } from '~/config'; +import { VaultServer } from '~/systems/Vault/services/VaultServer'; import { saveSecret, @@ -14,9 +16,6 @@ import { import type { CommunicationProtocol } from './CommunicationProtocol'; -import { AUTO_LOCK_IN_MINUTES } from '~/config'; -import { VaultServer } from '~/systems/Vault/services/VaultServer'; - export class VaultService extends VaultServer { readonly communicationProtocol: CommunicationProtocol; diff --git a/packages/app/src/systems/CRX/components/PrivateRoute.tsx b/packages/app/src/systems/CRX/components/PrivateRoute.tsx index 568c35708..a982adee9 100644 --- a/packages/app/src/systems/CRX/components/PrivateRoute.tsx +++ b/packages/app/src/systems/CRX/components/PrivateRoute.tsx @@ -1,10 +1,9 @@ import { useEffect } from 'react'; +import { PrivateRoute } from '~/systems/Core'; import { welcomeLink } from '../config'; import { openTab } from '../utils'; -import { PrivateRoute } from '~/systems/Core'; - export const OpenWelcome = () => { useEffect(() => { openTab(welcomeLink()); diff --git a/packages/app/src/systems/CRX/scripts/contentScript.ts b/packages/app/src/systems/CRX/scripts/contentScript.ts index 608efe294..79cd7a9e6 100644 --- a/packages/app/src/systems/CRX/scripts/contentScript.ts +++ b/packages/app/src/systems/CRX/scripts/contentScript.ts @@ -1,9 +1,8 @@ import { ContentProxyConnection } from '@fuel-wallet/sdk'; +import { WALLET_NAME } from '~/config'; import fileName from './pageScript?script&module'; -import { WALLET_NAME } from '~/config'; - ContentProxyConnection.start(WALLET_NAME); async function main() { diff --git a/packages/app/src/systems/CRX/scripts/pageScript.ts b/packages/app/src/systems/CRX/scripts/pageScript.ts index 01e8e0477..20f715462 100644 --- a/packages/app/src/systems/CRX/scripts/pageScript.ts +++ b/packages/app/src/systems/CRX/scripts/pageScript.ts @@ -1,5 +1,4 @@ import { createConnector } from '@fuel-wallet/sdk'; - import { WALLET_NAME } from '~/config'; createConnector({ name: WALLET_NAME }); diff --git a/packages/app/src/systems/CRX/utils/popups.ts b/packages/app/src/systems/CRX/utils/popups.ts index 1558227ab..dcbfa9295 100644 --- a/packages/app/src/systems/CRX/utils/popups.ts +++ b/packages/app/src/systems/CRX/utils/popups.ts @@ -1,7 +1,7 @@ -import { getPopUpPosition } from './position'; - import { TAB_BAR_HEIGHT, WALLET_HEIGHT, WALLET_WIDTH } from '~/config'; +import { getPopUpPosition } from './position'; + export type ShowPopUp = { windowId?: number; tabId?: number; diff --git a/packages/app/src/systems/Core/__tests__/utils/mockVault.ts b/packages/app/src/systems/Core/__tests__/utils/mockVault.ts index d7388ec35..068158226 100644 --- a/packages/app/src/systems/Core/__tests__/utils/mockVault.ts +++ b/packages/app/src/systems/Core/__tests__/utils/mockVault.ts @@ -1,9 +1,9 @@ -import { getWordsFromValue } from '../../utils'; -import { MNEMONIC, PASSWORD, PKEY } from '../config'; - import { NetworkService } from '~/systems/Network'; import { SignUpService } from '~/systems/SignUp/services'; +import { getWordsFromValue } from '../../utils'; +import { MNEMONIC, PASSWORD, PKEY } from '../config'; + type MockVaultConfig = { password?: string; }; diff --git a/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.stories.tsx b/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.stories.tsx index 767785ea0..e1ae3d639 100644 --- a/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.stories.tsx +++ b/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.stories.tsx @@ -1,11 +1,10 @@ import { Box } from '@fuel-ui/react'; import type { StoryFn } from '@storybook/react'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; import type { ConnectInfoProps } from './ConnectInfo'; import { ConnectInfo } from './ConnectInfo'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; - export default { component: ConnectInfo, title: 'DApp/Components/ConnectInfo', diff --git a/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.test.tsx b/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.test.tsx index 9a1f837cc..30968913b 100644 --- a/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.test.tsx +++ b/packages/app/src/systems/Core/components/ConnectInfo/ConnectInfo.test.tsx @@ -1,10 +1,9 @@ import { render, screen, testA11y, waitFor } from '@fuel-ui/test-utils'; - -import { ConnectInfo } from './ConnectInfo'; - import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; import { TestWrapper } from '~/systems/Core'; +import { ConnectInfo } from './ConnectInfo'; + const URL = 'fuellabs.github.io/swayswap/'; const PROPS = { diff --git a/packages/app/src/systems/Core/components/Layout/Layout.stories.tsx b/packages/app/src/systems/Core/components/Layout/Layout.stories.tsx index 6c72459a1..eb95224cd 100644 --- a/packages/app/src/systems/Core/components/Layout/Layout.stories.tsx +++ b/packages/app/src/systems/Core/components/Layout/Layout.stories.tsx @@ -1,5 +1,7 @@ import { Button } from '@fuel-ui/react'; import type { Meta } from '@storybook/react'; +import { NetworkService } from '~/systems/Network'; +import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; import { Pages } from '../../types'; @@ -7,9 +9,6 @@ import type { LayoutProps } from './Layout'; import { Layout } from './Layout'; import { TopBarType } from './TopBar'; -import { NetworkService } from '~/systems/Network'; -import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; - export default { component: Layout, title: 'Core/Components/Layout', diff --git a/packages/app/src/systems/Core/components/Layout/Layout.tsx b/packages/app/src/systems/Core/components/Layout/Layout.tsx index 6e92cb702..8f21ed97c 100644 --- a/packages/app/src/systems/Core/components/Layout/Layout.tsx +++ b/packages/app/src/systems/Core/components/Layout/Layout.tsx @@ -5,16 +5,15 @@ import type { FC, ReactNode } from 'react'; import { forwardRef, useRef, useContext, createContext } from 'react'; import { Helmet } from 'react-helmet'; import { useLocation } from 'react-router-dom'; +import { IS_CRX_POPUP, WALLET_HEIGHT, WALLET_WIDTH } from '~/config'; +import { OverlayDialog } from '~/systems/Overlay'; +import { Sidebar } from '~/systems/Sidebar'; import { coreStyles } from '../../styles/core'; import { BottomBar } from './BottomBar'; import { TopBar } from './TopBar'; -import { IS_CRX_POPUP, WALLET_HEIGHT, WALLET_WIDTH } from '~/config'; -import { OverlayDialog } from '~/systems/Overlay'; -import { Sidebar } from '~/systems/Sidebar'; - type Context = { isLoading?: boolean; isHome?: boolean; diff --git a/packages/app/src/systems/Core/components/Layout/TopBar.tsx b/packages/app/src/systems/Core/components/Layout/TopBar.tsx index 73623e691..64ea99d81 100644 --- a/packages/app/src/systems/Core/components/Layout/TopBar.tsx +++ b/packages/app/src/systems/Core/components/Layout/TopBar.tsx @@ -2,9 +2,6 @@ import { cssObj } from '@fuel-ui/css'; import { FuelLogo, Icon, IconButton, Spinner, Text, Box } from '@fuel-ui/react'; import type { ReactNode } from 'react'; import { useNavigate } from 'react-router-dom'; - -import { useLayoutContext } from './Layout'; - /** * Because of some cycle-dependency error here, is not * possible to just import by using ~/systems/Network @@ -13,6 +10,8 @@ import { NetworkDropdown } from '~/systems/Network/components'; import { useNetworks } from '~/systems/Network/hooks'; import { useOverlay } from '~/systems/Overlay'; +import { useLayoutContext } from './Layout'; + export enum TopBarType { internal, external, diff --git a/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.stories.tsx b/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.stories.tsx index 36039ca07..bb3de94ff 100644 --- a/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.stories.tsx +++ b/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.stories.tsx @@ -1,13 +1,12 @@ import { Box } from '@fuel-ui/react'; import { Mnemonic as FuelMnemonic } from 'fuels'; +import { MNEMONIC_SIZE } from '~/config'; import { getWordsFromValue } from '../../utils'; import type { MnemonicProps } from './Mnemonic'; import { Mnemonic } from './Mnemonic'; -import { MNEMONIC_SIZE } from '~/config'; - export default { component: Mnemonic, title: 'Core/Components/Mnemonic', diff --git a/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.test.tsx b/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.test.tsx index dd3423d18..874c67147 100644 --- a/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.test.tsx +++ b/packages/app/src/systems/Core/components/Mnemonic/Mnemonic.test.tsx @@ -1,4 +1,3 @@ -/* eslint-disable no-restricted-syntax */ import { fireEvent, render, screen, testA11y } from '@fuel-ui/test-utils'; import { Mnemonic } from './Mnemonic'; diff --git a/packages/app/src/systems/Core/components/Mnemonic/MnemonicInput.tsx b/packages/app/src/systems/Core/components/Mnemonic/MnemonicInput.tsx index 8ab21cc02..4db092400 100644 --- a/packages/app/src/systems/Core/components/Mnemonic/MnemonicInput.tsx +++ b/packages/app/src/systems/Core/components/Mnemonic/MnemonicInput.tsx @@ -13,7 +13,6 @@ export function MnemonicInput({ }: MnemonicInputProps) { return ( onPaste(ev, index)} onChange={(ev) => onChange(ev.target.value, index)} diff --git a/packages/app/src/systems/Core/components/Providers/Providers.tsx b/packages/app/src/systems/Core/components/Providers/Providers.tsx index 9b4ae1520..898608ea1 100644 --- a/packages/app/src/systems/Core/components/Providers/Providers.tsx +++ b/packages/app/src/systems/Core/components/Providers/Providers.tsx @@ -7,10 +7,9 @@ import { ThemeProvider, } from '@fuel-ui/react'; import type { ReactNode } from 'react'; - import { StoreProvider } from '~/store'; -// eslint-disable-next-line import/no-absolute-path +// eslint-disable-next-line import/no-unresolved import icons from '/icons/sprite.svg'; import { ErrorBoundary } from '~/systems/Error'; diff --git a/packages/app/src/systems/Core/components/TestWrapper/TestWrapper.tsx b/packages/app/src/systems/Core/components/TestWrapper/TestWrapper.tsx index 98b09a7f1..90f0923cc 100644 --- a/packages/app/src/systems/Core/components/TestWrapper/TestWrapper.tsx +++ b/packages/app/src/systems/Core/components/TestWrapper/TestWrapper.tsx @@ -9,7 +9,7 @@ const LocationDisplay = () => { return
{location?.pathname}
; }; -type TestWrapperProps = { +export type TestWrapperProps = { initialEntries?: any[]; children?: ReactNode; }; @@ -26,10 +26,5 @@ export function TestWrapper({ children, initialEntries }: TestWrapperProps) { {content} ); } - return ( - - {children} - - - ); + return {content}; } diff --git a/packages/app/src/systems/Core/hooks/useIsLogged.tsx b/packages/app/src/systems/Core/hooks/useIsLogged.tsx index f29121809..7688dcce2 100644 --- a/packages/app/src/systems/Core/hooks/useIsLogged.tsx +++ b/packages/app/src/systems/Core/hooks/useIsLogged.tsx @@ -1,7 +1,7 @@ -import { Storage } from '../utils'; - import { IS_LOGGED_KEY } from '~/config'; +import { Storage } from '../utils'; + export function useIsLogged() { return !!Storage.getItem(IS_LOGGED_KEY); } diff --git a/packages/app/src/systems/Core/styles/core.ts b/packages/app/src/systems/Core/styles/core.ts index 9a2264042..064e95678 100644 --- a/packages/app/src/systems/Core/styles/core.ts +++ b/packages/app/src/systems/Core/styles/core.ts @@ -1,5 +1,4 @@ import { cssObj } from '@fuel-ui/css'; - import { WALLET_WIDTH, WALLET_HEIGHT } from '~/config'; export const scrollable = ( diff --git a/packages/app/src/systems/Core/utils/database.ts b/packages/app/src/systems/Core/utils/database.ts index 305d41778..8f70bc1a1 100644 --- a/packages/app/src/systems/Core/utils/database.ts +++ b/packages/app/src/systems/Core/utils/database.ts @@ -12,7 +12,6 @@ import type { Table } from 'dexie'; import Dexie from 'dexie'; import 'dexie-observable'; import { bn } from 'fuels'; - import { DATABASE_VERSION } from '~/config'; import type { Transaction } from '~/systems/Transaction/types'; @@ -54,9 +53,8 @@ export class FuelDB extends Dexie { .table('accounts') .toCollection() .modify((account) => { - // eslint-disable-next-line no-param-reassign account.balance = bn(); - // eslint-disable-next-line no-param-reassign + account.balances = []; }); }); diff --git a/packages/app/src/systems/Core/utils/graphql.tsx b/packages/app/src/systems/Core/utils/graphql.tsx index 0a8002c84..096a8fe47 100644 --- a/packages/app/src/systems/Core/utils/graphql.tsx +++ b/packages/app/src/systems/Core/utils/graphql.tsx @@ -1,5 +1,4 @@ import { GraphQLClient } from 'graphql-request'; - import { getSdk } from '~/generated/graphql'; export function getGraphqlClient(providerUrl: string) { diff --git a/packages/app/src/systems/Core/utils/math.ts b/packages/app/src/systems/Core/utils/math.ts index bcb8c512a..7115b8721 100644 --- a/packages/app/src/systems/Core/utils/math.ts +++ b/packages/app/src/systems/Core/utils/math.ts @@ -1,6 +1,5 @@ import type { BNInput } from 'fuels'; import { bn } from 'fuels'; - import { MAX_FRACTION_DIGITS } from '~/config'; export function formatAmount(amount?: BNInput) { diff --git a/packages/app/src/systems/Core/utils/wallet.ts b/packages/app/src/systems/Core/utils/wallet.ts index 209da16ec..3ee1588ce 100644 --- a/packages/app/src/systems/Core/utils/wallet.ts +++ b/packages/app/src/systems/Core/utils/wallet.ts @@ -1,6 +1,5 @@ import type { TransactionRequestLike, TransactionResponse } from 'fuels'; import { transactionRequestify, hashMessage, WalletLocked } from 'fuels'; - import { VaultService } from '~/systems/Vault'; export class WalletLockedCustom extends WalletLocked { diff --git a/packages/app/src/systems/DApp/__mocks__/dapp-provider.ts b/packages/app/src/systems/DApp/__mocks__/dapp-provider.ts index 4e6ed2601..3231b60e5 100644 --- a/packages/app/src/systems/DApp/__mocks__/dapp-provider.ts +++ b/packages/app/src/systems/DApp/__mocks__/dapp-provider.ts @@ -1,5 +1,4 @@ import { Provider } from 'fuels'; - import { VITE_FUEL_PROVIDER_URL } from '~/config'; export const provider = new Provider(VITE_FUEL_PROVIDER_URL); diff --git a/packages/app/src/systems/DApp/__mocks__/dapp-transaction.ts b/packages/app/src/systems/DApp/__mocks__/dapp-transaction.ts index 9a93199f4..9966b43ad 100644 --- a/packages/app/src/systems/DApp/__mocks__/dapp-transaction.ts +++ b/packages/app/src/systems/DApp/__mocks__/dapp-transaction.ts @@ -1,5 +1,4 @@ import { Address, bn, BaseAssetId, Provider, Wallet } from 'fuels'; - import { TxService } from '~/systems/Transaction/services'; export const getMockedTransaction = async ( diff --git a/packages/app/src/systems/DApp/events.ts b/packages/app/src/systems/DApp/events.ts index 17a8561ea..08ec4ced5 100644 --- a/packages/app/src/systems/DApp/events.ts +++ b/packages/app/src/systems/DApp/events.ts @@ -1,3 +1,6 @@ +import { Services } from '~/store'; +import type { Store } from '~/store'; + import type { TxInputs } from '../Transaction/services'; import type { @@ -7,9 +10,6 @@ import type { SignInputs, } from './machines'; -import { Services } from '~/store'; -import type { Store } from '~/store'; - export function requestEvents(store: Store) { return { requestTransaction(input: TxInputs['request']) { diff --git a/packages/app/src/systems/DApp/hooks/useAddAssetRequest.tsx b/packages/app/src/systems/DApp/hooks/useAddAssetRequest.tsx index e22493eb4..463d9b709 100644 --- a/packages/app/src/systems/DApp/hooks/useAddAssetRequest.tsx +++ b/packages/app/src/systems/DApp/hooks/useAddAssetRequest.tsx @@ -1,9 +1,8 @@ import { useSelector } from '@xstate/react'; +import { Services, store } from '~/store'; import type { AddAssetMachineState } from '../machines'; -import { Services, store } from '~/store'; - const selectors = { origin: (state: AddAssetMachineState) => state.context.origin, assets: (state: AddAssetMachineState) => state.context.assets, diff --git a/packages/app/src/systems/DApp/hooks/useAddNetworkRequest.tsx b/packages/app/src/systems/DApp/hooks/useAddNetworkRequest.tsx index 5fc441aa8..1ccaddf03 100644 --- a/packages/app/src/systems/DApp/hooks/useAddNetworkRequest.tsx +++ b/packages/app/src/systems/DApp/hooks/useAddNetworkRequest.tsx @@ -1,9 +1,8 @@ import { useSelector } from '@xstate/react'; +import { Services, store } from '~/store'; import type { AddNetworkRequestMachineState } from '../machines'; -import { Services, store } from '~/store'; - const selectors = { origin: (state: AddNetworkRequestMachineState) => state.context.origin, title: (state: AddNetworkRequestMachineState) => state.context.title, diff --git a/packages/app/src/systems/DApp/hooks/useConnectRequest.tsx b/packages/app/src/systems/DApp/hooks/useConnectRequest.tsx index 58dc49306..9c8ac2385 100644 --- a/packages/app/src/systems/DApp/hooks/useConnectRequest.tsx +++ b/packages/app/src/systems/DApp/hooks/useConnectRequest.tsx @@ -1,11 +1,10 @@ import { useSelector } from '@xstate/react'; import { useEffect, useMemo } from 'react'; - -import type { ConnectRequestState } from '../machines'; - import { Services, store } from '~/store'; import { useAccounts } from '~/systems/Account'; +import type { ConnectRequestState } from '../machines'; + const selectors = { isSelectingAccounts: (state: ConnectRequestState) => { return state.matches('connecting.selectingAccounts'); diff --git a/packages/app/src/systems/DApp/hooks/useSignatureRequest.tsx b/packages/app/src/systems/DApp/hooks/useSignatureRequest.tsx index c8ba7323a..095fc0713 100644 --- a/packages/app/src/systems/DApp/hooks/useSignatureRequest.tsx +++ b/packages/app/src/systems/DApp/hooks/useSignatureRequest.tsx @@ -1,9 +1,8 @@ import { useSelector } from '@xstate/react'; +import { Services, store } from '~/store'; import type { MessageRequestState } from '../machines'; -import { Services, store } from '~/store'; - const selectors = { account: (state: MessageRequestState) => state.context.account, origin: (state: MessageRequestState) => state.context.origin, diff --git a/packages/app/src/systems/DApp/hooks/useTransactionRequest.tsx b/packages/app/src/systems/DApp/hooks/useTransactionRequest.tsx index 2ac02f1b7..163016cf5 100644 --- a/packages/app/src/systems/DApp/hooks/useTransactionRequest.tsx +++ b/packages/app/src/systems/DApp/hooks/useTransactionRequest.tsx @@ -1,15 +1,14 @@ import { useSelector } from '@xstate/react'; import { TransactionStatus } from 'fuels'; import { useCallback } from 'react'; - -import type { TransactionRequestState } from '../machines/transactionRequestMachine'; -import { TxRequestStatus } from '../machines/transactionRequestMachine'; - import { Services, store } from '~/store'; import { useOverlay } from '~/systems/Overlay'; import { getFilteredErrors } from '~/systems/Transaction'; import type { TxInputs } from '~/systems/Transaction/services'; +import { TxRequestStatus } from '../machines/transactionRequestMachine'; +import type { TransactionRequestState } from '../machines/transactionRequestMachine'; + const selectors = { context(state: TransactionRequestState) { return state.context; @@ -36,6 +35,7 @@ const selectors = { return { txApproveError, unlockError, grouped, general, hasGeneral }; }, status(externalLoading?: boolean) { + // eslint-disable-next-line react-hooks/rules-of-hooks return useCallback( (state: TransactionRequestState) => { const isLoading = state.hasTag('loading'); diff --git a/packages/app/src/systems/DApp/machines/addAssetRequestMachine.tsx b/packages/app/src/systems/DApp/machines/addAssetRequestMachine.tsx index d33e682a7..0520ec656 100644 --- a/packages/app/src/systems/DApp/machines/addAssetRequestMachine.tsx +++ b/packages/app/src/systems/DApp/machines/addAssetRequestMachine.tsx @@ -1,7 +1,6 @@ import type { Asset } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import type { AssetInputs } from '~/systems/Asset'; import { AssetService } from '~/systems/Asset'; import { assignErrorMessage, FetchMachine } from '~/systems/Core'; diff --git a/packages/app/src/systems/DApp/machines/addNetworkRequestMachine.tsx b/packages/app/src/systems/DApp/machines/addNetworkRequestMachine.tsx index 0f09787f1..2e2f28622 100644 --- a/packages/app/src/systems/DApp/machines/addNetworkRequestMachine.tsx +++ b/packages/app/src/systems/DApp/machines/addNetworkRequestMachine.tsx @@ -1,7 +1,6 @@ import type { Network } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { assignErrorMessage, FetchMachine } from '~/systems/Core'; import type { NetworkInputs } from '~/systems/Network'; import { NetworkService } from '~/systems/Network'; diff --git a/packages/app/src/systems/DApp/machines/connectRequestMachine.test.ts b/packages/app/src/systems/DApp/machines/connectRequestMachine.test.ts index 1b89ad41e..73f8b448d 100644 --- a/packages/app/src/systems/DApp/machines/connectRequestMachine.test.ts +++ b/packages/app/src/systems/DApp/machines/connectRequestMachine.test.ts @@ -1,11 +1,10 @@ import { interpret } from 'xstate'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; +import { expectStateMatch } from '~/systems/Core/__tests__'; import type { ConnectRequestService } from './connectRequestMachine'; import { connectRequestMachine } from './connectRequestMachine'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; -import { expectStateMatch } from '~/systems/Core/__tests__'; - const totalAccounts = MOCK_ACCOUNTS.filter((acc) => !acc.isHidden).length; describe('connectRequestMachine', () => { diff --git a/packages/app/src/systems/DApp/machines/connectRequestMachine.ts b/packages/app/src/systems/DApp/machines/connectRequestMachine.ts index 0d64f8d25..628bedb14 100644 --- a/packages/app/src/systems/DApp/machines/connectRequestMachine.ts +++ b/packages/app/src/systems/DApp/machines/connectRequestMachine.ts @@ -1,12 +1,11 @@ import type { Connection } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import { ConnectionService } from '../services'; - import type { FetchResponse } from '~/systems/Core'; import { assignErrorMessage, FetchMachine } from '~/systems/Core'; +import { ConnectionService } from '../services'; + type MachineContext = { origin?: string; title?: string; diff --git a/packages/app/src/systems/DApp/machines/messageRequestMachine.test.ts b/packages/app/src/systems/DApp/machines/messageRequestMachine.test.ts index dfc0f9b86..1c2db700f 100644 --- a/packages/app/src/systems/DApp/machines/messageRequestMachine.test.ts +++ b/packages/app/src/systems/DApp/machines/messageRequestMachine.test.ts @@ -1,12 +1,11 @@ import { hashMessage, Signer } from 'fuels'; import { interpret } from 'xstate'; +import type { MockVaultData } from '~/systems/Core/__tests__'; +import { expectStateMatch, mockVault } from '~/systems/Core/__tests__'; import type { MessageRequestService } from './messageRequestMachine'; import { messageRequestMachine } from './messageRequestMachine'; -import type { MockVaultData } from '~/systems/Core/__tests__'; -import { expectStateMatch, mockVault } from '~/systems/Core/__tests__'; - describe('messageRequestMachine', () => { let vaultData: MockVaultData; let service: MessageRequestService; diff --git a/packages/app/src/systems/DApp/machines/messageRequestMachine.tsx b/packages/app/src/systems/DApp/machines/messageRequestMachine.tsx index e30c4bc17..9442010e2 100644 --- a/packages/app/src/systems/DApp/machines/messageRequestMachine.tsx +++ b/packages/app/src/systems/DApp/machines/messageRequestMachine.tsx @@ -1,7 +1,6 @@ import type { Account } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { AccountService } from '~/systems/Account'; import { assignErrorMessage, FetchMachine } from '~/systems/Core'; import type { VaultInputs } from '~/systems/Vault'; diff --git a/packages/app/src/systems/DApp/machines/transactionRequestMachine.test.ts b/packages/app/src/systems/DApp/machines/transactionRequestMachine.test.ts index b7b9ffd13..a993f9451 100644 --- a/packages/app/src/systems/DApp/machines/transactionRequestMachine.test.ts +++ b/packages/app/src/systems/DApp/machines/transactionRequestMachine.test.ts @@ -1,15 +1,14 @@ import type { TransactionRequest } from 'fuels'; import { interpret } from 'xstate'; +import { expectStateMatch } from '~/systems/Core/__tests__/utils'; +import type { MockVaultData } from '~/systems/Core/__tests__/utils/mockVault'; +import { mockVault } from '~/systems/Core/__tests__/utils/mockVault'; import { getMockedTransaction } from '../__mocks__/dapp-transaction'; import type { TransactionRequestService } from './transactionRequestMachine'; import { transactionRequestMachine } from './transactionRequestMachine'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; -import type { MockVaultData } from '~/systems/Core/__tests__/utils/mockVault'; -import { mockVault } from '~/systems/Core/__tests__/utils/mockVault'; - describe('txApproveMachine', () => { let service: TransactionRequestService; let transactionRequest: TransactionRequest; diff --git a/packages/app/src/systems/DApp/machines/transactionRequestMachine.tsx b/packages/app/src/systems/DApp/machines/transactionRequestMachine.tsx index 1c1148d2e..e2cb8d4d7 100644 --- a/packages/app/src/systems/DApp/machines/transactionRequestMachine.tsx +++ b/packages/app/src/systems/DApp/machines/transactionRequestMachine.tsx @@ -8,7 +8,6 @@ import type { } from 'fuels'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { AccountService } from '~/systems/Account'; import { assignErrorMessage, delay, FetchMachine } from '~/systems/Core'; import type { NetworkInputs } from '~/systems/Network'; diff --git a/packages/app/src/systems/DApp/methods.ts b/packages/app/src/systems/DApp/methods.ts index 0b547210f..d98e203ab 100644 --- a/packages/app/src/systems/DApp/methods.ts +++ b/packages/app/src/systems/DApp/methods.ts @@ -1,6 +1,5 @@ import { ExtensionPageConnection } from '@fuel-wallet/sdk'; import { transactionRequestify } from 'fuels'; - import { IS_CRX } from '~/config'; import { Services, store } from '~/store'; import type { MessageInputs } from '~/systems/CRX/background/services/types'; diff --git a/packages/app/src/systems/DApp/pages/AddAssetRequest/AddAssetRequest.tsx b/packages/app/src/systems/DApp/pages/AddAssetRequest/AddAssetRequest.tsx index ca711314c..099a2bde0 100644 --- a/packages/app/src/systems/DApp/pages/AddAssetRequest/AddAssetRequest.tsx +++ b/packages/app/src/systems/DApp/pages/AddAssetRequest/AddAssetRequest.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Card } from '@fuel-ui/react'; - -import { useAddAssetRequest } from '../../hooks'; - import { useAccounts } from '~/systems/Account'; import { AssetItem } from '~/systems/Asset'; import { Layout, ConnectInfo, shortAddress } from '~/systems/Core'; +import { useAddAssetRequest } from '../../hooks'; + export function AddAssetRequest() { const { handlers, assets, title, favIconUrl, origin } = useAddAssetRequest(); const { account } = useAccounts(); diff --git a/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.stories.tsx b/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.stories.tsx index 8478bc57b..155f4e444 100644 --- a/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.stories.tsx +++ b/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.stories.tsx @@ -1,10 +1,9 @@ import { Box } from '@fuel-ui/react'; import { useEffect } from 'react'; +import { createMockAccount } from '~/systems/Account'; import { AddNetworkRequest } from './AddNetworkRequest'; -import { createMockAccount } from '~/systems/Account'; - let passwordToUnlock: string; async function loader() { const { password } = await createMockAccount(); @@ -25,7 +24,6 @@ export default { export const Usage = () => { useEffect(() => { - // eslint-disable-next-line no-alert alert(`use this password to unlock: ${passwordToUnlock}`); }, []); diff --git a/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.tsx b/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.tsx index 4f0e600e1..eeceac245 100644 --- a/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.tsx +++ b/packages/app/src/systems/DApp/pages/AddNetworkRequest/AddNetworkRequest.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Button } from '@fuel-ui/react'; - -import { useAddNetworkRequest } from '../../hooks'; - import { useAccounts } from '~/systems/Account'; import { Layout, ConnectInfo } from '~/systems/Core'; import { NetworkReviewCard } from '~/systems/Network'; +import { useAddNetworkRequest } from '../../hooks'; + export function AddNetworkRequest() { const { handlers, title, favIconUrl, origin, network } = useAddNetworkRequest(); diff --git a/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.stories.tsx b/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.stories.tsx index 6b6c97f10..c115a3cd7 100644 --- a/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.stories.tsx +++ b/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.stories.tsx @@ -1,10 +1,9 @@ import type { Meta, Story } from '@storybook/react'; - -import { ConnectionRequest } from './ConnectionRequest'; - import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; import { mockBalancesOnGraphQL } from '~/systems/Asset/__mocks__/assets'; +import { ConnectionRequest } from './ConnectionRequest'; + export default { component: ConnectionRequest, title: 'DApp/Pages/ConnectionRequest', diff --git a/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.tsx b/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.tsx index 95f4ee8de..f0d63d381 100644 --- a/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.tsx +++ b/packages/app/src/systems/DApp/pages/ConnectionRequest/ConnectionRequest.tsx @@ -1,10 +1,7 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Card, CardList, Box, Link, Text } from '@fuel-ui/react'; import { AnimatePresence, motion } from 'framer-motion'; - -import { useConnectRequest } from '../../hooks/useConnectRequest'; - -import { AccountItem } from '~/systems/Account'; +import { AccountItem } from '~/systems/Account/components/AccountItem'; import { animations, Layout, @@ -13,6 +10,8 @@ import { coreStyles, } from '~/systems/Core'; +import { useConnectRequest } from '../../hooks/useConnectRequest'; + export const PERMISSION_LIST = [ 'View your account address', 'Request transaction approval', diff --git a/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.stories.tsx b/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.stories.tsx index 605385a4f..438e2de62 100644 --- a/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.stories.tsx +++ b/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.stories.tsx @@ -1,10 +1,9 @@ import { Box } from '@fuel-ui/react'; import { useEffect } from 'react'; +import { createMockAccount } from '~/systems/Account'; import { SignatureRequest } from './SignatureRequest'; -import { createMockAccount } from '~/systems/Account'; - let passwordToUnlock: string; async function loader() { const { password } = await createMockAccount(); @@ -25,7 +24,6 @@ export default { export const Usage = () => { useEffect(() => { - // eslint-disable-next-line no-alert alert(`use this password to unlock: ${passwordToUnlock}`); }, []); diff --git a/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.tsx b/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.tsx index cf0bb0346..f368ed2dd 100644 --- a/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.tsx +++ b/packages/app/src/systems/DApp/pages/SignatureRequest/SignatureRequest.tsx @@ -1,10 +1,9 @@ import { Box, Button, Card, HelperIcon, Text } from '@fuel-ui/react'; - -import { useSignatureRequest } from '../../hooks'; - import { AccountInfo } from '~/systems/Account'; import { Layout, ConnectInfo } from '~/systems/Core'; +import { useSignatureRequest } from '../../hooks'; + export function SignatureRequest() { const { handlers, account, origin, message, isLoading, title, favIconUrl } = useSignatureRequest(); diff --git a/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.stories.tsx b/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.stories.tsx index 85f952875..380e8a861 100644 --- a/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.stories.tsx +++ b/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.stories.tsx @@ -3,14 +3,13 @@ import { Box } from '@fuel-ui/react'; import type { Meta, Story } from '@storybook/react'; import { Wallet } from 'fuels'; import { useEffect } from 'react'; +import { createMockAccount } from '~/systems/Account'; +import { NetworkService } from '~/systems/Network'; import { getMockedTransaction } from '../../__mocks__/dapp-transaction'; import { TransactionRequest } from './TransactionRequest'; -import { createMockAccount } from '~/systems/Account'; -import { NetworkService } from '~/systems/Network'; - async function loader() { const { account, password } = await createMockAccount(); await NetworkService.clearNetworks(); @@ -40,7 +39,6 @@ export default { export const Usage: Story = (_args, { loaded }) => { useEffect(() => { - // eslint-disable-next-line no-alert alert(`use this password to unlock: ${loaded.password}`); }, []); diff --git a/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.tsx b/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.tsx index c466720a4..5057254fc 100644 --- a/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.tsx +++ b/packages/app/src/systems/DApp/pages/TransactionRequest/TransactionRequest.tsx @@ -1,13 +1,12 @@ import { cssObj } from '@fuel-ui/css'; import { Alert, Button } from '@fuel-ui/react'; - -import { useTransactionRequest } from '../../hooks/useTransactionRequest'; - import { useAssets } from '~/systems/Asset'; import { Layout, ConnectInfo } from '~/systems/Core'; import { TopBarType } from '~/systems/Core/components/Layout/TopBar'; import { TxContent, TxHeader } from '~/systems/Transaction'; +import { useTransactionRequest } from '../../hooks/useTransactionRequest'; + export function TransactionRequest() { const txRequest = useTransactionRequest({ isOriginRequired: true }); const { handlers, status, isSendingTx, txResult, ...ctx } = txRequest; diff --git a/packages/app/src/systems/DApp/services/connection.test.ts b/packages/app/src/systems/DApp/services/connection.test.ts index 8a281e8d2..6c0f6b389 100644 --- a/packages/app/src/systems/DApp/services/connection.test.ts +++ b/packages/app/src/systems/DApp/services/connection.test.ts @@ -1,9 +1,8 @@ import type { Connection } from '@fuel-wallet/types'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; import { ConnectionService } from './connection'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; - const MOCK_APP: Connection = { origin: 'foo.com', accounts: ['fuel0x2c8e117bcfba11c76d7db2d43464b1d2093474ef'], diff --git a/packages/app/src/systems/DApp/services/connection.ts b/packages/app/src/systems/DApp/services/connection.ts index 5f567c6f3..f35196b3f 100644 --- a/packages/app/src/systems/DApp/services/connection.ts +++ b/packages/app/src/systems/DApp/services/connection.ts @@ -1,5 +1,4 @@ import type { Account, Connection } from '@fuel-wallet/types'; - import type { Maybe } from '~/systems/Core/types'; import { db } from '~/systems/Core/utils/database'; diff --git a/packages/app/src/systems/Error/machines/reportErrorMachine.tsx b/packages/app/src/systems/Error/machines/reportErrorMachine.tsx index 0aba92bdc..da39cd8bd 100644 --- a/packages/app/src/systems/Error/machines/reportErrorMachine.tsx +++ b/packages/app/src/systems/Error/machines/reportErrorMachine.tsx @@ -1,11 +1,10 @@ import type { FuelWalletError } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; +import { FetchMachine } from '~/systems/Core/machines/fetchMachine'; import { ReportErrorService } from '../services'; -import { FetchMachine } from '~/systems/Core/machines/fetchMachine'; - export type ErrorMachineContext = { error?: string; hasErrors?: boolean; diff --git a/packages/app/src/systems/Error/pages/ReportErrors/ReportErrors.tsx b/packages/app/src/systems/Error/pages/ReportErrors/ReportErrors.tsx index 785e95099..64f0fc8d2 100644 --- a/packages/app/src/systems/Error/pages/ReportErrors/ReportErrors.tsx +++ b/packages/app/src/systems/Error/pages/ReportErrors/ReportErrors.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { FuelLogo, Heading, Button, Box, Text, Input } from '@fuel-ui/react'; - -import { useReportError } from '../../hooks'; - import { WALLET_WIDTH, WALLET_HEIGHT } from '~/config'; import { coreStyles } from '~/systems/Core/styles'; +import { useReportError } from '../../hooks'; + export function ReportErrors() { const { handlers, isLoadingSendOnce, errors } = useReportError(); diff --git a/packages/app/src/systems/Error/services/ReportErrorService.tsx b/packages/app/src/systems/Error/services/ReportErrorService.tsx index e2c598082..600d26e1b 100644 --- a/packages/app/src/systems/Error/services/ReportErrorService.tsx +++ b/packages/app/src/systems/Error/services/ReportErrorService.tsx @@ -1,11 +1,10 @@ import type { FuelWalletError } from '@fuel-wallet/types'; import * as Sentry from '@sentry/browser'; - -import { createError, parseFuelError } from '../utils'; - import { APP_VERSION, VITE_SENTRY_DSN } from '~/config'; import { db } from '~/systems/Core/utils/database'; +import { createError, parseFuelError } from '../utils'; + export class ReportErrorService { static async reportErrors() { const errors = await this.getErrors(); diff --git a/packages/app/src/systems/Faucet/components/FaucetDialog.test.tsx b/packages/app/src/systems/Faucet/components/FaucetDialog.test.tsx index 717df92fd..a550a82da 100644 --- a/packages/app/src/systems/Faucet/components/FaucetDialog.test.tsx +++ b/packages/app/src/systems/Faucet/components/FaucetDialog.test.tsx @@ -1,9 +1,8 @@ import { render, screen } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core/components/TestWrapper'; import { FaucetDialog } from './FaucetDialog'; -import { TestWrapper } from '~/systems/Core/components/TestWrapper'; - describe('FaucetDialog', () => { it('should show Faucet button', async () => { render(, { wrapper: TestWrapper }); diff --git a/packages/app/src/systems/Faucet/components/FaucetDialog.tsx b/packages/app/src/systems/Faucet/components/FaucetDialog.tsx index 6503f6e5b..fe6f2e8c1 100644 --- a/packages/app/src/systems/Faucet/components/FaucetDialog.tsx +++ b/packages/app/src/systems/Faucet/components/FaucetDialog.tsx @@ -2,12 +2,11 @@ import { Box, Button, Dialog, Icon, Spinner, Text } from '@fuel-ui/react'; import { useEffect } from 'react'; import ReCAPTCHA from 'react-google-recaptcha'; import { useNavigate } from 'react-router-dom'; - -import { useCaptcha, useFaucetDialog } from '../hooks'; - import { useAccounts } from '~/systems/Account'; import { Pages } from '~/systems/Core'; +import { useCaptcha, useFaucetDialog } from '../hooks'; + export function FaucetDialog() { const navigate = useNavigate(); const { handlers, isLoading } = useFaucetDialog(); diff --git a/packages/app/src/systems/Faucet/hooks/useCaptcha.ts b/packages/app/src/systems/Faucet/hooks/useCaptcha.ts index a74b17d9b..d29411147 100644 --- a/packages/app/src/systems/Faucet/hooks/useCaptcha.ts +++ b/packages/app/src/systems/Faucet/hooks/useCaptcha.ts @@ -1,12 +1,11 @@ import { useFuelTheme } from '@fuel-ui/react'; import { useMachine, useSelector } from '@xstate/react'; import type { ReCAPTCHAProps } from 'react-google-recaptcha'; +import type { Maybe } from '~/systems/Core'; import type { CaptchaMachineState } from '../machines'; import { captchaMachine } from '../machines'; -import type { Maybe } from '~/systems/Core'; - const selectors = { key: (state: CaptchaMachineState) => state.context.key, captcha: (state: CaptchaMachineState) => state.context.captcha, diff --git a/packages/app/src/systems/Faucet/hooks/useFaucetDialog.tsx b/packages/app/src/systems/Faucet/hooks/useFaucetDialog.tsx index 23cb26295..13024ecb2 100644 --- a/packages/app/src/systems/Faucet/hooks/useFaucetDialog.tsx +++ b/packages/app/src/systems/Faucet/hooks/useFaucetDialog.tsx @@ -1,11 +1,10 @@ import { useMachine, useSelector } from '@xstate/react'; import { useNavigate } from 'react-router-dom'; +import { Pages } from '~/systems/Core'; import type { FaucetMachineState, StartFaucetData } from '../machines'; import { faucetMachine } from '../machines'; -import { Pages } from '~/systems/Core'; - const selectors = { isLoading: (state: FaucetMachineState) => state.matches('fauceting'), }; diff --git a/packages/app/src/systems/Faucet/hooks/useOpenFaucet.ts b/packages/app/src/systems/Faucet/hooks/useOpenFaucet.ts index 84c64d001..3bf020b15 100644 --- a/packages/app/src/systems/Faucet/hooks/useOpenFaucet.ts +++ b/packages/app/src/systems/Faucet/hooks/useOpenFaucet.ts @@ -1,6 +1,5 @@ import { useCallback } from 'react'; import { useNavigate } from 'react-router-dom'; - import { IS_CRX, VITE_FUEL_FAUCET_URL } from '~/config'; import { useAccounts } from '~/systems/Account'; import { openTab } from '~/systems/CRX/utils'; diff --git a/packages/app/src/systems/Faucet/machines/captchaMachine.tsx b/packages/app/src/systems/Faucet/machines/captchaMachine.tsx index 07b972ab3..6f0485e6a 100644 --- a/packages/app/src/systems/Faucet/machines/captchaMachine.tsx +++ b/packages/app/src/systems/Faucet/machines/captchaMachine.tsx @@ -1,6 +1,5 @@ import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { VITE_FAUCET_RECAPTCHA_KEY } from '~/config'; import type { Maybe } from '~/systems/Core'; diff --git a/packages/app/src/systems/Faucet/machines/faucetMachine.test.ts b/packages/app/src/systems/Faucet/machines/faucetMachine.test.ts index f003a1420..e7e26e15e 100644 --- a/packages/app/src/systems/Faucet/machines/faucetMachine.test.ts +++ b/packages/app/src/systems/Faucet/machines/faucetMachine.test.ts @@ -1,12 +1,11 @@ import { rest } from 'msw'; import { interpret } from 'xstate'; import { waitFor } from 'xstate/lib/waitFor'; +import { mockServer } from '~/mocks/server'; import type { FaucetMachineService, FaucetMachineState } from './faucetMachine'; import { faucetMachine } from './faucetMachine'; -import { mockServer } from '~/mocks/server'; - mockServer([ rest.post('http://localhost:4041/dispense', (req, res, ctx) => { return res( diff --git a/packages/app/src/systems/Faucet/machines/faucetMachine.tsx b/packages/app/src/systems/Faucet/machines/faucetMachine.tsx index 1d818c251..50b645b8c 100644 --- a/packages/app/src/systems/Faucet/machines/faucetMachine.tsx +++ b/packages/app/src/systems/Faucet/machines/faucetMachine.tsx @@ -2,7 +2,6 @@ import { toast } from '@fuel-ui/react'; import fetch from 'cross-fetch'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { VITE_FUEL_FAUCET_URL } from '~/config'; import { store } from '~/store'; import type { Maybe } from '~/systems/Core'; diff --git a/packages/app/src/systems/Home/components/HomeActions/HomeActions.test.tsx b/packages/app/src/systems/Home/components/HomeActions/HomeActions.test.tsx index d2f019f43..60c1ca171 100644 --- a/packages/app/src/systems/Home/components/HomeActions/HomeActions.test.tsx +++ b/packages/app/src/systems/Home/components/HomeActions/HomeActions.test.tsx @@ -1,9 +1,8 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; import { HomeActions } from './HomeActions'; -import { TestWrapper } from '~/systems/Core'; - describe('HomeActions', () => { it('a11y', async () => { await testA11y(, { wrapper: TestWrapper }); diff --git a/packages/app/src/systems/Home/components/HomeActions/HomeActions.tsx b/packages/app/src/systems/Home/components/HomeActions/HomeActions.tsx index 7925275c6..4bba447e3 100644 --- a/packages/app/src/systems/Home/components/HomeActions/HomeActions.tsx +++ b/packages/app/src/systems/Home/components/HomeActions/HomeActions.tsx @@ -1,6 +1,5 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Button, Icon, Tooltip } from '@fuel-ui/react'; - import { useAccounts } from '~/systems/Account'; export type HomeActionsProps = { diff --git a/packages/app/src/systems/Home/components/QRCode/QRCode.test.tsx b/packages/app/src/systems/Home/components/QRCode/QRCode.test.tsx index 9a982d311..3cb7159c6 100644 --- a/packages/app/src/systems/Home/components/QRCode/QRCode.test.tsx +++ b/packages/app/src/systems/Home/components/QRCode/QRCode.test.tsx @@ -1,9 +1,8 @@ import { render, screen } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core/components/TestWrapper'; import { ReceiverQRCode } from './QRCode'; -import { TestWrapper } from '~/systems/Core/components/TestWrapper'; - const TEST_ACCOUNT = 'fuel1auahknz6mjuu0am034mlggh55f0tgp9j7fkzrc6xl48zuy5zv7vqa07n30'; diff --git a/packages/app/src/systems/Home/components/UserAddressCard/UserAddressCard.test.tsx b/packages/app/src/systems/Home/components/UserAddressCard/UserAddressCard.test.tsx index b7bd16705..81e79a8f3 100644 --- a/packages/app/src/systems/Home/components/UserAddressCard/UserAddressCard.test.tsx +++ b/packages/app/src/systems/Home/components/UserAddressCard/UserAddressCard.test.tsx @@ -1,9 +1,8 @@ import { act, render, screen } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; import { UserAddressCard } from '.'; -import { TestWrapper } from '~/systems/Core'; - const TEST_ACCOUNT = 'fuel1auahknz6mjuu0am034mlggh55f0tgp9j7fkzrc6xl48zuy5zv7vqa07n30'; diff --git a/packages/app/src/systems/Home/pages/Home/Home.stories.tsx b/packages/app/src/systems/Home/pages/Home/Home.stories.tsx index 318eae0cf..ef3680c9f 100644 --- a/packages/app/src/systems/Home/pages/Home/Home.stories.tsx +++ b/packages/app/src/systems/Home/pages/Home/Home.stories.tsx @@ -1,11 +1,10 @@ import type { Meta, StoryFn } from '@storybook/react'; - -import { Home } from './Home'; - import { store } from '~/store'; import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; import { mockBalancesOnGraphQL } from '~/systems/Asset/__mocks__/assets'; +import { Home } from './Home'; + export default { component: Home, title: 'Home/Pages/Home', diff --git a/packages/app/src/systems/Home/pages/Home/Home.tsx b/packages/app/src/systems/Home/pages/Home/Home.tsx index 8e7ef4935..9d6c4e073 100644 --- a/packages/app/src/systems/Home/pages/Home/Home.tsx +++ b/packages/app/src/systems/Home/pages/Home/Home.tsx @@ -1,9 +1,6 @@ import { cssObj } from '@fuel-ui/css'; import { Box } from '@fuel-ui/react'; import { useNavigate } from 'react-router-dom'; - -import { AssetsTitle, HomeActions } from '../../components'; - import { VITE_FUEL_PROVIDER_URL } from '~/config'; import { BalanceWidget, useAccounts } from '~/systems/Account'; import { AssetList } from '~/systems/Asset'; @@ -11,6 +8,8 @@ import { Layout, Pages, scrollable } from '~/systems/Core'; import { useBalanceVisibility } from '~/systems/Core/hooks/useVisibility'; import { useNetworks } from '~/systems/Network'; +import { AssetsTitle, HomeActions } from '../../components'; + export function Home() { const { visibility, setVisibility } = useBalanceVisibility(); const { isLoading, account, balanceAssets } = useAccounts(); diff --git a/packages/app/src/systems/Home/pages/Receive/Receive.tsx b/packages/app/src/systems/Home/pages/Receive/Receive.tsx index 953f69321..75c23bae4 100644 --- a/packages/app/src/systems/Home/pages/Receive/Receive.tsx +++ b/packages/app/src/systems/Home/pages/Receive/Receive.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { useNavigate } from 'react-router-dom'; +import { useAccounts } from '~/systems/Account'; +import { Layout, MotionFlex, Pages, animations } from '~/systems/Core'; import { ReceiverQRCode } from '../../components/QRCode'; import { UserAddressCard } from '../../components/UserAddressCard'; -import { useAccounts } from '~/systems/Account'; -import { Layout, MotionFlex, Pages, animations } from '~/systems/Core'; - export function Receive() { const navigate = useNavigate(); const { account } = useAccounts(); diff --git a/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx b/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx index 9c43823e1..f8c9e1720 100644 --- a/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx +++ b/packages/app/src/systems/Network/components/NetworkForm/NetworkForm.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Input, HelperIcon, Spinner, Box } from '@fuel-ui/react'; import { motion } from 'framer-motion'; - -import type { UseNetworkFormReturn } from '../../hooks'; - import { animations, ControlledField } from '~/systems/Core'; import { NetworkReviewCard } from '~/systems/Network'; +import type { UseNetworkFormReturn } from '../../hooks'; + const MotionInput = motion(Input); export type NetworkFormProps = { diff --git a/packages/app/src/systems/Network/components/NetworkItem/NetworkItem.test.tsx b/packages/app/src/systems/Network/components/NetworkItem/NetworkItem.test.tsx index 74ce2e65c..e98f68200 100644 --- a/packages/app/src/systems/Network/components/NetworkItem/NetworkItem.test.tsx +++ b/packages/app/src/systems/Network/components/NetworkItem/NetworkItem.test.tsx @@ -1,13 +1,12 @@ import { CardList } from '@fuel-ui/react'; import { render, screen, testA11y, waitFor } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core/components/TestWrapper'; import { MOCK_NETWORKS } from '../../__mocks__/networks'; import type { NetworkItemProps } from './NetworkItem'; import { NetworkItem } from './NetworkItem'; -import { TestWrapper } from '~/systems/Core/components/TestWrapper'; - const NETWORK = MOCK_NETWORKS[0]; const Content = (props: Partial) => { diff --git a/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx b/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx index 4cb964094..c9f2b7e31 100644 --- a/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx +++ b/packages/app/src/systems/Network/components/NetworkList/NetworkList.test.tsx @@ -1,12 +1,11 @@ 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'; -import { TestWrapper } from '~/systems/Core/components/TestWrapper'; - const NETWORKS = MOCK_NETWORKS.map((i) => ({ ...i, id: uniqueId() })); describe('NetworkList', () => { diff --git a/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx b/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx index a105c0882..5fa700fd6 100644 --- a/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx +++ b/packages/app/src/systems/Network/components/NetworkReviewCard/NetworkReviewCard.tsx @@ -1,7 +1,6 @@ import { cssObj } from '@fuel-ui/css'; import { Card, Text, Button } from '@fuel-ui/react'; import { motion } from 'framer-motion'; - import { animations } from '~/systems/Core'; const MotionCard = motion(Card); diff --git a/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.stories.tsx b/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.stories.tsx index 7a40fe92d..3b577ed6f 100644 --- a/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.stories.tsx +++ b/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.stories.tsx @@ -1,12 +1,11 @@ import { Box } from '@fuel-ui/react'; import type { Network } from '@fuel-wallet/types'; import { useState } from 'react'; +import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; import type { NetworkSelectorProps } from './NetworkSelector'; import { NetworkSelector } from './NetworkSelector'; -import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; - export default { component: NetworkSelector, title: 'Network/Components/NetworkSelector', diff --git a/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.test.tsx b/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.test.tsx index d8348a759..63ef6bff2 100644 --- a/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.test.tsx +++ b/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.test.tsx @@ -1,11 +1,10 @@ import { act, render, screen, testA11y } from '@fuel-ui/test-utils'; import { configure } from '@testing-library/react'; - -import { NetworkSelector } from './NetworkSelector'; - import { TestWrapper } from '~/systems/Core/components/TestWrapper'; import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; +import { NetworkSelector } from './NetworkSelector'; + const SELECTED = MOCK_NETWORKS[0]; const NOT_SELECTED = MOCK_NETWORKS[1]; diff --git a/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.tsx b/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.tsx index bca815c9a..2da4f6396 100644 --- a/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.tsx +++ b/packages/app/src/systems/Network/components/NetworkSelector/NetworkSelector.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-expressions */ import { cssObj } from '@fuel-ui/css'; import { Box, Dropdown } from '@fuel-ui/react'; import type { Network } from '@fuel-wallet/types'; diff --git a/packages/app/src/systems/Network/events.tsx b/packages/app/src/systems/Network/events.tsx index e00e1a8f7..b082f7f61 100644 --- a/packages/app/src/systems/Network/events.tsx +++ b/packages/app/src/systems/Network/events.tsx @@ -1,10 +1,9 @@ import type { Network } from '@fuel-wallet/types'; - -import type { NetworkInputs } from './services'; - import type { Store } from '~/store'; import { Services } from '~/store'; +import type { NetworkInputs } from './services'; + export function networkEvents(store: Store) { return { addNetwork(input: NetworkInputs['addNetwork']) { diff --git a/packages/app/src/systems/Network/hooks/useNetworkForm.ts b/packages/app/src/systems/Network/hooks/useNetworkForm.ts index 231a776d7..873565163 100644 --- a/packages/app/src/systems/Network/hooks/useNetworkForm.ts +++ b/packages/app/src/systems/Network/hooks/useNetworkForm.ts @@ -1,13 +1,11 @@ -/* eslint-disable @typescript-eslint/no-unused-expressions */ import { yupResolver } from '@hookform/resolvers/yup'; import { useEffect } from 'react'; import { useForm } from 'react-hook-form'; import * as yup from 'yup'; +import type { Maybe } from '~/systems/Core'; import { isValidNetworkUrl } from '../utils'; -import type { Maybe } from '~/systems/Core'; - export type NetworkFormValues = { name: string; url: string; diff --git a/packages/app/src/systems/Network/hooks/useNetworks.ts b/packages/app/src/systems/Network/hooks/useNetworks.ts index 2710cb098..52a3ef2e2 100644 --- a/packages/app/src/systems/Network/hooks/useNetworks.ts +++ b/packages/app/src/systems/Network/hooks/useNetworks.ts @@ -1,11 +1,10 @@ import type { Network } from '@fuel-wallet/types'; import { useEffect } from 'react'; - -import type { NetworksMachineState } from '../machines/networksMachine'; - import { store, Services } from '~/store'; import { useOverlay } from '~/systems/Overlay'; +import type { NetworksMachineState } from '../machines/networksMachine'; + const selectors = { networks: (state: NetworksMachineState) => { return state.context?.networks || []; diff --git a/packages/app/src/systems/Network/machines/chainInfoMachine.test.ts b/packages/app/src/systems/Network/machines/chainInfoMachine.test.ts index 737526963..6a68dbda9 100644 --- a/packages/app/src/systems/Network/machines/chainInfoMachine.test.ts +++ b/packages/app/src/systems/Network/machines/chainInfoMachine.test.ts @@ -1,15 +1,14 @@ import { graphql } from 'msw'; import { interpret } from 'xstate'; import { waitFor } from 'xstate/lib/waitFor'; +import { VITE_FUEL_PROVIDER_URL } from '~/config'; +import { mockServer } from '~/mocks/server'; import { MOCK_CHAIN_INFO } from '../__mocks__/chainInfo'; import type { ChainInfoMachineService } from './chainInfoMachine'; import { chainInfoMachine } from './chainInfoMachine'; -import { VITE_FUEL_PROVIDER_URL } from '~/config'; -import { mockServer } from '~/mocks/server'; - mockServer([ graphql.query('getChain', (_req, res, ctx) => { return res(ctx.data(MOCK_CHAIN_INFO)); diff --git a/packages/app/src/systems/Network/machines/chainInfoMachine.ts b/packages/app/src/systems/Network/machines/chainInfoMachine.ts index 3b0f2c035..5b2db70c7 100644 --- a/packages/app/src/systems/Network/machines/chainInfoMachine.ts +++ b/packages/app/src/systems/Network/machines/chainInfoMachine.ts @@ -1,12 +1,11 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ import { ChainInfo } from 'fuels'; import { assign, createMachine, InterpreterFrom, StateFrom } from 'xstate'; - -import { NetworkInputs, NetworkService } from '../services'; - import type { FetchResponse } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core'; +import { NetworkInputs, NetworkService } from '../services'; + type MachineContext = { chainInfo?: ChainInfo; error?: string; diff --git a/packages/app/src/systems/Network/machines/networksMachine.test.ts b/packages/app/src/systems/Network/machines/networksMachine.test.ts index 29991524a..48b8c0565 100644 --- a/packages/app/src/systems/Network/machines/networksMachine.test.ts +++ b/packages/app/src/systems/Network/machines/networksMachine.test.ts @@ -2,6 +2,7 @@ import type { Network } 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'; @@ -9,8 +10,6 @@ import { NetworkService } from '../services'; import type { NetworksMachineService } from './networksMachine'; import { networksMachine } from './networksMachine'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; - const NETWORK = MOCK_NETWORKS[0]; const machine = networksMachine diff --git a/packages/app/src/systems/Network/machines/networksMachine.ts b/packages/app/src/systems/Network/machines/networksMachine.ts index 80510a0aa..3cbddfdb7 100644 --- a/packages/app/src/systems/Network/machines/networksMachine.ts +++ b/packages/app/src/systems/Network/machines/networksMachine.ts @@ -1,13 +1,12 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ import type { Network } from '@fuel-wallet/types'; import { assign, createMachine, InterpreterFrom, StateFrom } from 'xstate'; - -import { NetworkInputs, NetworkService } from '../services'; - import { store } from '~/store'; import type { Maybe, FetchResponse } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core'; +import { NetworkInputs, NetworkService } from '../services'; + type MachineContext = { networks?: Network[]; /** diff --git a/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.stories.tsx b/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.stories.tsx index 5825b0aca..5a845083d 100644 --- a/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.stories.tsx +++ b/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.stories.tsx @@ -1,12 +1,11 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; - -import { AddNetwork } from './AddNetwork'; - import { Layout } from '~/systems/Core'; import { NetworkService, useNetworks } from '~/systems/Network'; import { store } from '~/systems/Store'; +import { AddNetwork } from './AddNetwork'; + export default { component: AddNetwork, title: 'Network/Pages/2. AddNetwork', diff --git a/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx b/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx index 44a54530f..09dc3d059 100644 --- a/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx +++ b/packages/app/src/systems/Network/pages/AddNetwork/AddNetwork.tsx @@ -1,7 +1,6 @@ import { Box, Button, Dialog, Focus, Icon } from '@fuel-ui/react'; import { motion } from 'framer-motion'; import { useEffect } from 'react'; - import { animations, styles } from '~/systems/Core'; import type { NetworkFormValues } from '~/systems/Network'; import { diff --git a/packages/app/src/systems/Network/pages/Networks/Networks.stories.tsx b/packages/app/src/systems/Network/pages/Networks/Networks.stories.tsx index 4d1ee8600..527cdda90 100644 --- a/packages/app/src/systems/Network/pages/Networks/Networks.stories.tsx +++ b/packages/app/src/systems/Network/pages/Networks/Networks.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; - -import { Networks } from './Networks'; - import { Layout } from '~/systems/Core'; import { NetworkService, useNetworks } from '~/systems/Network'; import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; import { store } from '~/systems/Store'; +import { Networks } from './Networks'; + export default { component: Networks, title: 'Network/Pages/1. Networks', diff --git a/packages/app/src/systems/Network/pages/Networks/Networks.tsx b/packages/app/src/systems/Network/pages/Networks/Networks.tsx index 784e768c0..d1ce1045d 100644 --- a/packages/app/src/systems/Network/pages/Networks/Networks.tsx +++ b/packages/app/src/systems/Network/pages/Networks/Networks.tsx @@ -1,6 +1,5 @@ import * as css from '@fuel-ui/css'; import { Button, Dialog, Icon } from '@fuel-ui/react'; - import { coreStyles } from '~/systems/Core/styles'; import { NetworkList, useNetworks } from '~/systems/Network'; import { OverlayDialogTopbar } from '~/systems/Overlay'; diff --git a/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.stories.tsx b/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.stories.tsx index 68ffec816..4a361645b 100644 --- a/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.stories.tsx +++ b/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; - -import { UpdateNetwork } from './UpdateNetwork'; - import { Layout } from '~/systems/Core'; import { NetworkService, useNetworks } from '~/systems/Network'; import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; import { store } from '~/systems/Store'; +import { UpdateNetwork } from './UpdateNetwork'; + export default { component: UpdateNetwork, title: 'Network/Pages/3. UpdateNetwork', diff --git a/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.tsx b/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.tsx index 940ef7502..651c826b7 100644 --- a/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.tsx +++ b/packages/app/src/systems/Network/pages/UpdateNetwork/UpdateNetwork.tsx @@ -1,5 +1,4 @@ import { Box, Button, Dialog, Focus, Icon } from '@fuel-ui/react'; - import { styles } from '~/systems/Core'; import type { NetworkFormValues } from '~/systems/Network'; import { NetworkForm, useNetworkForm, useNetworks } from '~/systems/Network'; diff --git a/packages/app/src/systems/Network/services/network.ts b/packages/app/src/systems/Network/services/network.ts index c736bd998..10bbd3186 100644 --- a/packages/app/src/systems/Network/services/network.ts +++ b/packages/app/src/systems/Network/services/network.ts @@ -1,11 +1,10 @@ import { createUUID } from '@fuel-wallet/sdk'; import type { Network } from '@fuel-wallet/types'; import { Provider } from 'fuels'; +import { db } from '~/systems/Core/utils/database'; import { isValidNetworkUrl } from '../utils'; -import { db } from '~/systems/Core/utils/database'; - export type NetworkInputs = { getNetwork: { id: string; diff --git a/packages/app/src/systems/Overlay/components/OverlayDialog/OverlayDialog.tsx b/packages/app/src/systems/Overlay/components/OverlayDialog/OverlayDialog.tsx index 66ce5ac04..4af658e09 100644 --- a/packages/app/src/systems/Overlay/components/OverlayDialog/OverlayDialog.tsx +++ b/packages/app/src/systems/Overlay/components/OverlayDialog/OverlayDialog.tsx @@ -1,6 +1,5 @@ import { cssObj } from '@fuel-ui/css'; import { Dialog } from '@fuel-ui/react'; - import { WALLET_HEIGHT, WALLET_WIDTH } from '~/config'; import { EditAccount, Logout } from '~/systems/Account'; import { Accounts } from '~/systems/Account/pages/Accounts'; diff --git a/packages/app/src/systems/Overlay/hooks/useOverlay.tsx b/packages/app/src/systems/Overlay/hooks/useOverlay.tsx index d17dccaea..ef00cabb8 100644 --- a/packages/app/src/systems/Overlay/hooks/useOverlay.tsx +++ b/packages/app/src/systems/Overlay/hooks/useOverlay.tsx @@ -1,10 +1,10 @@ +import { Services, store } from '~/store'; + import type { OverlayMachineState, OverlayKeys, } from '../machines/overlayMachine'; -import { Services, store } from '~/store'; - const selectors = { isDialogOpen: (state: OverlayMachineState) => state.matches('opened') && state.context.overlay !== 'sidebar', diff --git a/packages/app/src/systems/Send/__mocks__/send.tsx b/packages/app/src/systems/Send/__mocks__/send.tsx index c57ff4b42..b1f2d172b 100644 --- a/packages/app/src/systems/Send/__mocks__/send.tsx +++ b/packages/app/src/systems/Send/__mocks__/send.tsx @@ -1,6 +1,5 @@ /* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */ import type { WalletUnlocked } from 'fuels'; - import { createMockAccount } from '~/systems/Account'; import { getMockedTransaction } from '~/systems/DApp/__mocks__/dapp-transaction'; import { NetworkService } from '~/systems/Network'; diff --git a/packages/app/src/systems/Send/components/Send/Send.stories.tsx b/packages/app/src/systems/Send/components/Send/Send.stories.tsx index 8ac07156f..644ec6966 100644 --- a/packages/app/src/systems/Send/components/Send/Send.stories.tsx +++ b/packages/app/src/systems/Send/components/Send/Send.stories.tsx @@ -1,16 +1,15 @@ import type { Meta, StoryFn } from '@storybook/react'; import { Wallet } from 'fuels'; +import { + mockBalancesOnGraphQL, + MOCK_ASSETS_NODE, +} from '~/systems/Asset/__mocks__/assets'; import { sendLoader } from '../../__mocks__/send'; import { useSend } from '../../hooks'; import { Send } from '.'; -import { - mockBalancesOnGraphQL, - MOCK_ASSETS_NODE, -} from '~/systems/Asset/__mocks__/assets'; - const wallet = Wallet.generate(); export default { diff --git a/packages/app/src/systems/Send/components/Send/Send.test.tsx b/packages/app/src/systems/Send/components/Send/Send.test.tsx index 2205f9d6f..bc5d4c838 100644 --- a/packages/app/src/systems/Send/components/Send/Send.test.tsx +++ b/packages/app/src/systems/Send/components/Send/Send.test.tsx @@ -1,10 +1,9 @@ import { fireEvent, render, screen, waitFor } from '@fuel-ui/test-utils'; - -import { Select } from './Send.stories'; - import { TestWrapper } from '~/systems/Core'; import { mockVault } from '~/systems/Core/__tests__'; +import { Select } from './Send.stories'; + describe('Send', () => { function findAssetSelect() { return screen.findByLabelText('Select Asset'); diff --git a/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx b/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx index afdf7011c..496bfeafe 100644 --- a/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx +++ b/packages/app/src/systems/Send/components/SendSelect/SendSelect.tsx @@ -2,13 +2,12 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Input, InputAmount, Text } from '@fuel-ui/react'; import { motion } from 'framer-motion'; import { bn } from 'fuels'; - -import type { UseSendReturn } from '../../hooks'; - import { AssetSelect } from '~/systems/Asset'; import { animations, ControlledField, Layout } from '~/systems/Core'; import { TxDetails } from '~/systems/Transaction'; +import type { UseSendReturn } from '../../hooks'; + const MotionContent = motion(Layout.Content); type SendSelectProps = UseSendReturn; diff --git a/packages/app/src/systems/Send/hooks/useSend.tsx b/packages/app/src/systems/Send/hooks/useSend.tsx index 8a9e81fb5..22a9a7f09 100644 --- a/packages/app/src/systems/Send/hooks/useSend.tsx +++ b/packages/app/src/systems/Send/hooks/useSend.tsx @@ -6,10 +6,6 @@ import { useCallback } from 'react'; import { useForm } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; import * as yup from 'yup'; - -import type { SendMachineState } from '../machines/sendMachine'; -import { sendMachine } from '../machines/sendMachine'; - import { useAccounts } from '~/systems/Account'; import { isEth, useAssets } from '~/systems/Asset'; import { Pages } from '~/systems/Core'; @@ -17,6 +13,9 @@ import { useTransactionRequest } from '~/systems/DApp'; import { TxRequestStatus } from '~/systems/DApp/machines/transactionRequestMachine'; import type { TxInputs } from '~/systems/Transaction/services'; +import { sendMachine } from '../machines/sendMachine'; +import type { SendMachineState } from '../machines/sendMachine'; + export enum SendStatus { loading = 'loading', selecting = 'selecting', @@ -34,6 +33,7 @@ const selectors = { return state.matches('invalid'); }, status(txStatus?: TxRequestStatus) { + // eslint-disable-next-line react-hooks/rules-of-hooks return useCallback( (state: SendMachineState) => { const isLoadingTx = @@ -49,6 +49,7 @@ const selectors = { ); }, title(txStatus?: TxRequestStatus) { + // eslint-disable-next-line react-hooks/rules-of-hooks return useCallback( (state: SendMachineState) => { if (state.matches('creatingTx') || txStatus === TxRequestStatus.loading) diff --git a/packages/app/src/systems/Send/machines/sendMachine.test.ts b/packages/app/src/systems/Send/machines/sendMachine.test.ts index c2363aa00..522d5eb2e 100644 --- a/packages/app/src/systems/Send/machines/sendMachine.test.ts +++ b/packages/app/src/systems/Send/machines/sendMachine.test.ts @@ -1,14 +1,13 @@ import { Wallet, bn } from 'fuels'; import { interpret } from 'xstate'; import { waitFor } from 'xstate/lib/waitFor'; - -import type { SendMachineService } from './sendMachine'; -import { sendMachine } from './sendMachine'; - import { MOCK_ASSETS } from '~/systems/Asset/__mocks__/assets'; import type { MockVaultData } from '~/systems/Core/__tests__'; import { mockVault } from '~/systems/Core/__tests__'; +import { sendMachine } from './sendMachine'; +import type { SendMachineService } from './sendMachine'; + const MOCK_INPUTS = { address: Wallet.generate().address.toString(), asset: MOCK_ASSETS[0], diff --git a/packages/app/src/systems/Send/machines/sendMachine.ts b/packages/app/src/systems/Send/machines/sendMachine.ts index 13a813970..6804919dd 100644 --- a/packages/app/src/systems/Send/machines/sendMachine.ts +++ b/packages/app/src/systems/Send/machines/sendMachine.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ import { BN, TransactionRequest } from 'fuels'; import { assign, createMachine, InterpreterFrom, StateFrom } from 'xstate'; - import { AccountService } from '~/systems/Account'; import { FetchMachine, WalletLockedCustom } from '~/systems/Core'; import { NetworkService } from '~/systems/Network'; diff --git a/packages/app/src/systems/Send/pages/SendPage/SendPage.stories.tsx b/packages/app/src/systems/Send/pages/SendPage/SendPage.stories.tsx index 9f6f16576..00d38b27c 100644 --- a/packages/app/src/systems/Send/pages/SendPage/SendPage.stories.tsx +++ b/packages/app/src/systems/Send/pages/SendPage/SendPage.stories.tsx @@ -1,16 +1,15 @@ import type { ComponentStory, Meta } from '@storybook/react'; import { userEvent, waitFor, within } from '@storybook/testing-library'; import { Wallet } from 'fuels'; - -import { sendLoader } from '../../__mocks__/send'; - -import { SendPage } from './SendPage'; - import { mockBalancesOnGraphQL, MOCK_ASSETS_NODE, } from '~/systems/Asset/__mocks__/assets'; +import { sendLoader } from '../../__mocks__/send'; + +import { SendPage } from './SendPage'; + const wallet = Wallet.generate(); export default { diff --git a/packages/app/src/systems/Send/pages/SendPage/SendPage.tsx b/packages/app/src/systems/Send/pages/SendPage/SendPage.tsx index 0a6658d63..5d0c6676d 100644 --- a/packages/app/src/systems/Send/pages/SendPage/SendPage.tsx +++ b/packages/app/src/systems/Send/pages/SendPage/SendPage.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { Button } from '@fuel-ui/react'; +import { animations, Layout, MotionStack } from '~/systems/Core'; import { Send } from '../../components'; import { useSend } from '../../hooks'; -import { animations, Layout, MotionStack } from '~/systems/Core'; - export function SendPage() { const send = useSend(); const { handlers, txRequest, status, form, ...ctx } = send; diff --git a/packages/app/src/systems/Settings/__mocks__/connection.ts b/packages/app/src/systems/Settings/__mocks__/connection.ts index f894ee663..4ddb476b3 100644 --- a/packages/app/src/systems/Settings/__mocks__/connection.ts +++ b/packages/app/src/systems/Settings/__mocks__/connection.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-non-null-asserted-optional-chain */ import type { Connection } from '@fuel-wallet/types'; import { Wallet } from 'fuels'; - import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; import { ConnectionService } from '~/systems/DApp/services'; import { NetworkService } from '~/systems/Network'; diff --git a/packages/app/src/systems/Settings/__test__/testQueries.ts b/packages/app/src/systems/Settings/__test__/testQueries.ts index e018b409b..9d816e2f3 100644 --- a/packages/app/src/systems/Settings/__test__/testQueries.ts +++ b/packages/app/src/systems/Settings/__test__/testQueries.ts @@ -1,11 +1,9 @@ import { waitFor, fireEvent, screen } from '@fuel-ui/test-utils'; import type { Connection } from '@fuel-wallet/types'; - import { ConnectionService } from '~/systems/DApp/services'; export async function waitShowingConnections(...conns: Connection[]) { await waitFor(() => { - // eslint-disable-next-line no-restricted-syntax for (const conn of conns) { expect(screen.getByText(conn.origin)).toBeInTheDocument(); } diff --git a/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.test.tsx b/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.test.tsx index 675d65db8..df2018da4 100644 --- a/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.test.tsx +++ b/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.test.tsx @@ -1,4 +1,6 @@ import { screen } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithRouter } from '~/systems/Core/__tests__/utils'; import { connectionsLoader } from '../../__mocks__/connection'; import { testQueries } from '../../__test__'; @@ -6,9 +8,6 @@ import { useConnections } from '../../hooks'; import { Usage } from './ConnectionEdit.stories'; -import { TestWrapper } from '~/systems/Core'; -import { renderWithRouter } from '~/systems/Core/__tests__/utils'; - function Content() { const state = useConnections(); return ; diff --git a/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.tsx b/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.tsx index 57db4d35b..60affe6a1 100644 --- a/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.tsx +++ b/packages/app/src/systems/Settings/components/ConnectionEdit/ConnectionEdit.tsx @@ -3,9 +3,6 @@ import { cssObj } from '@fuel-ui/css'; import type { BoxProps } from '@fuel-ui/react'; import { Box, CardList, Icon, Text } from '@fuel-ui/react'; import { motion, AnimatePresence } from 'framer-motion'; - -import type { useConnections } from '../../hooks'; - import { AccountItem } from '~/systems/Account'; import { animations, @@ -15,6 +12,8 @@ import { SearchInput, } from '~/systems/Core'; +import type { useConnections } from '../../hooks'; + export type ConnectionEditProps = ReturnType; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/app/src/systems/Settings/components/ConnectionItem/ConnectionItem.tsx b/packages/app/src/systems/Settings/components/ConnectionItem/ConnectionItem.tsx index 8ec40ddf6..5584b9c2f 100644 --- a/packages/app/src/systems/Settings/components/ConnectionItem/ConnectionItem.tsx +++ b/packages/app/src/systems/Settings/components/ConnectionItem/ConnectionItem.tsx @@ -3,13 +3,12 @@ import { Avatar, Box, CardList, Icon, IconButton, Text } from '@fuel-ui/react'; import type { Connection } from '@fuel-wallet/types'; import { motion } from 'framer-motion'; import type { FC } from 'react'; +import { animations, parseUrl, truncate } from '~/systems/Core'; import { ConnectionRemoveDialog } from '../ConnectionRemoveDialog'; import { ConnectionItemLoader } from './ConnectionItemLoader'; -import { animations, parseUrl, truncate } from '~/systems/Core'; - const MotionCardItem = motion(CardList.Item); export type ConnectionItemProps = { diff --git a/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.test.tsx b/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.test.tsx index 96fdada84..03535d273 100644 --- a/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.test.tsx +++ b/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.test.tsx @@ -1,5 +1,7 @@ import { fireEvent, screen } from '@fuel-ui/test-utils'; import type { Connection } from '@fuel-wallet/types'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithRouter } from '~/systems/Core/__tests__/utils'; import { connectionsLoader } from '../../__mocks__/connection'; import { testQueries } from '../../__test__'; @@ -7,9 +9,6 @@ import { useConnections } from '../../hooks'; import { Usage } from './ConnectionList.stories'; -import { TestWrapper } from '~/systems/Core'; -import { renderWithRouter } from '~/systems/Core/__tests__/utils'; - function Content() { const state = useConnections(); return ; diff --git a/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.tsx b/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.tsx index d64f10ff7..b05f5b3ce 100644 --- a/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.tsx +++ b/packages/app/src/systems/Settings/components/ConnectionList/ConnectionList.tsx @@ -1,10 +1,6 @@ import { cssObj } from '@fuel-ui/css'; import { Icon, CardList, Tooltip, Box } from '@fuel-ui/react'; import { AnimatePresence, motion } from 'framer-motion'; - -import type { useConnections } from '../../hooks'; -import { ConnectionItem } from '../ConnectionItem'; - import { animations, EmptyList, @@ -15,6 +11,9 @@ import { } from '~/systems/Core'; import { NOT_ALLOWED_LIST, PERMISSION_LIST } from '~/systems/DApp'; +import type { useConnections } from '../../hooks'; +import { ConnectionItem } from '../ConnectionItem'; + export type ConnectionListProps = ReturnType; const MotionCardList = motion(CardList); diff --git a/packages/app/src/systems/Settings/hooks/useSettings.ts b/packages/app/src/systems/Settings/hooks/useSettings.ts index 084f22f87..3a7e1235c 100644 --- a/packages/app/src/systems/Settings/hooks/useSettings.ts +++ b/packages/app/src/systems/Settings/hooks/useSettings.ts @@ -1,12 +1,11 @@ import { useInterpret, useSelector } from '@xstate/react'; import { useNavigate } from 'react-router-dom'; +import { Pages } from '~/systems/Core'; +import type { VaultInputs } from '~/systems/Vault'; import { settingsMachine } from '../machines'; import type { SettingsMachineState } from '../machines'; -import { Pages } from '~/systems/Core'; -import type { VaultInputs } from '~/systems/Vault'; - const selectors = { isChangingPassword: (state: SettingsMachineState) => state.matches('changingPassword'), diff --git a/packages/app/src/systems/Settings/machines/connectionsMachine.test.ts b/packages/app/src/systems/Settings/machines/connectionsMachine.test.ts index 9c470045e..6ca377c5e 100644 --- a/packages/app/src/systems/Settings/machines/connectionsMachine.test.ts +++ b/packages/app/src/systems/Settings/machines/connectionsMachine.test.ts @@ -1,6 +1,8 @@ import type { Account, Connection } from '@fuel-wallet/types'; import { interpret } from 'xstate'; import { waitFor } from 'xstate/lib/waitFor'; +import type { Maybe } from '~/systems/Core'; +import { ConnectionService } from '~/systems/DApp/services'; import { mockConnections } from '../__mocks__/connection'; @@ -10,9 +12,6 @@ import type { } from './connectionsMachine'; import { connectionsMachine } from './connectionsMachine'; -import type { Maybe } from '~/systems/Core'; -import { ConnectionService } from '~/systems/DApp/services'; - const setOriginFn = jest.fn(); const removeOriginFn = jest.fn(); diff --git a/packages/app/src/systems/Settings/machines/connectionsMachine.tsx b/packages/app/src/systems/Settings/machines/connectionsMachine.tsx index 97ded4ff4..12ab08ce1 100644 --- a/packages/app/src/systems/Settings/machines/connectionsMachine.tsx +++ b/packages/app/src/systems/Settings/machines/connectionsMachine.tsx @@ -2,7 +2,6 @@ import { toast } from '@fuel-ui/react'; import type { Account, Connection } from '@fuel-wallet/types'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { AccountService } from '~/systems/Account'; import type { Maybe } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core'; diff --git a/packages/app/src/systems/Settings/machines/exportVaultMachine.test.tsx b/packages/app/src/systems/Settings/machines/exportVaultMachine.test.tsx index 3f3885150..c7ab886cc 100644 --- a/packages/app/src/systems/Settings/machines/exportVaultMachine.test.tsx +++ b/packages/app/src/systems/Settings/machines/exportVaultMachine.test.tsx @@ -1,10 +1,9 @@ import { interpret } from 'xstate'; +import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; import type { ExportVaultMachineService } from './exportVaultMachine'; import { exportVaultMachine } from './exportVaultMachine'; -import { expectStateMatch, mockVault } from '~/systems/Core/__tests__/utils'; - describe('exportAccountMachine', () => { let service: ExportVaultMachineService; let state: ReturnType; diff --git a/packages/app/src/systems/Settings/machines/exportVaultMachine.ts b/packages/app/src/systems/Settings/machines/exportVaultMachine.ts index 53ce50ccd..79f011038 100644 --- a/packages/app/src/systems/Settings/machines/exportVaultMachine.ts +++ b/packages/app/src/systems/Settings/machines/exportVaultMachine.ts @@ -1,6 +1,5 @@ import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { FetchMachine } from '~/systems/Core'; import type { VaultInputs } from '~/systems/Vault'; import { VaultService } from '~/systems/Vault'; diff --git a/packages/app/src/systems/Settings/machines/settingsMachine.test.tsx b/packages/app/src/systems/Settings/machines/settingsMachine.test.tsx index 8cc9eb531..ab85b1204 100644 --- a/packages/app/src/systems/Settings/machines/settingsMachine.test.tsx +++ b/packages/app/src/systems/Settings/machines/settingsMachine.test.tsx @@ -1,11 +1,10 @@ import type { InterpreterFrom } from 'xstate'; import { interpret } from 'xstate'; - -import { settingsMachine } from './settingsMachine'; - import { expectStateMatch } from '~/systems/Core/__tests__'; import type { VaultInputs } from '~/systems/Vault'; +import { settingsMachine } from './settingsMachine'; + describe('settingsMachine', () => { const redirectToWallet = jest.fn(); let service: InterpreterFrom; diff --git a/packages/app/src/systems/Settings/machines/settingsMachine.ts b/packages/app/src/systems/Settings/machines/settingsMachine.ts index 7581b0587..e67dabbac 100644 --- a/packages/app/src/systems/Settings/machines/settingsMachine.ts +++ b/packages/app/src/systems/Settings/machines/settingsMachine.ts @@ -1,7 +1,6 @@ import { toast } from '@fuel-ui/react'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { FetchMachine } from '~/systems/Core'; import type { VaultInputs } from '~/systems/Vault'; import { VaultService } from '~/systems/Vault'; diff --git a/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.stories.tsx b/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.stories.tsx index 021c3cf12..f515c8af4 100644 --- a/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.stories.tsx +++ b/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.stories.tsx @@ -1,10 +1,9 @@ import type { StoryFn } from '@storybook/react'; - -import { ChangePassword } from './ChangePassword'; - import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; import { mockBalancesOnGraphQL } from '~/systems/Asset/__mocks__/assets'; +import { ChangePassword } from './ChangePassword'; + export default { component: ChangePassword, title: 'Settings/Pages/1. ChangePassword', diff --git a/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.tsx b/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.tsx index 8757e843b..7c91c6d8e 100644 --- a/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.tsx +++ b/packages/app/src/systems/Settings/pages/ChangePassword/ChangePassword.tsx @@ -6,9 +6,6 @@ import { useCallback, useEffect } from 'react'; import { useForm } from 'react-hook-form'; import { useNavigate } from 'react-router-dom'; import * as yup from 'yup'; - -import { useSettings } from '../../hooks/useSettings'; - import { ControlledField, InputSecurePassword, @@ -16,6 +13,8 @@ import { Pages, } from '~/systems/Core'; +import { useSettings } from '../../hooks/useSettings'; + const schema = yup .object({ password: yup.string().test({ diff --git a/packages/app/src/systems/Settings/pages/Connections/Connections.test.tsx b/packages/app/src/systems/Settings/pages/Connections/Connections.test.tsx index 3fd22f66f..6d3cb5a03 100644 --- a/packages/app/src/systems/Settings/pages/Connections/Connections.test.tsx +++ b/packages/app/src/systems/Settings/pages/Connections/Connections.test.tsx @@ -1,15 +1,14 @@ import { fireEvent, screen } from '@fuel-ui/test-utils'; import type { Connection } from '@fuel-wallet/types'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithRouter } from '~/systems/Core/__tests__/utils'; +import { ConnectionService } from '~/systems/DApp/services'; import { connectionsLoader } from '../../__mocks__/connection'; import { testQueries } from '../../__test__'; import { List } from './Connections.stories'; -import { TestWrapper } from '~/systems/Core'; -import { renderWithRouter } from '~/systems/Core/__tests__/utils'; -import { ConnectionService } from '~/systems/DApp/services'; - const opts = { route: '/settings/connections', wrapper: TestWrapper, diff --git a/packages/app/src/systems/Settings/pages/Connections/Connections.tsx b/packages/app/src/systems/Settings/pages/Connections/Connections.tsx index 8e41798e7..fdac92b46 100644 --- a/packages/app/src/systems/Settings/pages/Connections/Connections.tsx +++ b/packages/app/src/systems/Settings/pages/Connections/Connections.tsx @@ -1,11 +1,10 @@ import { AnimatePresence } from 'framer-motion'; +import { Layout } from '~/systems/Core'; import { ConnectionEdit, ConnectionList } from '../../components'; import { useConnections } from '../../hooks'; import { ConnectionScreen } from '../../machines'; -import { Layout } from '~/systems/Core'; - export function Connections() { const state = useConnections(); return ( diff --git a/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.stories.tsx b/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.stories.tsx index e46da9de0..cb3081beb 100644 --- a/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.stories.tsx +++ b/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.stories.tsx @@ -1,13 +1,12 @@ import { Box, Button, Text } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; - -import { ViewSeedPhrase } from './ViewSeedPhrase'; - import { store } from '~/store'; import { useAccounts } from '~/systems/Account'; import { Layout } from '~/systems/Core'; import { mockVault } from '~/systems/Core/__tests__/utils/mockVault'; +import { ViewSeedPhrase } from './ViewSeedPhrase'; + export default { component: ViewSeedPhrase, title: 'Settings/Pages/2. View Seed Phrase', diff --git a/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.tsx b/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.tsx index d4c1c2e16..03eab8c02 100644 --- a/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.tsx +++ b/packages/app/src/systems/Settings/pages/ViewSeedPhrase/ViewSeedPhrase.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Alert, Box, Dialog } from '@fuel-ui/react'; - -import { useExportVault } from '../../hooks'; - import { Mnemonic, styles as coreStyles } from '~/systems/Core'; import { OverlayDialogTopbar, useOverlay } from '~/systems/Overlay'; import { UnlockCard } from '~/systems/Unlock'; +import { useExportVault } from '../../hooks'; + export function ViewSeedPhrase() { const { close } = useOverlay(); const { handlers, error, isUnlockOpened, isLoading, words } = diff --git a/packages/app/src/systems/Settings/services/abi.ts b/packages/app/src/systems/Settings/services/abi.ts index fc28f6f84..057a5a795 100644 --- a/packages/app/src/systems/Settings/services/abi.ts +++ b/packages/app/src/systems/Settings/services/abi.ts @@ -1,5 +1,4 @@ import type { AbiMap } from '@fuel-wallet/types'; - import { db } from '~/systems/Core/utils/database'; export type AbiInputs = { diff --git a/packages/app/src/systems/Sidebar/components/Menu/Menu.test.tsx b/packages/app/src/systems/Sidebar/components/Menu/Menu.test.tsx index 2a0de1d98..ddd29087f 100644 --- a/packages/app/src/systems/Sidebar/components/Menu/Menu.test.tsx +++ b/packages/app/src/systems/Sidebar/components/Menu/Menu.test.tsx @@ -1,10 +1,9 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; import type { MenuItemObj } from './Menu'; import { Menu } from './Menu'; -import { TestWrapper } from '~/systems/Core'; - const ITEMS: MenuItemObj[] = [ { key: 'wallet', icon: 'Wallet', label: 'Wallet0', path: '/wallet' }, { diff --git a/packages/app/src/systems/Sidebar/components/Menu/Menu.tsx b/packages/app/src/systems/Sidebar/components/Menu/Menu.tsx index e8c7613a3..e95e4eb9c 100644 --- a/packages/app/src/systems/Sidebar/components/Menu/Menu.tsx +++ b/packages/app/src/systems/Sidebar/components/Menu/Menu.tsx @@ -4,7 +4,6 @@ import { Box, Icon, Menu as RootMenu } from '@fuel-ui/react'; import { motion } from 'framer-motion'; import { useState } from 'react'; import { useNavigate, useResolvedPath, useMatch } from 'react-router-dom'; - import { store } from '~/store'; import { coreStyles } from '~/systems/Core/styles'; diff --git a/packages/app/src/systems/Sidebar/components/Sidebar/Sidebar.tsx b/packages/app/src/systems/Sidebar/components/Sidebar/Sidebar.tsx index 54d6e7d07..fe46043ca 100644 --- a/packages/app/src/systems/Sidebar/components/Sidebar/Sidebar.tsx +++ b/packages/app/src/systems/Sidebar/components/Sidebar/Sidebar.tsx @@ -2,14 +2,13 @@ import { cssObj } from '@fuel-ui/css'; import { Icon, Drawer, IconButton, Box, Text } from '@fuel-ui/react'; import { forwardRef } from 'react'; +import { APP_VERSION } from '~/config'; +import { useOverlay } from '~/systems/Overlay'; import { Menu } from '..'; import { sidebarItems } from '../../constants'; import { ThemeToggler } from '../ThemeToggler'; -import { APP_VERSION } from '~/config'; -import { useOverlay } from '~/systems/Overlay'; - function SidebarContent() { const overlay = useOverlay(); diff --git a/packages/app/src/systems/Sidebar/constants/sidebarItems.ts b/packages/app/src/systems/Sidebar/constants/sidebarItems.ts index 56309376f..ef181a86f 100644 --- a/packages/app/src/systems/Sidebar/constants/sidebarItems.ts +++ b/packages/app/src/systems/Sidebar/constants/sidebarItems.ts @@ -1,8 +1,8 @@ -import type { MenuItemObj } from '../components'; - import { store } from '~/store'; import { Pages } from '~/systems/Core'; +import type { MenuItemObj } from '../components'; + export const sidebarItems = (): Array => [ { key: 'wallet', diff --git a/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.test.tsx b/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.test.tsx index 0959b3c6f..701966fa2 100644 --- a/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.test.tsx +++ b/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.test.tsx @@ -1,25 +1,32 @@ import type { render } from '@fuel-ui/test-utils'; import { fireEvent, screen, waitFor } from '@fuel-ui/test-utils'; +import type { TestWrapperProps } from '~/systems/Core'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { SignUpProvider } from '../SignUpProvider'; import { CreatePassword } from './CreatePassword'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - const onSubmitHandler = jest.fn(); const onCancelHandler = jest.fn(); type UserPatch = ReturnType['user']; +const renderOpts = { + wrapper: ({ children }: TestWrapperProps) => ( + + {children} + + ), +}; + const Content = () => ( - - - + ); function fillInput(el: HTMLElement, value: string) { @@ -44,14 +51,14 @@ async function fillInputs(user: UserPatch, pass: string, confirm?: string) { describe('CreatePassword', () => { it('should next button be disabled by default', async () => { - renderWithProvider(); + renderWithProvider(, renderOpts); const btn = screen.getByText(/next/i); expect(btn).toBeInTheDocument(); expect(btn).toHaveAttribute('aria-disabled'); }); it('should show "password strength: Weak" when focus in password field', async () => { - renderWithProvider(); + renderWithProvider(, renderOpts); const password = await screen.findByPlaceholderText('Type your password'); @@ -63,7 +70,7 @@ describe('CreatePassword', () => { }); it("should validate if password and confirmPassword doesn't match", async () => { - const { user } = renderWithProvider(); + const { user } = renderWithProvider(, renderOpts); await fillInputs(user, 'Qwe123456$', 'Qwe1234567$'); await waitFor(() => @@ -72,7 +79,7 @@ describe('CreatePassword', () => { }); it('should be able to click on cancel button', async () => { - const { user } = renderWithProvider(); + const { user } = renderWithProvider(, renderOpts); const btn = await screen.findByText('Back'); expect(btn).toBeInTheDocument(); await user.click(btn); diff --git a/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.tsx b/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.tsx index 6990f5d57..6dbc402a8 100644 --- a/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.tsx +++ b/packages/app/src/systems/SignUp/components/CreatePassword/CreatePassword.tsx @@ -5,11 +5,6 @@ import debounce from 'lodash.debounce'; import { useCallback } from 'react'; import { useForm } from 'react-hook-form'; import * as yup from 'yup'; - -import { useSignUpStepper } from '../../hooks'; -import { Header } from '../Header'; -import { Stepper } from '../Stepper'; - import { ControlledField, InputSecurePassword, @@ -17,6 +12,10 @@ import { animations, } from '~/systems/Core'; +import { useSignUpStepper } from '../../hooks'; +import { Header } from '../Header'; +import { Stepper } from '../Stepper'; + const schema = yup .object({ password: yup.string().test({ diff --git a/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.test.tsx b/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.test.tsx index 23a5716de..488d2b3fb 100644 --- a/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.test.tsx +++ b/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.test.tsx @@ -1,13 +1,13 @@ -/* eslint-disable no-restricted-syntax */ import type { render } from '@fuel-ui/test-utils'; import { screen, waitFor } from '@fuel-ui/test-utils'; +import type { TestWrapperProps } from '~/systems/Core'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { SignUpProvider } from '../SignUpProvider'; import { MnemonicRead } from './MnemonicRead'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - const WORDS = [ 'strange', 'purple', @@ -33,16 +33,20 @@ describe('MnemonicRead', () => { beforeEach(() => { const res = renderWithProvider( - - - + , + { + wrapper: ({ children }: TestWrapperProps) => ( + + {children} + + ), + } ); - user = res.user; }); diff --git a/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.tsx b/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.tsx index 4ca98befd..548250b97 100644 --- a/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.tsx +++ b/packages/app/src/systems/SignUp/components/MnemonicRead/MnemonicRead.tsx @@ -1,13 +1,12 @@ import { cssObj } from '@fuel-ui/css'; import { Form, Checkbox, Button, Alert, Box } from '@fuel-ui/react'; import { useState } from 'react'; +import { Mnemonic, MotionStack, animations } from '~/systems/Core'; import { useSignUpStepper } from '../../hooks'; import { Header } from '../Header'; import { Stepper } from '../Stepper'; -import { Mnemonic, MotionStack, animations } from '~/systems/Core'; - export type MnemonicReadProps = { words?: string[]; step: number; diff --git a/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.test.tsx b/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.test.tsx index 701b6f46b..d88d28875 100644 --- a/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.test.tsx +++ b/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.test.tsx @@ -1,15 +1,15 @@ import { screen, waitFor } from '@fuel-ui/test-utils'; import { Mnemonic as FuelMnemonic } from 'fuels'; import { act } from 'react-dom/test-utils'; +import { MNEMONIC_SIZE } from '~/config'; +import type { TestWrapperProps } from '~/systems/Core'; +import { TestWrapper, getPhraseFromValue } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { SignUpProvider } from '../SignUpProvider'; import { MnemonicWrite } from './MnemonicWrite'; -import { MNEMONIC_SIZE } from '~/config'; -import { getPhraseFromValue } from '~/systems/Core'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - const onFilledHandler = jest.fn(); const onNextHandler = jest.fn(); const onCancelHandler = jest.fn(); @@ -18,20 +18,27 @@ const MNEMONIC = getPhraseFromValue( FuelMnemonic.generate(MNEMONIC_SIZE) ) as string; +const renderOpts = { + wrapper: ({ children }: TestWrapperProps) => ( + + {children} + + ), +}; + describe('MnemonicWrite', () => { it('should trigger onFilled after paste', async () => { renderWithProvider( - - - + , + renderOpts ); await navigator.clipboard.writeText(MNEMONIC); @@ -48,17 +55,16 @@ describe('MnemonicWrite', () => { it('should be able to click on next if canProceed and isFilled', async () => { renderWithProvider( - - - + , + renderOpts ); await navigator.clipboard.writeText(MNEMONIC); @@ -76,17 +82,16 @@ describe('MnemonicWrite', () => { it('should show error message when have error prop', async () => { renderWithProvider( - - - + , + renderOpts ); expect(screen.getByText('This is an error message')).toBeInTheDocument(); diff --git a/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.tsx b/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.tsx index 784b526e0..f86b9cb25 100644 --- a/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.tsx +++ b/packages/app/src/systems/SignUp/components/MnemonicWrite/MnemonicWrite.tsx @@ -1,12 +1,11 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Alert, Box } from '@fuel-ui/react'; +import { Mnemonic, MotionStack, animations } from '~/systems/Core'; import { useSignUpStepper } from '../../hooks'; import { Header } from '../Header'; import { Stepper } from '../Stepper'; -import { Mnemonic, MotionStack, animations } from '~/systems/Core'; - export type MnemonicWriteProps = { title: string; subtitle: string; diff --git a/packages/app/src/systems/SignUp/components/SignUpProvider/SignUpProvider.tsx b/packages/app/src/systems/SignUp/components/SignUpProvider/SignUpProvider.tsx index 20a7e5d76..c52c471af 100644 --- a/packages/app/src/systems/SignUp/components/SignUpProvider/SignUpProvider.tsx +++ b/packages/app/src/systems/SignUp/components/SignUpProvider/SignUpProvider.tsx @@ -1,6 +1,7 @@ import { useInterpret } from '@xstate/react'; import { createContext, useContext } from 'react'; import { Outlet, useNavigate } from 'react-router-dom'; +import { Pages } from '~/systems/Core'; import type { SignUpMachineService, @@ -8,14 +9,13 @@ import type { } from '../../machines/signUpMachine'; import { signUpMachine } from '../../machines/signUpMachine'; -import { Pages } from '~/systems/Core'; - type Context = { service: SignUpMachineService; type?: SignUpType; }; const ctx = createContext({} as Context); + export function useSignUpProvider() { return useContext(ctx); } diff --git a/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.stories.tsx b/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.stories.tsx index 982de28f4..accaa3a7e 100644 --- a/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.stories.tsx +++ b/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.stories.tsx @@ -1,9 +1,8 @@ import { Box } from '@fuel-ui/react'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; import { WalletCreated } from './WalletCreated'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; - export default { component: WalletCreated, title: 'SignUp/Components/WalletCreated', diff --git a/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.test.tsx b/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.test.tsx index 425a2def5..d46e78827 100644 --- a/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.test.tsx +++ b/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.test.tsx @@ -1,22 +1,26 @@ import { screen } from '@fuel-ui/test-utils'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; +import type { TestWrapperProps } from '~/systems/Core'; +import { TestWrapper, shortAddress } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { SignUpProvider } from '../SignUpProvider'; import { WalletCreated } from './WalletCreated'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; -import { shortAddress } from '~/systems/Core'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - const ACCOUNT = MOCK_ACCOUNTS[0]; +const renderOpts = { + wrapper: ({ children }: TestWrapperProps) => ( + + {children} + + ), +}; + describe('WalletCreated', () => { it('should show account item component', () => { - renderWithProvider( - - - - ); + renderWithProvider(, renderOpts); expect(screen.getByText('Account 1')).toBeInTheDocument(); expect(screen.getByText(shortAddress(ACCOUNT.address))).toBeInTheDocument(); }); diff --git a/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.tsx b/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.tsx index fd0f013b0..32d63b41e 100644 --- a/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.tsx +++ b/packages/app/src/systems/SignUp/components/WalletCreated/WalletCreated.tsx @@ -1,17 +1,16 @@ import { Button, Box } from '@fuel-ui/react'; import type { Account } from '@fuel-wallet/types'; import { useNavigate } from 'react-router-dom'; +import { IS_CRX } from '~/config'; +import { AccountItem } from '~/systems/Account'; +import type { Maybe } from '~/systems/Core'; +import { MotionStack, Pages, animations } from '~/systems/Core'; import { useSignUpStepper } from '../../hooks'; import { Header } from '../Header'; import { PinWalletText } from '../PinWalletText'; import { Stepper } from '../Stepper'; -import { IS_CRX } from '~/config'; -import { AccountItem } from '~/systems/Account'; -import type { Maybe } from '~/systems/Core'; -import { MotionStack, Pages, animations } from '~/systems/Core'; - export type WalletCreatedProps = { account?: Maybe; }; diff --git a/packages/app/src/systems/SignUp/hooks/useMnemonicForm.tsx b/packages/app/src/systems/SignUp/hooks/useMnemonicForm.tsx index ed8e6e46b..ebad43397 100644 --- a/packages/app/src/systems/SignUp/hooks/useMnemonicForm.tsx +++ b/packages/app/src/systems/SignUp/hooks/useMnemonicForm.tsx @@ -1,10 +1,9 @@ import { Mnemonic } from 'fuels'; import { useState } from 'react'; +import { getPhraseFromValue } from '~/systems/Core'; import { ERRORS } from '../machines/signUpMachine'; -import { getPhraseFromValue } from '~/systems/Core'; - export function useMnemonicForm(checkWords?: string[]) { const [isValid, setIsValid] = useState(false); const [error, setError] = useState(''); diff --git a/packages/app/src/systems/SignUp/hooks/useSignUp.tsx b/packages/app/src/systems/SignUp/hooks/useSignUp.tsx index 2d9f4dc72..84c9a6b8b 100644 --- a/packages/app/src/systems/SignUp/hooks/useSignUp.tsx +++ b/packages/app/src/systems/SignUp/hooks/useSignUp.tsx @@ -1,13 +1,12 @@ import { useSelector } from '@xstate/react'; import { useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; +import { Pages } from '~/systems/Core'; import type { CreatePasswordValues } from '../components'; import { useSignUpProvider } from '../components/SignUpProvider'; import type { SignUpMachineState } from '../machines/signUpMachine'; -import { Pages } from '~/systems/Core'; - export enum SignUpScreen { showing = 'showing', waiting = 'waiting', diff --git a/packages/app/src/systems/SignUp/machines/signUpMachine.test.ts b/packages/app/src/systems/SignUp/machines/signUpMachine.test.ts index f7bde250d..8b14dceb6 100644 --- a/packages/app/src/systems/SignUp/machines/signUpMachine.test.ts +++ b/packages/app/src/systems/SignUp/machines/signUpMachine.test.ts @@ -1,12 +1,11 @@ import { Mnemonic, Wallet } from 'fuels'; import { interpret } from 'xstate'; +import { db } from '~/systems/Core'; +import { expectStateMatch } from '~/systems/Core/__tests__'; import { signUpMachine } from './signUpMachine'; import type { SignUpMachineService } from './signUpMachine'; -import { db } from '~/systems/Core'; -import { expectStateMatch } from '~/systems/Core/__tests__'; - function createMachine() { return signUpMachine.withConfig({ actions: { diff --git a/packages/app/src/systems/SignUp/machines/signUpMachine.ts b/packages/app/src/systems/SignUp/machines/signUpMachine.ts index 2a70363ed..8ad93b085 100644 --- a/packages/app/src/systems/SignUp/machines/signUpMachine.ts +++ b/packages/app/src/systems/SignUp/machines/signUpMachine.ts @@ -3,9 +3,6 @@ import type { Account } from '@fuel-wallet/types'; import { Mnemonic } from 'fuels'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import { SignUpService } from '../services'; - import { IS_LOGGED_KEY, MNEMONIC_SIZE } from '~/config'; import { store } from '~/store'; import { @@ -16,6 +13,8 @@ import { } from '~/systems/Core'; import type { Maybe } from '~/systems/Core'; +import { SignUpService } from '../services'; + // ---------------------------------------------------------------------------- // Machine // ---------------------------------------------------------------------------- diff --git a/packages/app/src/systems/SignUp/pages/BackupWallet/BackupWallet.tsx b/packages/app/src/systems/SignUp/pages/BackupWallet/BackupWallet.tsx index 3bf85e625..d89478733 100644 --- a/packages/app/src/systems/SignUp/pages/BackupWallet/BackupWallet.tsx +++ b/packages/app/src/systems/SignUp/pages/BackupWallet/BackupWallet.tsx @@ -1,8 +1,8 @@ +import { Layout } from '~/systems/Core'; + import { MnemonicRead } from '../../components'; import { useSignUp } from '../../hooks'; -import { Layout } from '~/systems/Core'; - export function BackupWallet() { const { handlers, context } = useSignUp(); diff --git a/packages/app/src/systems/SignUp/pages/ConfirmWallet/ConfirmWallet.tsx b/packages/app/src/systems/SignUp/pages/ConfirmWallet/ConfirmWallet.tsx index 98aff5050..2786ed6e8 100644 --- a/packages/app/src/systems/SignUp/pages/ConfirmWallet/ConfirmWallet.tsx +++ b/packages/app/src/systems/SignUp/pages/ConfirmWallet/ConfirmWallet.tsx @@ -1,9 +1,9 @@ +import { Layout } from '~/systems/Core'; + import { MnemonicWrite } from '../../components'; import { useSignUp } from '../../hooks'; import { useMnemonicForm } from '../../hooks/useMnemonicForm'; -import { Layout } from '~/systems/Core'; - export function ConfirmWallet() { const { handlers, context } = useSignUp(); const { error, words, hasError, onChange, onFilled } = useMnemonicForm( diff --git a/packages/app/src/systems/SignUp/pages/CreatedWallet/index.tsx b/packages/app/src/systems/SignUp/pages/CreatedWallet/index.tsx index f02d08723..3cfd70de1 100644 --- a/packages/app/src/systems/SignUp/pages/CreatedWallet/index.tsx +++ b/packages/app/src/systems/SignUp/pages/CreatedWallet/index.tsx @@ -1,8 +1,8 @@ -import { WalletCreated } from '../../components'; - import { useAccounts } from '~/systems/Account'; import { Layout } from '~/systems/Core'; +import { WalletCreated } from '../../components'; + export const CreatedWallet = () => { const { account } = useAccounts(); return ( diff --git a/packages/app/src/systems/SignUp/pages/EncryptWallet/EncryptWallet.tsx b/packages/app/src/systems/SignUp/pages/EncryptWallet/EncryptWallet.tsx index dc9482d7e..75cf0e2ec 100644 --- a/packages/app/src/systems/SignUp/pages/EncryptWallet/EncryptWallet.tsx +++ b/packages/app/src/systems/SignUp/pages/EncryptWallet/EncryptWallet.tsx @@ -1,9 +1,9 @@ +import { Layout } from '~/systems/Core'; + import { CreatePassword } from '../../components'; import { useSignUp } from '../../hooks'; import { SignUpType } from '../../machines/signUpMachine'; -import { Layout } from '~/systems/Core'; - export function EncryptWallet() { const { handlers, context } = useSignUp(); const step = context.signUpType === SignUpType.create ? 4 : 3; diff --git a/packages/app/src/systems/SignUp/pages/RecoverWallet/RecoverWallet.tsx b/packages/app/src/systems/SignUp/pages/RecoverWallet/RecoverWallet.tsx index 85a15c5f0..c60f4b0c1 100644 --- a/packages/app/src/systems/SignUp/pages/RecoverWallet/RecoverWallet.tsx +++ b/packages/app/src/systems/SignUp/pages/RecoverWallet/RecoverWallet.tsx @@ -1,9 +1,9 @@ +import { Layout } from '~/systems/Core'; + import { MnemonicWrite } from '../../components'; import { useSignUp } from '../../hooks'; import { useMnemonicForm } from '../../hooks/useMnemonicForm'; -import { Layout } from '~/systems/Core'; - export function RecoverWallet() { const { handlers, context } = useSignUp(); const { error, words, hasError, onChange, onFilled } = useMnemonicForm(); diff --git a/packages/app/src/systems/SignUp/pages/TermsOfUse/TermsOfUse.tsx b/packages/app/src/systems/SignUp/pages/TermsOfUse/TermsOfUse.tsx index a92eab7c1..f248ded85 100644 --- a/packages/app/src/systems/SignUp/pages/TermsOfUse/TermsOfUse.tsx +++ b/packages/app/src/systems/SignUp/pages/TermsOfUse/TermsOfUse.tsx @@ -1,13 +1,12 @@ import { cssObj } from '@fuel-ui/css'; import { Form, Box, Button, Checkbox } from '@fuel-ui/react'; import { useState } from 'react'; +import { Layout, MotionStack, animations } from '~/systems/Core'; +import { ReactComponent as Terms } from '~public/TermOfService.md'; import { Header, Stepper } from '../../components'; import { useSignUp, useSignUpStepper } from '../../hooks'; -import { Layout, MotionStack, animations } from '~/systems/Core'; -import { ReactComponent as Terms } from '~public/TermOfService.md'; - export function TermsOfUse() { const [isSavedChecked, setCheckedTerms] = useState(false); const { handlers } = useSignUp(); diff --git a/packages/app/src/systems/SignUp/pages/WelcomeScreen/WelcomeScreen.tsx b/packages/app/src/systems/SignUp/pages/WelcomeScreen/WelcomeScreen.tsx index b626f7626..fb9942b2d 100644 --- a/packages/app/src/systems/SignUp/pages/WelcomeScreen/WelcomeScreen.tsx +++ b/packages/app/src/systems/SignUp/pages/WelcomeScreen/WelcomeScreen.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Card, FuelLogo, Heading, Icon } from '@fuel-ui/react'; +import { Layout, MotionStack, animations } from '~/systems/Core'; import { Header } from '../../components'; import { useSignUp } from '../../hooks'; -import { Layout, MotionStack, animations } from '~/systems/Core'; - export function WelcomeScreen() { const { handlers } = useSignUp(); return ( diff --git a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.stories.tsx b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.stories.tsx index 649c82b50..933e5505d 100644 --- a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.stories.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.stories.tsx @@ -1,5 +1,3 @@ -/* eslint-disable no-param-reassign */ -/* eslint-disable no-return-assign */ import { Box } from '@fuel-ui/react'; import { OperationName, TransactionStatus } from 'fuels'; diff --git a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.test.tsx b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.test.tsx index 658a584f1..9dafdabe2 100644 --- a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.test.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.test.tsx @@ -2,13 +2,12 @@ import { render, testA11y, screen } from '@fuel-ui/test-utils'; import { fireEvent } from '@storybook/testing-library'; import { Address } from 'fuels'; import { act } from 'react-dom/test-utils'; +import { Pages, shortAddress, TestWrapper } from '~/systems/Core'; import { MOCK_TRANSACTION_CONTRACT_CALL } from '../../__mocks__/tx'; import { ActivityItem } from './ActivityItem'; -import { Pages, shortAddress, TestWrapper } from '~/systems/Core'; - const ownerAddress = MOCK_TRANSACTION_CONTRACT_CALL.operations[0].from?.address || ''; diff --git a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx index d3008b183..519d7095a 100644 --- a/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityItem/ActivityItem.tsx @@ -3,14 +3,13 @@ import { Box, Card, Copyable, Icon, Text } from '@fuel-ui/react'; import type { TransactionSummary } from 'fuels'; import type { FC } from 'react'; import { useNavigate } from 'react-router-dom'; +import { Pages, shortAddress } from '~/systems/Core'; import { useTxMetadata } from '../../hooks/useTxMetadata'; import { TxIcon } from '../TxIcon'; import { ActivityItemLoader } from './ActivityItemLoader'; -import { Pages, shortAddress } from '~/systems/Core'; - export type TxItemProps = { transaction: TransactionSummary; ownerAddress: string; diff --git a/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.stories.tsx b/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.stories.tsx index d51492947..a96a7862c 100644 --- a/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.stories.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.stories.tsx @@ -1,5 +1,6 @@ import { Box } from '@fuel-ui/react'; import type { StoryFn } from '@storybook/react'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; import { MOCK_TRANSACTION_CONTRACT_CALL, @@ -10,8 +11,6 @@ import { import type { ActivityListProps } from './ActivityList'; import { ActivityList } from './ActivityList'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; - export default { component: ActivityList, title: 'Transaction/Components/ActivityList', diff --git a/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.test.tsx b/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.test.tsx index 5293f76a3..bbc3d31e9 100644 --- a/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.test.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityList/ActivityList.test.tsx @@ -1,4 +1,6 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; +import { MOCK_ACCOUNTS } from '~/systems/Account'; +import { TestWrapper } from '~/systems/Core/components/TestWrapper'; import { MOCK_TRANSACTION_CONTRACT_CALL, @@ -7,9 +9,6 @@ import { import { ActivityList } from './ActivityList'; -import { MOCK_ACCOUNTS } from '~/systems/Account'; -import { TestWrapper } from '~/systems/Core/components/TestWrapper'; - const MOCK_TXS = [ MOCK_TRANSACTION_CONTRACT_CALL, MOCK_TRANSACTION_CREATE_CONTRACT, diff --git a/packages/app/src/systems/Transaction/components/ActivityList/ActivityListEmpty.tsx b/packages/app/src/systems/Transaction/components/ActivityList/ActivityListEmpty.tsx index a120882f2..a572a6ce6 100644 --- a/packages/app/src/systems/Transaction/components/ActivityList/ActivityListEmpty.tsx +++ b/packages/app/src/systems/Transaction/components/ActivityList/ActivityListEmpty.tsx @@ -1,6 +1,5 @@ import { cssObj } from '@fuel-ui/css'; import { Text, Heading, Button, Icon, Box, useFuelTheme } from '@fuel-ui/react'; - import { ImageLoader, relativeUrl } from '~/systems/Core'; import { useOpenFaucet } from '~/systems/Faucet'; diff --git a/packages/app/src/systems/Transaction/components/FunctionCalls/FunctionCalls.tsx b/packages/app/src/systems/Transaction/components/FunctionCalls/FunctionCalls.tsx index 5f036a983..2eb2f92c7 100644 --- a/packages/app/src/systems/Transaction/components/FunctionCalls/FunctionCalls.tsx +++ b/packages/app/src/systems/Transaction/components/FunctionCalls/FunctionCalls.tsx @@ -2,7 +2,6 @@ import { cssObj } from '@fuel-ui/css'; import { Accordion, Box, Text, useFuelTheme } from '@fuel-ui/react'; import type { OperationFunctionCall } from 'fuels'; import ReactJson from 'react-json-view'; - import { coreStyles } from '~/systems/Core/styles'; export type FunctionCallsProps = { diff --git a/packages/app/src/systems/Transaction/components/TxContent/TxContent.tsx b/packages/app/src/systems/Transaction/components/TxContent/TxContent.tsx index c820da1eb..0d62bb756 100644 --- a/packages/app/src/systems/Transaction/components/TxContent/TxContent.tsx +++ b/packages/app/src/systems/Transaction/components/TxContent/TxContent.tsx @@ -2,7 +2,6 @@ import { Box } from '@fuel-ui/react'; import type { Asset } from '@fuel-wallet/types'; import type { TransactionStatus, TransactionSummary } from 'fuels'; import type { ReactNode } from 'react'; - import type { Maybe } from '~/systems/Core'; import { MotionStack, animations } from '~/systems/Core'; import { TxOperations, TxDetails } from '~/systems/Transaction'; diff --git a/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.test.tsx b/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.test.tsx index 44f5a4990..1ae762c91 100644 --- a/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.test.tsx +++ b/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.test.tsx @@ -1,13 +1,12 @@ import { screen, testA11y } from '@fuel-ui/test-utils'; import { TransactionStatus } from 'fuels'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { MOCK_TX_RECIPIENT } from '../../__mocks__/tx-recipient'; import { TxFromTo } from './TxFromTo'; -import { TestWrapper } from '~/systems/Core'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - const PROPS = { from: MOCK_TX_RECIPIENT.account, to: MOCK_TX_RECIPIENT.contract, diff --git a/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.tsx b/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.tsx index 5065b2073..4f6ed68a5 100644 --- a/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.tsx +++ b/packages/app/src/systems/Transaction/components/TxFromTo/TxFromTo.tsx @@ -2,12 +2,11 @@ import type { ThemeUtilsCSS } from '@fuel-ui/css'; import { cssObj } from '@fuel-ui/css'; import { Box, Icon, Spinner, Tooltip } from '@fuel-ui/react'; import { OperationName, TransactionStatus } from 'fuels'; +import type { Maybe } from '~/systems/Core'; import type { TxRecipientAddress } from '../../types'; import { TxRecipientCard } from '../TxRecipientCard'; -import type { Maybe } from '~/systems/Core'; - type TxSpinnerProps = { status?: Maybe; isLoading?: boolean; diff --git a/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.test.tsx b/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.test.tsx index c2ac2df15..e3f87dfbd 100644 --- a/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.test.tsx +++ b/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.test.tsx @@ -1,4 +1,9 @@ import { screen } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; +import { + renderWithProvider, + testA11yWithProvider, +} from '~/systems/Core/__tests__'; import { MOCK_OPERATION_CONTRACT_CALL, @@ -7,12 +12,6 @@ import { import { TxIcon } from './TxIcon'; -import { TestWrapper } from '~/systems/Core'; -import { - renderWithProvider, - testA11yWithProvider, -} from '~/systems/Core/__tests__'; - describe('TxIcon', () => { it('a11y', async () => { await testA11yWithProvider( diff --git a/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.tsx b/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.tsx index c7a12689a..bfdba7290 100644 --- a/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.tsx +++ b/packages/app/src/systems/Transaction/components/TxIcon/TxIcon.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Icon } from '@fuel-ui/react'; import type { Bech32Address, Operation, TransactionStatus } from 'fuels'; +import { useAccounts } from '~/systems/Account'; import { getTxIconBgColor, getTxIconColor, getTxIcon } from '../../utils'; -import { useAccounts } from '~/systems/Account'; - export type TxIconProps = { operation?: Operation; status?: TransactionStatus; diff --git a/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.test.tsx b/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.test.tsx index db96b6688..6c9e3006a 100644 --- a/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.test.tsx +++ b/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.test.tsx @@ -1,5 +1,6 @@ import { render, screen, testA11y } from '@fuel-ui/test-utils'; import { AssetList } from 'asset-list'; +import { TestWrapper } from '~/systems/Core'; import { MOCK_OPERATION_CONTRACT_CALL, @@ -8,8 +9,6 @@ import { import { TxOperation } from './TxOperation'; -import { TestWrapper } from '~/systems/Core'; - const PROPS = { operation: MOCK_OPERATION_CONTRACT_CALL, assets: AssetList, diff --git a/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.tsx b/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.tsx index 074ef5dc1..ee26693da 100644 --- a/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.tsx +++ b/packages/app/src/systems/Transaction/components/TxOperation/TxOperation.tsx @@ -2,13 +2,12 @@ import { cssObj } from '@fuel-ui/css'; import { Card } from '@fuel-ui/react'; import type { Asset } from '@fuel-wallet/types'; import type { Operation, TransactionStatus } from 'fuels'; +import { AssetsAmount } from '~/systems/Asset'; +import type { Maybe } from '~/systems/Core'; import { FunctionCalls } from '../FunctionCalls'; import { TxFromTo } from '../TxFromTo/TxFromTo'; -import { AssetsAmount } from '~/systems/Asset'; -import type { Maybe } from '~/systems/Core'; - export type TxOperationProps = { operation?: Operation; status?: Maybe; diff --git a/packages/app/src/systems/Transaction/components/TxOperations/TxOperations.tsx b/packages/app/src/systems/Transaction/components/TxOperations/TxOperations.tsx index 5616f64c5..c6962ff64 100644 --- a/packages/app/src/systems/Transaction/components/TxOperations/TxOperations.tsx +++ b/packages/app/src/systems/Transaction/components/TxOperations/TxOperations.tsx @@ -1,11 +1,10 @@ import { Box } from '@fuel-ui/react'; import type { Asset } from '@fuel-wallet/types'; import type { Operation, TransactionStatus } from 'fuels'; +import type { Maybe } from '~/systems/Core'; import { TxOperation } from '../TxOperation/TxOperation'; -import type { Maybe } from '~/systems/Core'; - export type TxOperationsProps = { operations?: Operation[]; status?: Maybe; diff --git a/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.test.tsx b/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.test.tsx index 9d1288845..f2af2e629 100644 --- a/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.test.tsx +++ b/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.test.tsx @@ -1,12 +1,11 @@ import { screen, testA11y } from '@fuel-ui/test-utils'; +import { TestWrapper } from '~/systems/Core'; +import { renderWithProvider } from '~/systems/Core/__tests__'; import { MOCK_TX_RECIPIENT } from '../../__mocks__/tx-recipient'; import { TxRecipientCard } from './TxRecipientCard'; -import { TestWrapper } from '~/systems/Core'; -import { renderWithProvider } from '~/systems/Core/__tests__'; - const { account: ACCOUNT, contract: CONTRACT } = MOCK_TX_RECIPIENT; describe('TxRecipientCard', () => { diff --git a/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.tsx b/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.tsx index dfb4fd403..229439da2 100644 --- a/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.tsx +++ b/packages/app/src/systems/Transaction/components/TxRecipientCard/TxRecipientCard.tsx @@ -4,11 +4,10 @@ import { AddressType } from '@fuel-wallet/types'; import type { OperationTransactionAddress } from 'fuels'; import { Address, ChainName, isB256, isBech32 } from 'fuels'; import type { FC } from 'react'; +import { EthAddress, FuelAddress, useAccounts } from '~/systems/Account'; import { TxRecipientCardLoader } from './TxRecipientCardLoader'; -import { EthAddress, FuelAddress, useAccounts } from '~/systems/Account'; - export type TxRecipientCardProps = { recipient?: OperationTransactionAddress; isReceiver?: boolean; diff --git a/packages/app/src/systems/Transaction/hooks/useExplorerLink.tsx b/packages/app/src/systems/Transaction/hooks/useExplorerLink.tsx index 92d129702..1bd960c81 100644 --- a/packages/app/src/systems/Transaction/hooks/useExplorerLink.tsx +++ b/packages/app/src/systems/Transaction/hooks/useExplorerLink.tsx @@ -1,6 +1,5 @@ import { getBlockExplorerLink } from '@fuel-wallet/sdk'; import { useCallback } from 'react'; - import { IS_CRX } from '~/config'; import { openTab } from '~/systems/CRX/utils'; diff --git a/packages/app/src/systems/Transaction/hooks/useTxMetadata.tsx b/packages/app/src/systems/Transaction/hooks/useTxMetadata.tsx index cf7f61d0f..1a0ecbc21 100644 --- a/packages/app/src/systems/Transaction/hooks/useTxMetadata.tsx +++ b/packages/app/src/systems/Transaction/hooks/useTxMetadata.tsx @@ -1,12 +1,11 @@ import type { Bech32Address, Operation, TransactionSummary } from 'fuels'; import { Address, OperationName } from 'fuels'; import { useMemo } from 'react'; +import { useAccounts } from '~/systems/Account'; import { OperationDirection } from '../types'; import { formatDate, getOperationDirection } from '../utils'; -import { useAccounts } from '~/systems/Account'; - type UseTxMetadataProps = { transaction: TransactionSummary; ownerAddress: string; diff --git a/packages/app/src/systems/Transaction/machines/transactionHistoryMachine.tsx b/packages/app/src/systems/Transaction/machines/transactionHistoryMachine.tsx index 3d70239aa..15a4f84b8 100644 --- a/packages/app/src/systems/Transaction/machines/transactionHistoryMachine.tsx +++ b/packages/app/src/systems/Transaction/machines/transactionHistoryMachine.tsx @@ -2,12 +2,11 @@ import type { TransactionResult } from 'fuels'; import { isB256, isBech32 } from 'fuels'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import { TxService } from '../services'; - import { FetchMachine } from '~/systems/Core'; import { NetworkService } from '~/systems/Network'; +import { TxService } from '../services'; + export const TRANSACTION_HISTORY_ERRORS = { INVALID_ADDRESS: 'Invalid address', NOT_FOUND: 'Address Transaction history not found', diff --git a/packages/app/src/systems/Transaction/machines/transactionMachine.test.tsx b/packages/app/src/systems/Transaction/machines/transactionMachine.test.tsx index d0f5f2af7..7de3201e6 100644 --- a/packages/app/src/systems/Transaction/machines/transactionMachine.test.tsx +++ b/packages/app/src/systems/Transaction/machines/transactionMachine.test.tsx @@ -1,6 +1,7 @@ import { graphql } from 'msw'; import { interpret } from 'xstate'; import { waitFor } from 'xstate/lib/waitFor'; +import { mockServer } from '~/mocks/server'; import { MOCK_CHAIN_GQL } from '../__mocks__/chain'; import { MOCK_TRANSACTION_WITH_RECEIPTS_GQL } from '../__mocks__/transaction'; @@ -8,8 +9,6 @@ import { MOCK_TRANSACTION_WITH_RECEIPTS_GQL } from '../__mocks__/transaction'; import type { TransactionMachineService } from './transactionMachine'; import { transactionMachine } from './transactionMachine'; -import { mockServer } from '~/mocks/server'; - const TRANSACTION_ID = '0x64641e1faeb1b0052d95e055b085b45b85155a7ec8cc47b1c6b7ed9f2783837a'; diff --git a/packages/app/src/systems/Transaction/machines/transactionMachine.tsx b/packages/app/src/systems/Transaction/machines/transactionMachine.tsx index a8f10a371..1629f7619 100644 --- a/packages/app/src/systems/Transaction/machines/transactionMachine.tsx +++ b/packages/app/src/systems/Transaction/machines/transactionMachine.tsx @@ -2,12 +2,11 @@ import type { TransactionResponse, TransactionResult } from 'fuels'; import { isB256 } from 'fuels'; import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - -import { TxService } from '../services'; - import { FetchMachine } from '~/systems/Core'; import { NetworkService } from '~/systems/Network'; +import { TxService } from '../services'; + export const TRANSACTION_ERRORS = { INVALID_ID: 'Invalid transaction ID', NOT_FOUND: 'Transaction not found', diff --git a/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.stories.tsx b/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.stories.tsx index 185f1dbe8..0afd6d67b 100644 --- a/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.stories.tsx +++ b/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.stories.tsx @@ -2,14 +2,13 @@ import { Box, Button } from '@fuel-ui/react'; import type { StoryFn, Meta } from '@storybook/react'; import { Wallet } from 'fuels'; import { useEffect } from 'react'; - -import { TxApprove } from './TxApprove'; - import { Layout } from '~/systems/Core'; import { useTransactionRequest } from '~/systems/DApp'; import { sendLoader } from '~/systems/Send/__mocks__/send'; import { store } from '~/systems/Store'; +import { TxApprove } from './TxApprove'; + const wallet = Wallet.generate(); export default { diff --git a/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.tsx b/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.tsx index dbd807025..f9b080e0c 100644 --- a/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.tsx +++ b/packages/app/src/systems/Transaction/pages/TxApprove/TxApprove.tsx @@ -1,7 +1,6 @@ import { cssObj } from '@fuel-ui/css'; import { Alert, Button, Dialog } from '@fuel-ui/react'; import { useNavigate } from 'react-router-dom'; - import { useAssets } from '~/systems/Asset'; import { Pages } from '~/systems/Core'; import { coreStyles } from '~/systems/Core/styles'; diff --git a/packages/app/src/systems/Transaction/pages/TxView/TxView.stories.tsx b/packages/app/src/systems/Transaction/pages/TxView/TxView.stories.tsx index febf626c3..27c0c2a36 100644 --- a/packages/app/src/systems/Transaction/pages/TxView/TxView.stories.tsx +++ b/packages/app/src/systems/Transaction/pages/TxView/TxView.stories.tsx @@ -1,14 +1,13 @@ import { graphql } from 'msw'; import { Route, Routes } from 'react-router-dom'; +import { Pages } from '~/systems/Core'; +import { NetworkService } from '~/systems/Network'; +import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; import { MOCK_TRANSACTION_WITH_RECEIPTS_GQL } from '../../__mocks__/transaction'; import { TxView } from './TxView'; -import { Pages } from '~/systems/Core'; -import { NetworkService } from '~/systems/Network'; -import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; - const TxViewStory = ({ txId }: { txId: string }) => { return ( diff --git a/packages/app/src/systems/Transaction/pages/TxView/TxView.tsx b/packages/app/src/systems/Transaction/pages/TxView/TxView.tsx index 0affba909..19a39e60a 100644 --- a/packages/app/src/systems/Transaction/pages/TxView/TxView.tsx +++ b/packages/app/src/systems/Transaction/pages/TxView/TxView.tsx @@ -1,13 +1,12 @@ import { useNavigate, useParams } from 'react-router-dom'; +import { useAssets } from '~/systems/Asset'; +import { Layout } from '~/systems/Core'; +import { useNetworks } from '~/systems/Network'; import { TxHeader, TxStatusAlert } from '../../components'; import { TxContent } from '../../components/TxContent'; import { useTxResult } from '../../hooks'; -import { useAssets } from '~/systems/Asset'; -import { Layout } from '~/systems/Core'; -import { useNetworks } from '~/systems/Network'; - export function TxView() { const txIdQueryParam = useParams<{ txId: string }>().txId; const networks = useNetworks(); diff --git a/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.stories.tsx b/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.stories.tsx index 4b2f2caa4..ad1f569d6 100644 --- a/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.stories.tsx +++ b/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.stories.tsx @@ -1,13 +1,12 @@ import { graphql } from 'msw'; +import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; +import { NetworkService } from '~/systems/Network'; +import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; import { MOCK_TRANSACTIONS_BY_OWNER } from '../../__mocks__/transactions'; import { ViewActivity } from './ViewActivity'; -import { AccountService, MOCK_ACCOUNTS } from '~/systems/Account'; -import { NetworkService } from '~/systems/Network'; -import { MOCK_NETWORKS } from '~/systems/Network/__mocks__/networks'; - export default { component: ViewActivity, title: 'Transaction/Pages/ViewActivity', diff --git a/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.tsx b/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.tsx index 44b6968e7..7d33a076f 100644 --- a/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.tsx +++ b/packages/app/src/systems/Transaction/pages/ViewActivity/ViewActivity.tsx @@ -1,14 +1,13 @@ import { Box } from '@fuel-ui/react'; import { Address } from 'fuels'; import { useNavigate } from 'react-router-dom'; - -import { ActivityList } from '../../components/ActivityList/ActivityList'; -import { useTransactionHistory } from '../../hooks'; - import { useAccounts } from '~/systems/Account'; import { Layout, Pages } from '~/systems/Core'; import { useNetworks } from '~/systems/Network'; +import { ActivityList } from '../../components/ActivityList/ActivityList'; +import { useTransactionHistory } from '../../hooks'; + export function ViewActivity() { const navigate = useNavigate(); const networks = useNetworks(); diff --git a/packages/app/src/systems/Transaction/services/transaction.test.ts b/packages/app/src/systems/Transaction/services/transaction.test.ts index 58c59e14f..15117468d 100644 --- a/packages/app/src/systems/Transaction/services/transaction.test.ts +++ b/packages/app/src/systems/Transaction/services/transaction.test.ts @@ -1,10 +1,9 @@ import type { WalletUnlocked } from 'fuels'; import { TransactionType, bn, ScriptTransactionRequest, Wallet } from 'fuels'; +import { VITE_FUEL_PROVIDER_URL } from '~/config'; import { TxService } from './transaction'; -import { VITE_FUEL_PROVIDER_URL } from '~/config'; - const OWNER = import.meta.env.VITE_ADDR_OWNER; const amount = bn(1); const params = { gasLimit: bn(100000), gasPrice: bn(100000) }; diff --git a/packages/app/src/systems/Transaction/services/transaction.tsx b/packages/app/src/systems/Transaction/services/transaction.tsx index 45f17535e..ce036d856 100644 --- a/packages/app/src/systems/Transaction/services/transaction.tsx +++ b/packages/app/src/systems/Transaction/services/transaction.tsx @@ -19,15 +19,14 @@ import { getTransactionsSummaries, getTransactionSummaryFromRequest, } from 'fuels'; - -import type { Transaction } from '../types'; -import { getAbiMap } from '../utils'; - import { AccountService } from '~/systems/Account'; import { isEth } from '~/systems/Asset'; import { db, uniqueId, WalletLockedCustom } from '~/systems/Core'; import { NetworkService } from '~/systems/Network'; +import type { Transaction } from '../types'; +import { getAbiMap } from '../utils'; + export type TxInputs = { get: { id: string; diff --git a/packages/app/src/systems/Transaction/utils/abi.ts b/packages/app/src/systems/Transaction/utils/abi.ts index d82d1686b..ed99e6adc 100644 --- a/packages/app/src/systems/Transaction/utils/abi.ts +++ b/packages/app/src/systems/Transaction/utils/abi.ts @@ -1,6 +1,5 @@ import type { Input, InputContract, JsonAbi } from 'fuels'; import { InputType, getInputsByType } from 'fuels'; - import { AbiService } from '~/systems/Settings/services'; export async function getAbiMap({ @@ -21,7 +20,6 @@ export async function getAbiMap({ ); const abiMap = abis.reduce((prev, abi, index) => { if (abi) { - // eslint-disable-next-line no-param-reassign prev[contractIds[index]] = abi; } diff --git a/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.stories.tsx b/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.stories.tsx index 421b5a3cd..fa68aab80 100644 --- a/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.stories.tsx +++ b/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.stories.tsx @@ -1,10 +1,9 @@ import { Box, Button } from '@fuel-ui/react'; - -import { ResetDialog } from './ResetDialog'; - import { createMockAccount } from '~/systems/Account/__mocks__'; import { useOverlay } from '~/systems/Overlay'; +import { ResetDialog } from './ResetDialog'; + export default { component: ResetDialog, title: 'Unlock/Components/ResetDialog', diff --git a/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.tsx b/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.tsx index b48970283..54f59229c 100644 --- a/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.tsx +++ b/packages/app/src/systems/Unlock/components/ResetDialog/ResetDialog.tsx @@ -10,12 +10,11 @@ import { Text, } from '@fuel-ui/react'; import { useState } from 'react'; - -import { useUnlock } from '../../hooks'; - import { WALLET_HEIGHT, WALLET_WIDTH } from '~/config'; import { OverlayDialogTopbar, useOverlay } from '~/systems/Overlay'; +import { useUnlock } from '../../hooks'; + export function ResetDialog() { const [isSavedChecked, setSavedChecked] = useState(false); const overlay = useOverlay(); diff --git a/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.stories.tsx b/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.stories.tsx index 0a1c2deb2..10348f3e8 100644 --- a/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.stories.tsx +++ b/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.stories.tsx @@ -1,7 +1,7 @@ -import { UnlockCard } from './UnlockCard'; - import { createMockAccount } from '~/systems/Account/__mocks__'; +import { UnlockCard } from './UnlockCard'; + export default { component: UnlockCard, title: 'Unlock/Components/UnlockDialog', diff --git a/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.tsx b/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.tsx index ffe704b07..ab1b3b8dc 100644 --- a/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.tsx +++ b/packages/app/src/systems/Unlock/components/UnlockCard/UnlockCard.tsx @@ -10,13 +10,12 @@ import { IconButton, Text, } from '@fuel-ui/react'; +import { store } from '~/store'; import type { UnlockFormValues } from '../../hooks'; import { useUnlockForm } from '../../hooks'; import { UnlockForm } from '../UnlockForm'; -import { store } from '~/store'; - export type UnlockDialogProps = { unlockError?: string; onUnlock: (value: string) => void; diff --git a/packages/app/src/systems/Unlock/components/UnlockForm/UnlockForm.tsx b/packages/app/src/systems/Unlock/components/UnlockForm/UnlockForm.tsx index ee41385c6..2603fcf44 100644 --- a/packages/app/src/systems/Unlock/components/UnlockForm/UnlockForm.tsx +++ b/packages/app/src/systems/Unlock/components/UnlockForm/UnlockForm.tsx @@ -1,9 +1,8 @@ import { InputPassword } from '@fuel-ui/react'; +import { ControlledField } from '~/systems/Core'; import type { UseUnlockFormReturn } from '../../hooks/useUnlockForm'; -import { ControlledField } from '~/systems/Core'; - type UnlockFormProps = { form: UseUnlockFormReturn; }; diff --git a/packages/app/src/systems/Unlock/hooks/useUnlock.tsx b/packages/app/src/systems/Unlock/hooks/useUnlock.tsx index 886324fe8..e6115467a 100644 --- a/packages/app/src/systems/Unlock/hooks/useUnlock.tsx +++ b/packages/app/src/systems/Unlock/hooks/useUnlock.tsx @@ -1,10 +1,9 @@ import { useEffect } from 'react'; - -import type { UnlockMachineState } from '../machines'; - import { store, Services } from '~/store'; import { VaultService } from '~/systems/Vault'; +import type { UnlockMachineState } from '../machines'; + const selectors = { error(state: UnlockMachineState) { return state.context.error; diff --git a/packages/app/src/systems/Unlock/machines/unlockMachine.test.tsx b/packages/app/src/systems/Unlock/machines/unlockMachine.test.tsx index f3f3ae410..dee4fb18e 100644 --- a/packages/app/src/systems/Unlock/machines/unlockMachine.test.tsx +++ b/packages/app/src/systems/Unlock/machines/unlockMachine.test.tsx @@ -1,11 +1,10 @@ import { interpret } from 'xstate'; +import { MOCK_ACCOUNTS } from '~/systems/Account/__mocks__/accounts'; +import { expectStateMatch } from '~/systems/Core/__tests__/utils'; import type { UnlockMachineService } from './unlockMachine'; import { unlockMachine } from './unlockMachine'; -import { MOCK_ACCOUNTS } from '~/systems/Account/__mocks__/accounts'; -import { expectStateMatch } from '~/systems/Core/__tests__/utils'; - describe('unlockMachine', () => { let service: UnlockMachineService; const account = MOCK_ACCOUNTS[0]; diff --git a/packages/app/src/systems/Unlock/machines/unlockMachine.tsx b/packages/app/src/systems/Unlock/machines/unlockMachine.tsx index 54d9a2873..f67de029a 100644 --- a/packages/app/src/systems/Unlock/machines/unlockMachine.tsx +++ b/packages/app/src/systems/Unlock/machines/unlockMachine.tsx @@ -1,6 +1,5 @@ import type { InterpreterFrom, StateFrom } from 'xstate'; import { assign, createMachine } from 'xstate'; - import { CoreService } from '~/systems/Core'; import { FetchMachine } from '~/systems/Core/machines'; import type { VaultInputs } from '~/systems/Vault'; diff --git a/packages/app/src/systems/Unlock/pages/Unlock.tsx b/packages/app/src/systems/Unlock/pages/Unlock.tsx index 19ab01d1e..fa695588e 100644 --- a/packages/app/src/systems/Unlock/pages/Unlock.tsx +++ b/packages/app/src/systems/Unlock/pages/Unlock.tsx @@ -1,10 +1,9 @@ import { Box } from '@fuel-ui/react'; +import { Layout } from '~/systems/Core'; import { UnlockCard } from '../components/UnlockCard'; import { useUnlock } from '../hooks'; -import { Layout } from '~/systems/Core'; - export function UnlockPage() { const { isLoading, error, handlers } = useUnlock(); diff --git a/packages/app/src/systems/Vault/connectors/VaultWebConnector.ts b/packages/app/src/systems/Vault/connectors/VaultWebConnector.ts index 01bcff7ac..a0f25ed77 100644 --- a/packages/app/src/systems/Vault/connectors/VaultWebConnector.ts +++ b/packages/app/src/systems/Vault/connectors/VaultWebConnector.ts @@ -1,11 +1,10 @@ import type { JSONRPCRequest } from 'json-rpc-2.0'; +import { IS_DEVELOPMENT, IS_TEST } from '~/config'; +import { VaultServer } from '~/systems/Vault/services/VaultServer'; import { mockUnlock } from '../__mocks__/mockUnlock'; import type { VaultClient } from '../services/VaultClient'; -import { IS_DEVELOPMENT, IS_TEST } from '~/config'; -import { VaultServer } from '~/systems/Vault/services/VaultServer'; - export class VaultWebConnector { vault: VaultServer; readonly clientVault: VaultClient; diff --git a/packages/app/src/systems/Vault/services/VaultClient.ts b/packages/app/src/systems/Vault/services/VaultClient.ts index 0575be69c..eceb1372f 100644 --- a/packages/app/src/systems/Vault/services/VaultClient.ts +++ b/packages/app/src/systems/Vault/services/VaultClient.ts @@ -1,13 +1,12 @@ import EventEmitter from 'events'; import type { JSONRPCParams, JSONRPCRequest } from 'json-rpc-2.0'; import { JSONRPCClient } from 'json-rpc-2.0'; +import { IS_CRX } from '~/config'; import { VaultCRXConnector, VaultWebConnector } from '../connectors'; import { VaultServer } from './VaultServer'; -import { IS_CRX } from '~/config'; - export class VaultClient extends EventEmitter { readonly client: JSONRPCClient; diff --git a/packages/app/src/systems/Vault/services/VaultServer.ts b/packages/app/src/systems/Vault/services/VaultServer.ts index cbf9db089..2f80c33ab 100644 --- a/packages/app/src/systems/Vault/services/VaultServer.ts +++ b/packages/app/src/systems/Vault/services/VaultServer.ts @@ -2,7 +2,6 @@ import { WalletManager } from '@fuel-ts/wallet-manager'; import EventEmitter from 'events'; import { transactionRequestify, Address } from 'fuels'; import { JSONRPCServer } from 'json-rpc-2.0'; - import { IndexedDBStorage } from '~/systems/Account/utils/storage'; export type VaultAccount = { diff --git a/packages/app/src/vite-env.d.ts b/packages/app/src/vite-env.d.ts index b1403ea5c..da4a46498 100644 --- a/packages/app/src/vite-env.d.ts +++ b/packages/app/src/vite-env.d.ts @@ -21,6 +21,10 @@ declare module '*?script&module' { const src: string; export default src; } +declare module '*.svg' { + const src: string; + export default src; +} // Add script importing declare module '*?script' { diff --git a/packages/app/tsconfig.json b/packages/app/tsconfig.json index 242e7f1fb..7095057d8 100644 --- a/packages/app/tsconfig.json +++ b/packages/app/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "compilerOptions": { "keyofStringsOnly": true, "ignoreDeprecations": "5.0", diff --git a/packages/app/vite-utils/vite.base.config.ts b/packages/app/vite-utils/vite.base.config.ts index 2eb8adda6..f1f5a9500 100644 --- a/packages/app/vite-utils/vite.base.config.ts +++ b/packages/app/vite-utils/vite.base.config.ts @@ -16,7 +16,6 @@ export function resolveLinkDeps() { alias: linkDeps.reduce((obj, dep) => { // remove TS SDK as it's not needed to resolve alias anymore. if (!/^fuels?|@fuel-ts/.test(dep)) { - // eslint-disable-next-line no-param-reassign obj[dep] = path.resolve( __dirname, `../node_modules/${dep}/dist/index.mjs` diff --git a/packages/asset-list/tsconfig.json b/packages/asset-list/tsconfig.json index fbc6c7528..ed254f204 100644 --- a/packages/asset-list/tsconfig.json +++ b/packages/asset-list/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist", "baseUrl": ".", diff --git a/packages/config/index.js b/packages/config/index.js deleted file mode 100644 index 88048fb37..000000000 --- a/packages/config/index.js +++ /dev/null @@ -1,96 +0,0 @@ -const path = require('path'); - -const resolveDir = (dir) => path.resolve(__dirname, dir); -const resolveRoot = (dir = '') => resolveDir(path.join('../../', dir)); - -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: resolveRoot(), - project: [ - resolveRoot('./tsconfig.eslint.json'), - resolveRoot('./**/**/tsconfig.json'), - ], - ecmaVersion: 2020, - sourceType: 'module', - ecmaFeatures: { - jsx: true, - }, - }, - plugins: ['@typescript-eslint', 'testing-library', 'jest-dom'], - extends: [ - 'airbnb-base', - 'airbnb-typescript/base', - 'plugin:@typescript-eslint/recommended', - 'plugin:eslint-comments/recommended', - 'plugin:react/recommended', - 'prettier', - ], - settings: { - react: { - version: 'detect', - }, - }, - rules: { - '@typescript-eslint/no-shadow': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/consistent-type-imports': 2, - '@typescript-eslint/lines-between-class-members': [ - 'error', - 'always', - { exceptAfterSingleLine: true }, - ], - '@typescript-eslint/no-inferrable-types': 'off', - '@typescript-eslint/no-var-requires': 'off', - 'class-methods-use-this': 'off', - 'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], - 'eslint-comments/no-unused-disable': 'error', - 'import/extensions': 'off', - 'import/no-extraneous-dependencies': ['error', { devDependencies: true }], - 'import/order': [ - 'error', - { - groups: [ - ['builtin', 'external', 'internal'], - ['parent'], - ['sibling', 'index'], - ], - 'newlines-between': 'always', - alphabetize: { order: 'asc' }, - }, - ], - 'import/prefer-default-export': 'off', - 'arrow-body-style': 'off', - 'no-await-in-loop': 0, - 'no-bitwise': 0, - 'no-underscore-dangle': 'off', - 'prefer-destructuring': 0, - 'react/display-name': 'off', - 'react/prop-types': 'off', - 'react/react-in-jsx-scope': 'off', - '@typescript-eslint/no-unused-vars': [ - 'error', - { - vars: 'all', - args: 'after-used', - ignoreRestSiblings: false, - varsIgnorePattern: '^_', - argsIgnorePattern: '^_', - }, - ], - }, - // Disable no-unused-expressions to allow chai 'expect' expressions in testing - overrides: [ - { - files: ['*.test.{ts,tsx}'], - env: { - jest: true, - }, - rules: { - '@typescript-eslint/no-unused-expressions': 'off', - 'import/no-extraneous-dependencies': 'off', - }, - }, - ], -}; diff --git a/packages/config/package.json b/packages/config/package.json deleted file mode 100644 index 8bd5fe6d9..000000000 --- a/packages/config/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@fuel-wallet/config", - "private": true, - "version": "0.0.1", - "license": "Apache-2.0", - "main": "./index.js", - "publishConfig": { - "access": "public", - "files": [ - "./index.js" - ] - }, - "dependencies": { - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", - "eslint": "^8.47.0", - "eslint-config-airbnb-base": "^15.0.0", - "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jest-dom": "^5.0.2", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^5.0.0", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-testing-library": "^5.11.1", - "prettier": "2.8.8", - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "typescript": "^5.1.6" - } -} diff --git a/packages/docs/.eslintrc.js b/packages/docs/.eslintrc.js deleted file mode 100644 index b0d5be14b..000000000 --- a/packages/docs/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -const nextConfig = require('eslint-config-next'); -const path = require('path'); - -const config = require('../config'); - -const resolveRoot = (dir = '') => path.resolve(__dirname, dir); - -module.exports = { - ...config, - parserOptions: { - ...config.parserOptions, - tsConfigRootDir: resolveRoot(), - project: [ - resolveRoot('../../tsconfig.eslint.json'), - resolveRoot('./tsconfig.json'), - ], - }, - rules: { - ...config.rules, - 'import/no-cycle': 'off', - 'import/order': config.rules['import/order'], - }, -}; diff --git a/packages/docs/examples/AddAbi.tsx b/packages/docs/examples/AddAbi.tsx index f71020239..61261901b 100644 --- a/packages/docs/examples/AddAbi.tsx +++ b/packages/docs/examples/AddAbi.tsx @@ -2,17 +2,16 @@ import { cssObj } from '@fuel-ui/css'; import { Input, Box, Button, Link, Text, Tag } from '@fuel-ui/react'; import { useState } from 'react'; - -import SWAY_SWAP_ABI from './data/swayswap/abi.json'; -import { SWAY_SWAP_CONTRACT_ID } from './data/swayswap/contractId'; -import { docStyles } from './styles'; - import type { AbiMap } from '~/../types/src'; import { ExampleBox } from '~/src/components/ExampleBox'; import { useFuel } from '~/src/hooks/useFuel'; import { useIsConnected } from '~/src/hooks/useIsConnected'; import { useLoading } from '~/src/hooks/useLoading'; +import SWAY_SWAP_ABI from './data/swayswap/abi.json'; +import { SWAY_SWAP_CONTRACT_ID } from './data/swayswap/contractId'; +import { docStyles } from './styles'; + export function AddAbi() { const [fuel, notDetected] = useFuel(); const [isConnected] = useIsConnected(); diff --git a/packages/docs/examples/AddAssets.tsx b/packages/docs/examples/AddAssets.tsx index 4ab105af3..746c79e88 100644 --- a/packages/docs/examples/AddAssets.tsx +++ b/packages/docs/examples/AddAssets.tsx @@ -3,7 +3,6 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Button, Input, Text, IconButton, Icon } from '@fuel-ui/react'; import { useState } from 'react'; -// eslint-disable-next-line import/no-relative-packages import type { Asset } from '../../types/src'; import { ExampleBox } from '../src/components/ExampleBox'; import { useFuel } from '../src/hooks/useFuel'; diff --git a/packages/docs/examples/AddNetwork.tsx b/packages/docs/examples/AddNetwork.tsx index 630ce6eac..8acba7245 100644 --- a/packages/docs/examples/AddNetwork.tsx +++ b/packages/docs/examples/AddNetwork.tsx @@ -3,7 +3,6 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Button, Input, Text } from '@fuel-ui/react'; import { useState } from 'react'; -// eslint-disable-next-line import/no-relative-packages import type { Network } from '../../types/src'; import { ExampleBox } from '../src/components/ExampleBox'; import { useFuel } from '../src/hooks/useFuel'; diff --git a/packages/docs/examples/Connectors.tsx b/packages/docs/examples/Connectors.tsx index 44fd23549..fc3c5b836 100644 --- a/packages/docs/examples/Connectors.tsx +++ b/packages/docs/examples/Connectors.tsx @@ -1,7 +1,6 @@ /* eslint-disable no-console */ import { Box, Button, Input } from '@fuel-ui/react'; import { useEffect, useState } from 'react'; - import type { FuelWalletConnector } from '~/../types/src'; import { ExampleBox } from '~/src/components/ExampleBox'; import { useFuel } from '~/src/hooks/useFuel'; diff --git a/packages/docs/examples/Network.tsx b/packages/docs/examples/Network.tsx index de6f6f50e..d7032a73b 100644 --- a/packages/docs/examples/Network.tsx +++ b/packages/docs/examples/Network.tsx @@ -3,7 +3,6 @@ import { cssObj } from '@fuel-ui/css'; import { Button, Box, Tag, Text } from '@fuel-ui/react'; import { useState } from 'react'; -// eslint-disable-next-line import/no-relative-packages import type { FuelProviderConfig } from '../../types/src'; import { ExampleBox } from '../src/components/ExampleBox'; import { useFuel } from '../src/hooks/useFuel'; diff --git a/packages/docs/package.json b/packages/docs/package.json index 041969cdc..c697a147e 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -25,7 +25,7 @@ "acorn-walk": "^8.2.0", "dotenv": "^16.3.1", "framer-motion": "^10.16.1", - "fuels": "0.56.1", + "fuels": "0.57.0", "globby": "^13.2.2", "gray-matter": "^4.0.3", "hast-util-heading-rank": "^3.0.0", diff --git a/packages/docs/src/components/Breadcrumb.tsx b/packages/docs/src/components/Breadcrumb.tsx index c4a1b29ab..f04eb59b0 100644 --- a/packages/docs/src/components/Breadcrumb.tsx +++ b/packages/docs/src/components/Breadcrumb.tsx @@ -1,6 +1,5 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Icon, Text } from '@fuel-ui/react'; - import type { DocType } from '~/src/types'; type BreadcrumbProps = { diff --git a/packages/docs/src/components/CodeImport.tsx b/packages/docs/src/components/CodeImport.tsx index 68b670a71..341e676d7 100644 --- a/packages/docs/src/components/CodeImport.tsx +++ b/packages/docs/src/components/CodeImport.tsx @@ -1,10 +1,9 @@ import { cssObj } from '@fuel-ui/css'; import { Link } from '@fuel-ui/react'; +import { REPO_LINK } from '~/src/constants'; import { Pre } from './Pre'; -import { REPO_LINK } from '~/src/constants'; - export type CodeImportProps = { file: string; lines?: number[]; diff --git a/packages/docs/src/components/DocFooter.tsx b/packages/docs/src/components/DocFooter.tsx index 5a77e76fc..bbf16695f 100644 --- a/packages/docs/src/components/DocFooter.tsx +++ b/packages/docs/src/components/DocFooter.tsx @@ -1,7 +1,6 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Icon } from '@fuel-ui/react'; import Link from 'next/link'; - import { useDocContext } from '~/src/hooks/useDocContext'; export function DocFooter() { diff --git a/packages/docs/src/components/Search.tsx b/packages/docs/src/components/Search.tsx index f5002a331..265307314 100644 --- a/packages/docs/src/components/Search.tsx +++ b/packages/docs/src/components/Search.tsx @@ -1,5 +1,4 @@ import { DocSearch } from '@docsearch/react'; - import docsearch from '~/docsearch.json'; export function Search() { diff --git a/packages/docs/src/components/Sidebar.tsx b/packages/docs/src/components/Sidebar.tsx index 996d40344..b92f8e18c 100644 --- a/packages/docs/src/components/Sidebar.tsx +++ b/packages/docs/src/components/Sidebar.tsx @@ -1,11 +1,10 @@ import { cssObj } from '@fuel-ui/css'; import { Box } from '@fuel-ui/react'; +import { useDocContext } from '~/src/hooks/useDocContext'; import { SidebarLink } from './SidebarLink'; import { SidebarSubmenu } from './SidebarSubmenu'; -import { useDocContext } from '~/src/hooks/useDocContext'; - export function Sidebar() { const { links } = useDocContext(); return ( diff --git a/packages/docs/src/components/SidebarLink.tsx b/packages/docs/src/components/SidebarLink.tsx index 15e39040d..1042f7ed7 100644 --- a/packages/docs/src/components/SidebarLink.tsx +++ b/packages/docs/src/components/SidebarLink.tsx @@ -5,7 +5,6 @@ import { Box } from '@fuel-ui/react'; import NextLink from 'next/link'; import { usePathname } from 'next/navigation'; import { forwardRef } from 'react'; - import type { SidebarLinkItem } from '~/src/types'; const Link = styled(Box, { diff --git a/packages/docs/src/components/SidebarSubmenu.tsx b/packages/docs/src/components/SidebarSubmenu.tsx index 0ff238127..94ac8837c 100644 --- a/packages/docs/src/components/SidebarSubmenu.tsx +++ b/packages/docs/src/components/SidebarSubmenu.tsx @@ -2,11 +2,10 @@ import { cssObj, cx } from '@fuel-ui/css'; import { Box, Button, Icon, List } from '@fuel-ui/react'; import { usePathname } from 'next/navigation'; import { useState } from 'react'; +import type { SidebarLinkItem } from '~/src/types'; import { SidebarLink } from './SidebarLink'; -import type { SidebarLinkItem } from '~/src/types'; - type SidebarSubmenuProps = SidebarLinkItem; export function SidebarSubmenu({ diff --git a/packages/docs/src/components/TableOfContent.tsx b/packages/docs/src/components/TableOfContent.tsx index 0095f4636..fd3fcf7eb 100644 --- a/packages/docs/src/components/TableOfContent.tsx +++ b/packages/docs/src/components/TableOfContent.tsx @@ -1,6 +1,5 @@ import { cssObj } from '@fuel-ui/css'; import { Box, Heading, Link, List, Text } from '@fuel-ui/react'; - import { useDocContext } from '~/src/hooks/useDocContext'; export function TableOfContent() { diff --git a/packages/docs/src/hooks/useDocContext.tsx b/packages/docs/src/hooks/useDocContext.tsx index 53c693e8f..84c61f015 100644 --- a/packages/docs/src/hooks/useDocContext.tsx +++ b/packages/docs/src/hooks/useDocContext.tsx @@ -1,6 +1,5 @@ import { createContext, useContext } from 'react'; import type { ReactNode } from 'react'; - import type { SidebarLinkItem, DocType } from '~/src/types'; export type DocCtx = { diff --git a/packages/docs/src/lib/api.ts b/packages/docs/src/lib/api.ts index 9009bef0b..3bed65770 100644 --- a/packages/docs/src/lib/api.ts +++ b/packages/docs/src/lib/api.ts @@ -5,13 +5,12 @@ import { serialize } from 'next-mdx-remote/serialize'; import { join } from 'path'; import remarkGfm from 'remark-gfm'; import remarkSlug from 'remark-slug'; +import { DOCS_REPO_LINK, FIELDS } from '~/src/constants'; +import type { DocType, NodeHeading, SidebarLinkItem } from '~/src/types'; import { codeImport } from './code-import'; import { rehypeExtractHeadings } from './toc'; -import { DOCS_REPO_LINK, FIELDS } from '~/src/constants'; -import type { DocType, NodeHeading, SidebarLinkItem } from '~/src/types'; - const DOCS_DIRECTORY = join(process.cwd(), './docs'); export async function getDocsSlugs() { diff --git a/packages/docs/src/lib/code-import.ts b/packages/docs/src/lib/code-import.ts index e33bd6fc6..30d57168e 100644 --- a/packages/docs/src/lib/code-import.ts +++ b/packages/docs/src/lib/code-import.ts @@ -139,7 +139,6 @@ export function codeImport(options: Options = { filepath: '' }) { visit(tree, 'mdxJsxFlowElement', (node: any, idx, parent) => { if (node.name === 'CodeImport') { - // eslint-disable-next-line eqeqeq nodes.push([node as any, idx == undefined ? null : idx, parent as any]); } }); diff --git a/packages/docs/src/lib/toc.ts b/packages/docs/src/lib/toc.ts index 730df0b58..44b4295ea 100644 --- a/packages/docs/src/lib/toc.ts +++ b/packages/docs/src/lib/toc.ts @@ -1,9 +1,7 @@ -/* eslint-disable no-param-reassign */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { headingRank } from 'hast-util-heading-rank'; import { toString } from 'hast-util-to-string'; import { visit } from 'unist-util-visit'; - import type { NodeHeading } from '~/src/types'; type Params = { diff --git a/packages/docs/src/screens/DocPage.tsx b/packages/docs/src/screens/DocPage.tsx index fee522a52..4b94e90ba 100644 --- a/packages/docs/src/screens/DocPage.tsx +++ b/packages/docs/src/screens/DocPage.tsx @@ -3,7 +3,6 @@ import { cssObj } from '@fuel-ui/css'; import { Box } from '@fuel-ui/react'; import { MDXRemote } from 'next-mdx-remote'; - import { Breadcrumb } from '~/src/components/Breadcrumb'; import { DocFooter } from '~/src/components/DocFooter'; import { Layout } from '~/src/components/Layout'; diff --git a/packages/docs/tsconfig.json b/packages/docs/tsconfig.json index 1d9799ef1..d39bb2123 100644 --- a/packages/docs/tsconfig.json +++ b/packages/docs/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "compilerOptions": { "plugins": [{ "name": "next" }], "allowJs": true, diff --git a/packages/sdk/jest.config.ts b/packages/sdk/jest.config.ts index b1312125f..7d5394e9d 100644 --- a/packages/sdk/jest.config.ts +++ b/packages/sdk/jest.config.ts @@ -1,4 +1,3 @@ -/* eslint-disable import/no-extraneous-dependencies */ import type { JestConfigWithTsJest } from 'ts-jest'; import { defaultsESM as tsjPreset } from 'ts-jest/presets'; diff --git a/packages/sdk/load.envs.ts b/packages/sdk/load.envs.ts index aa21e7fce..eda0bbdd1 100644 --- a/packages/sdk/load.envs.ts +++ b/packages/sdk/load.envs.ts @@ -1,5 +1,3 @@ -/* eslint-disable consistent-return */ -/* eslint-disable import/no-extraneous-dependencies */ import { config } from 'dotenv'; import { resolve } from 'path'; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 4ea3fbef8..95626ec0c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -36,12 +36,12 @@ "xstate": "^4.38.2" }, "peerDependencies": { - "fuels": ">=0.56.1" + "fuels": ">=0.57.0" }, "devDependencies": { "@fuel-wallet/types": "workspace:*", "@types/uuid": "^9.0.2", - "fuels": "0.56.1", + "fuels": "0.57.0", "jest-webextension-mock": "^3.8.9", "tsup": "^7.2.0" } diff --git a/packages/sdk/src/connections/WindowConnection.ts b/packages/sdk/src/connections/WindowConnection.ts index 39139236d..2c1444404 100644 --- a/packages/sdk/src/connections/WindowConnection.ts +++ b/packages/sdk/src/connections/WindowConnection.ts @@ -185,7 +185,6 @@ export class WindowConnection extends BaseConnection { return; } - // eslint-disable-next-line no-plusplus this._retry++; if (hasWindow) { diff --git a/packages/sdk/src/utils/createReadOnly.ts b/packages/sdk/src/utils/createReadOnly.ts index 635f5eba2..c9ce5058f 100644 --- a/packages/sdk/src/utils/createReadOnly.ts +++ b/packages/sdk/src/utils/createReadOnly.ts @@ -13,7 +13,6 @@ export const createReadOnly = (fuel: Fuel) => { Object.hasOwn(target, key) && ['_eventsCount', '_events', 'connectorName'].includes(key as string) ) { - // eslint-disable-next-line no-param-reassign target[key] = value; return true; } diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.json index 236f5c434..9f1fb67d7 100644 --- a/packages/sdk/tsconfig.json +++ b/packages/sdk/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "compilerOptions": { "keyofStringsOnly": true, "ignoreDeprecations": "5.0", diff --git a/packages/types/package.json b/packages/types/package.json index 5bfcff42c..5b45605af 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,9 +9,9 @@ "json-rpc-2.0": "^1.6.0" }, "peerDependencies": { - "fuels": ">=0.56.1" + "fuels": ">=0.57.0" }, "devDependencies": { - "fuels": "0.56.1" + "fuels": "0.57.0" } } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index fbc6c7528..ed254f204 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.base.json", + "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist", "baseUrl": ".", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6bc2619cc..7bf1130ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -47,6 +47,15 @@ importers: '@changesets/cli': specifier: ^2.26.2 version: 2.26.2 + '@fuels/eslint-plugin': + specifier: 0.0.9 + version: 0.0.9(@testing-library/dom@9.3.1)(eslint@8.47.0)(typescript@5.1.6) + '@fuels/prettier-config': + specifier: 0.0.9 + version: 0.0.9(prettier@2.8.8) + '@fuels/ts-config': + specifier: 0.0.9 + version: 0.0.9(typescript@5.1.6) '@jest/types': specifier: 29.6.1 version: 29.6.1 @@ -129,8 +138,8 @@ importers: specifier: ^5.0.8 version: 5.0.8 '@fuel-ts/wallet-manager': - specifier: 0.56.1 - version: 0.56.1 + specifier: 0.57.0 + version: 0.57.0 '@fuel-ui/config': specifier: 0.17.0 version: 0.17.0(@testing-library/dom@9.3.1)(typescript@5.1.6) @@ -204,8 +213,8 @@ importers: specifier: ^10.16.1 version: 10.16.1(react-dom@18.2.0)(react@18.2.0) fuels: - specifier: 0.56.1 - version: 0.56.1 + specifier: 0.57.0 + version: 0.57.0 graphql: specifier: ^16.8.0 version: 16.8.0 @@ -423,64 +432,6 @@ importers: packages/asset-list: {} - packages/config: - dependencies: - '@typescript-eslint/eslint-plugin': - specifier: ^6.4.1 - version: 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/parser': - specifier: ^6.4.1 - version: 6.4.1(eslint@8.47.0)(typescript@5.1.6) - eslint: - specifier: ^8.47.0 - version: 8.47.0 - eslint-config-airbnb-base: - specifier: ^15.0.0 - version: 15.0.0(eslint-plugin-import@2.28.1)(eslint@8.47.0) - eslint-config-airbnb-typescript: - specifier: ^17.1.0 - version: 17.1.0(@typescript-eslint/eslint-plugin@6.4.1)(@typescript-eslint/parser@6.4.1)(eslint-plugin-import@2.28.1)(eslint@8.47.0) - eslint-config-prettier: - specifier: ^9.0.0 - version: 9.0.0(eslint@8.47.0) - eslint-plugin-eslint-comments: - specifier: ^3.2.0 - version: 3.2.0(eslint@8.47.0) - eslint-plugin-import: - specifier: ^2.28.1 - version: 2.28.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0) - eslint-plugin-jest-dom: - specifier: ^5.0.2 - version: 5.0.2(@testing-library/dom@9.3.1)(eslint@8.47.0) - eslint-plugin-jsx-a11y: - specifier: ^6.7.1 - version: 6.7.1(eslint@8.47.0) - eslint-plugin-prettier: - specifier: ^5.0.0 - version: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.47.0)(prettier@2.8.8) - eslint-plugin-react: - specifier: ^7.33.2 - version: 7.33.2(eslint@8.47.0) - eslint-plugin-react-hooks: - specifier: ^4.6.0 - version: 4.6.0(eslint@8.47.0) - eslint-plugin-testing-library: - specifier: ^5.11.1 - version: 5.11.1(eslint@8.47.0)(typescript@5.1.6) - prettier: - specifier: 2.8.8 - version: 2.8.8 - react: - specifier: ^18.2.0 - version: 18.2.0 - react-dom: - specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) - devDependencies: - typescript: - specifier: ^5.1.6 - version: 5.1.6 - packages/docs: dependencies: '@docsearch/css': @@ -526,8 +477,8 @@ importers: specifier: ^10.16.1 version: 10.16.1(react-dom@18.2.0)(react@18.2.0) fuels: - specifier: 0.56.1 - version: 0.56.1 + specifier: 0.57.0 + version: 0.57.0 globby: specifier: ^13.2.2 version: 13.2.2 @@ -642,8 +593,8 @@ importers: specifier: ^9.0.2 version: 9.0.2 fuels: - specifier: 0.56.1 - version: 0.56.1 + specifier: 0.57.0 + version: 0.57.0 jest-webextension-mock: specifier: ^3.8.9 version: 3.8.9 @@ -664,8 +615,8 @@ importers: version: 1.6.0 devDependencies: fuels: - specifier: 0.56.1 - version: 0.56.1 + specifier: 0.57.0 + version: 0.57.0 packages: @@ -1020,7 +971,7 @@ packages: '@babel/helper-plugin-utils': 7.22.5 debug: 4.3.4 lodash.debounce: 4.0.8 - resolve: 1.22.3 + resolve: 1.22.4 transitivePeerDependencies: - supports-color dev: true @@ -2943,6 +2894,7 @@ packages: dependencies: eslint: 8.47.0 eslint-visitor-keys: 3.4.2 + dev: true /@eslint-community/regexpp@4.6.2: resolution: {integrity: sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==} @@ -2980,6 +2932,7 @@ packages: strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color + dev: true /@eslint/js@8.46.0: resolution: {integrity: sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==} @@ -2989,6 +2942,7 @@ packages: /@eslint/js@8.47.0: resolution: {integrity: sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true /@ethersproject/abi@5.7.0: resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} @@ -3221,8 +3175,8 @@ packages: tslib: 2.6.1 dev: false - /@fuel-ts/abi-coder@0.56.1: - resolution: {integrity: sha512-ytal7S/eCB8Ecch3oWQkXb8wsl3z/EeMYKZGmKo4PahxDScH/+ef1pZBONVYSEOQR9fG7fd2v5SPmedoDF/U2A==} + /@fuel-ts/abi-coder@0.57.0: + resolution: {integrity: sha512-OLVLmKg7qs6qRZo73UxThrStYEuo7lQGRcPtN8bIiQA7A0Q1bNf6qAJXc/GA1PgcFtQ+RZgToycAM4ndgmfS+g==} dependencies: '@ethersproject/abi': 5.7.0 '@ethersproject/bignumber': 5.7.0 @@ -3231,72 +3185,71 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/sha2': 5.7.0 '@ethersproject/strings': 5.7.0 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/versions': 0.56.1 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/versions': 0.57.0 type-fest: 3.13.1 - /@fuel-ts/abi-typegen@0.56.1: - resolution: {integrity: sha512-rZ4KjpdqLfJ7wJ1EOcYmIclJQWrK+XOtTozc/WOKbEqcziBnqzTH9a7hgypQpSxn7s8Yz8giUHAiyCJHk/FYFg==} + /@fuel-ts/abi-typegen@0.57.0: + resolution: {integrity: sha512-R9b93E9lrz/Jt2FzalLoquAdIaUmGpJoEy9UaWLXl79it1bb0b8uFgfBeOncXT21vbL6aATd4ym+KpDc0VKRkQ==} hasBin: true dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/utils': 0.56.1 - '@fuel-ts/versions': 0.56.1 + '@fuel-ts/utils': 0.57.0 + '@fuel-ts/versions': 0.57.0 commander: 9.5.0 glob: 10.3.3 handlebars: 4.7.7 - lodash.uniq: 4.5.0 - lodash.upperfirst: 4.3.1 mkdirp: 1.0.4 + ramda: 0.29.0 rimraf: 3.0.2 - /@fuel-ts/address@0.56.1: - resolution: {integrity: sha512-Sc1f1DZUdthUrfBQI9gJQ/ZEwVt3wgo1DK7vpSkVIW23N3LBX6rp90HIc7N+CfbtMQNghyxIVYmiP+vFlUhW9w==} + /@fuel-ts/address@0.57.0: + resolution: {integrity: sha512-d29LK3OTfsIgsdFONfJbUSTXo/c5CeEW380LBSEdVzmXy006gmHrbnUpEqHhU5fklfyeAJBkZgbgwu5tK6m9tg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/errors': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/versions': 0.56.1 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/errors': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/versions': 0.57.0 bech32: 2.0.0 - /@fuel-ts/contract@0.56.1: - resolution: {integrity: sha512-wJbGNcqrCuC76ZI5DR6TNq/sTLKOv3DuMzB/hGHjv1QCvcPs1Jc+Xqy7Nqm10askUNGWyDd3PXNsLG1eZEH/BQ==} + /@fuel-ts/contract@0.57.0: + resolution: {integrity: sha512-Q/hWGrO71iL2SeV5xGPkDJXQ7t2Q8mxDi0CBz41Ch/mMJcrV77DdPtM/vFhMkcyzepjOmX5Ie602r8aMFR9Vww==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/merkle': 0.56.1 - '@fuel-ts/program': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - '@fuel-ts/utils': 0.56.1 - '@fuel-ts/versions': 0.56.1 - '@fuel-ts/wallet': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/merkle': 0.57.0 + '@fuel-ts/program': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + '@fuel-ts/utils': 0.57.0 + '@fuel-ts/versions': 0.57.0 + '@fuel-ts/wallet': 0.57.0 transitivePeerDependencies: - encoding - supports-color - /@fuel-ts/crypto@0.56.1: - resolution: {integrity: sha512-dpVfPdTEOrMcKMu9qPxQANYacc7NvQ/T8slf4tIm/behMlyDSyjb5MreO2cEpAXuCwtud3WnLPeX2QKpjCOgyw==} + /@fuel-ts/crypto@0.57.0: + resolution: {integrity: sha512-8yEc2Z6Fhhkfk5biKbo9eQ6dqvkUwHUdmb6Luooo6ntZYpN/8e9Qm5/FX4BfiwRwtbf/ImkB3HMTQWhD7G2dBA==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/pbkdf2': 5.7.0 ethereum-cryptography: 2.1.2 - /@fuel-ts/errors@0.56.1: - resolution: {integrity: sha512-dCHN8RbFZBFfBZGzL2Rdsdo6cFxqYDPPRLiE5XDCvBJMAoJuSPpsrHQrtJLSst1g1WF9jOMuUJKcaPjjHy2TMw==} + /@fuel-ts/errors@0.57.0: + resolution: {integrity: sha512-NXZU7EDW80BOX8vhJZYvB7tK4ZoKoTj1aFhvOKhruwKX0a/3hq1m+XsMDZ8cVDESUcch1wlnVBq0x134DWBKUQ==} dependencies: - '@fuel-ts/utils': 0.56.1 - '@fuel-ts/versions': 0.56.1 + '@fuel-ts/utils': 0.57.0 + '@fuel-ts/versions': 0.57.0 - /@fuel-ts/fuel-core@0.56.1: - resolution: {integrity: sha512-HWcC0dhl/3xFLm1HdRlOp0GCQZrobkL3wzyMyQ22GqdEgKzdWIHKiLRzx8QWkQX87nSnWgANMh4lj/u3VSJeOw==} + /@fuel-ts/fuel-core@0.57.0: + resolution: {integrity: sha512-eF+cV2YAoKEJWXdx1rBOc6haXnRZYohfb11u5ZMvQxSaVGULtS6nvR7vNSKrfZ+u0St8nIJqL360SHCS2kAwjg==} hasBin: true requiresBuild: true dependencies: @@ -3305,34 +3258,34 @@ packages: transitivePeerDependencies: - encoding - /@fuel-ts/hasher@0.56.1: - resolution: {integrity: sha512-M/HdyZSuprvHa/JGaNhDBpezMOtyfBePqnJsVMbfDUTTdLpXai3mOThc9Lr2ksg4HVBwkPlmXsUVfBaxVFIxFA==} + /@fuel-ts/hasher@0.57.0: + resolution: {integrity: sha512-dAMQGSPyfa/Hu9N1W43hLaBxJv821w/5d9ZIsbgJ1UX2dzHn6YE8giILJ/vUQh6333lrALoIR+0EAX1GOuEsPg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - lodash.clonedeep: 4.5.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + ramda: 0.29.0 transitivePeerDependencies: - encoding - /@fuel-ts/hdwallet@0.56.1: - resolution: {integrity: sha512-HgQ2ztso+zMvBCHr6U3DZa1uFXJHUUj4HDV8gKrl1hP0Z4ai9Xr09qDi+5JIku+QFnnaqsaIOs2OHUJmpiw3jw==} + /@fuel-ts/hdwallet@0.57.0: + resolution: {integrity: sha512-YCCHudXRXFOij1c9xOIW1kroeK5AW2hFFKe43uEJxb783g+TYnURA5LTvk3gsKnf1n32jtiaz0GpFtG3oekibA==} dependencies: '@ethersproject/basex': 5.7.0 '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/mnemonic': 0.56.1 - '@fuel-ts/signer': 0.56.1 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/mnemonic': 0.57.0 + '@fuel-ts/signer': 0.57.0 transitivePeerDependencies: - encoding - /@fuel-ts/interfaces@0.56.1: - resolution: {integrity: sha512-lEsMA31LD4nGasUIYE4+sz6srzyrdM7TjneRZaf+sT5YJJNkGj+gDmMrMQfgumQKqXJoqkcG7UaQaLU6cE2Bkg==} + /@fuel-ts/interfaces@0.57.0: + resolution: {integrity: sha512-XOv3zb/MMYyJm9q7gL2j4TxfD4daGZN6Ru85vnvQ6WFZLRnnd5c8scrnpTlATJmxQm8k5U5kQzgXk2euPtLMfQ==} /@fuel-ts/math@0.49.1: resolution: {integrity: sha512-h+ozE982eKkvqulX1V6X0JdsH2RkkCtYwYr9v1vwT5L/J73RySuxhoVEFSYkURjPOKSPjxK9q4RANXZZi433bA==} @@ -3341,174 +3294,175 @@ packages: bn.js: 5.2.1 dev: false - /@fuel-ts/math@0.56.1: - resolution: {integrity: sha512-SM+qVPF5Muw7Kfy0Bg5IIRp4ucdv9Z1sG3Gp3zFywPtmTUqNndTXICZl/41p0aUcomJ4780H34BJ7otstJEVIg==} + /@fuel-ts/math@0.57.0: + resolution: {integrity: sha512-7Cw82l4l0YMRCtxdgDIti6TKKXpbC2HGi4SEKpTt3AyU5Oi+WPn50H617ISQAyffXOsLprifFv8VNDKO77fzTg==} dependencies: '@types/bn.js': 5.1.1 bn.js: 5.2.1 - /@fuel-ts/merkle@0.56.1: - resolution: {integrity: sha512-ybHdoWBWK10qb3YCdhCMb5UIZBa/uDdSiIRRFRc7zBATqrYVZSc7ts8l3aMbMCLFKeMfpTtNpEsZnjI7zamOWA==} + /@fuel-ts/merkle@0.57.0: + resolution: {integrity: sha512-UxZwlYxbe0y3Le9UUV2QxtLXDCd2H2LulRLD0v3d7eNWM36XSmwt+w7RwdH4RKDAEMSf15GNB1dNoBSWKibAWQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/math': 0.56.1 + '@fuel-ts/math': 0.57.0 - /@fuel-ts/mnemonic@0.56.1: - resolution: {integrity: sha512-AC7Xil6fxdgHzVAZmF97TZTmm6tx26qB6cL6mwD3fjF9R6bNF+hARTwtXM+MAfE/x3iL1LWCYYZ+9aCn+14IyA==} + /@fuel-ts/mnemonic@0.57.0: + resolution: {integrity: sha512-Y0tggoa1FnnKf2LpV/hqK5vpfVCQgkYG4SP2l1MwiX9BHyor4bcdVLV7I7sd00guXCcRpOP1FOZoBP1OdA/fUw==} dependencies: '@ethersproject/basex': 5.7.0 '@ethersproject/bytes': 5.7.0 '@ethersproject/pbkdf2': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/wordlists': 0.56.1 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/wordlists': 0.57.0 - /@fuel-ts/predicate@0.56.1: - resolution: {integrity: sha512-LW4EosPOHG/350UhPAfrni1ynwp2JofoEp2SHY9ntY0ZNJ0uE71OC2tNxzchB9b+nN3eUbRZW3LB7uXPZrzxbw==} + /@fuel-ts/predicate@0.57.0: + resolution: {integrity: sha512-DPWAC/UigRKg1NzxbUBd5NjUlALp8zC+sES28CkxaqEO7ft9XIlgcik5j29DHs7CiYLXRoZVzOgVEYcCyCABvQ==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/hasher': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/merkle': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - '@fuel-ts/utils': 0.56.1 - '@fuel-ts/versions': 0.56.1 - '@fuel-ts/wallet': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/hasher': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/merkle': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + '@fuel-ts/utils': 0.57.0 + '@fuel-ts/versions': 0.57.0 + '@fuel-ts/wallet': 0.57.0 transitivePeerDependencies: - encoding - supports-color - /@fuel-ts/program@0.56.1: - resolution: {integrity: sha512-F/2m7XOjxYrmQ7OK9+52Z8+8hkl64ufRa2XQRAE+Mp4iwhxZwSWyarnNItwhqcM1kMeiHqEoiPOU0zrc5egCBw==} + /@fuel-ts/program@0.57.0: + resolution: {integrity: sha512-KXF2G0ReYYVhj5C5KUK4f9bOQcMqD1UOkwT2DsWCvKKOuf7AOP/9Odv/Jel1oRptYrMnNj8AbkRFCYYMwL8P8w==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/logger': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/errors': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - '@fuel-ts/versions': 0.56.1 - '@fuel-ts/wallet': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/errors': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + '@fuel-ts/versions': 0.57.0 + '@fuel-ts/wallet': 0.57.0 '@fuels/vm-asm': 0.36.1 transitivePeerDependencies: - encoding - supports-color - /@fuel-ts/providers@0.56.1: - resolution: {integrity: sha512-I22LcQJ9yrMS4A6J3Om/fL6HdZ68bdp0yOPYzRQ5jsC87hIVO11q1VyPV7j2kHxYAST5V0+EF2vg6WfiNhm8/g==} + /@fuel-ts/providers@0.57.0: + resolution: {integrity: sha512-huVzXbD/ZYzFLvXCKRTxjRYEffV+m67gxSK1bTqzA1p5Wphnt0gwWYzycFbReOwNGbbILnqwoLKJ5mICkQ6nag==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/networks': 5.7.1 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/errors': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/transactions': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/errors': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/transactions': 0.57.0 graphql: 16.8.0 graphql-request: 5.2.0(graphql@16.8.0) graphql-tag: 2.12.6(graphql@16.8.0) - lodash.clonedeep: 4.5.0 + ramda: 0.29.0 + tai64: 1.0.0 transitivePeerDependencies: - encoding - /@fuel-ts/script@0.56.1: - resolution: {integrity: sha512-vWxEkZHv1zEFzeVXuMXkmaioPK/OgpkhRx39nB8aPKJW9IELSi6CzNf4FSh24ZsiBRppbiA3y+Q5+z5gSHKNJA==} + /@fuel-ts/script@0.57.0: + resolution: {integrity: sha512-xvKqapCMmPu7rxDPlR1tdfe+LHlb9vBauVkqSYiBnjYZ/zKoECaVyXmE9sftTFMpKZ08rMGY/CwCdG4Gq/JtzQ==} dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/abi-typegen': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/program': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - '@fuel-ts/utils': 0.56.1 - '@fuel-ts/wallet': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/abi-typegen': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/program': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + '@fuel-ts/utils': 0.57.0 + '@fuel-ts/wallet': 0.57.0 transitivePeerDependencies: - encoding - supports-color - /@fuel-ts/signer@0.56.1: - resolution: {integrity: sha512-OIO5eUS+8ilFZMgKPdpI+prL+z98I4RbjeaKTLfcHHpW+doy5nMYEJl3XJ9BMXn4rlXxrufYbSaUWLrrkuv5Hw==} + /@fuel-ts/signer@0.57.0: + resolution: {integrity: sha512-EkAaHnXgVsJ+b2YtqqynROX4t5wnfsc0EkqtRgVFIreBo9eY8bsciYxEfcBK6QddHDB8QERXcLR8ciSNUSa2ug==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/hasher': 0.56.1 - '@fuel-ts/math': 0.56.1 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/hasher': 0.57.0 + '@fuel-ts/math': 0.57.0 elliptic: 6.5.4 transitivePeerDependencies: - encoding - /@fuel-ts/testcases@0.56.1: - resolution: {integrity: sha512-dyqfcgewvLMbHmiSZxPm+dyE9wtQLMhXavguPw73Mrj7EFn2ZWaNpJNDfPHPRf4p5YNnqyX56grjmchBoY6CRA==} + /@fuel-ts/testcases@0.57.0: + resolution: {integrity: sha512-l2G1ZQnsZjQAnzf2dAdgrgEh8LNFcpZJjE1/M6zl438q8JUo9pWkERzkneG5RdDyyJrEtBLwCwBDKwG9ymSCxw==} - /@fuel-ts/transactions@0.56.1: - resolution: {integrity: sha512-NfLdel9+NlpPH+CPUzrq1wmWtP39pINNlzWM0X7B4JeQrkMuSyVm+qoGbAttJ3rD4pgwq8JVWuWZZ+df8n16gw==} + /@fuel-ts/transactions@0.57.0: + resolution: {integrity: sha512-9ZReympN0xX/uRwttFWvZtY139c53UDDGgxgbx+Vm4yynt3dIaEp0jDnwZTS+LKIIiqV0+vAL2bqnh+2GNDACg==} dependencies: '@ethersproject/bytes': 5.7.0 '@ethersproject/sha2': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/math': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/math': 0.57.0 - /@fuel-ts/utils@0.56.1: - resolution: {integrity: sha512-7PPbBRbxRZUCPcNRy2Yz1XfIXaMdgAwuCbYhBQEmzX1e+YhAphsL1p4Wj7bm7ZKPC7z0xzjOiyLX4NzFNmiZ8w==} + /@fuel-ts/utils@0.57.0: + resolution: {integrity: sha512-WsNbc2rFzead2duaPVy0E3RpJhct88ssXwfK/5bYLpLLoVJ1/KP5ZJTCJ6GM2aEKAMa2EWEc3lMQYnBabuUx6Q==} dependencies: - lodash.upperfirst: 4.3.1 + ramda: 0.29.0 rimraf: 3.0.2 - /@fuel-ts/versions@0.56.1: - resolution: {integrity: sha512-yMjr0sKOxic/ZewupeI+roZGEsIjpOshmazEMqGUJ8Q6k9KJHfUYTPPwduXzpDxk19UyZrUD76IfOEZeCHQoVg==} + /@fuel-ts/versions@0.57.0: + resolution: {integrity: sha512-qQeUL+Xe5TStZHTgnZkf9qBlrDg5iTm5k8rtlHZ3CSoAyup7a3Y7WQID2FLOjFPr9Fi0eMZ5uc9M4yNkyo1qJg==} hasBin: true dependencies: chalk: 4.1.2 cli-table: 0.3.11 semver: 7.5.4 - /@fuel-ts/wallet-manager@0.56.1: - resolution: {integrity: sha512-5VK4Gdoh3vHevbAvRgx7HylzyuFGNL99GimWH9rQXvpLvYx+ppUcq18ebARgTzgc1BQvJ42f9U4RJY0ARwS4+w==} + /@fuel-ts/wallet-manager@0.57.0: + resolution: {integrity: sha512-X6pzk7hLBuf8aSy63UxyfgC/shML6jQyLR7mX0apTx/bYhifNj0tWkXZWZ/RH4b20JkCMw71ckKfMNS3qic+8A==} dependencies: - '@fuel-ts/address': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/mnemonic': 0.56.1 - '@fuel-ts/wallet': 0.56.1 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/mnemonic': 0.57.0 + '@fuel-ts/wallet': 0.57.0 events: 3.3.0 transitivePeerDependencies: - encoding - supports-color - /@fuel-ts/wallet@0.56.1: - resolution: {integrity: sha512-jWDXMrfHeZzDbesw1UOgikgLex0Rjw1pLk1p8cD/qvf3WjeRoLRBylr8lvBwLdy8Xv1vmyy2psZzvFYUcYDzuw==} + /@fuel-ts/wallet@0.57.0: + resolution: {integrity: sha512-qFn8czVr3olCZVi8yRxgEaiTRN49uAa9c9I0mSDyDoYy+wC5F2hoK5CCchV+k8jEqAh4wqBzFltI0TxiRMwhKw==} dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/fuel-core': 0.56.1 - '@fuel-ts/hasher': 0.56.1 - '@fuel-ts/hdwallet': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/mnemonic': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/signer': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - '@fuel-ts/utils': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/fuel-core': 0.57.0 + '@fuel-ts/hasher': 0.57.0 + '@fuel-ts/hdwallet': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/mnemonic': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/signer': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + '@fuel-ts/utils': 0.57.0 '@fuels/vm-asm': 0.36.1 portfinder: 1.0.32 tree-kill: 1.2.2 @@ -3517,14 +3471,14 @@ packages: - encoding - supports-color - /@fuel-ts/wordlists@0.56.1: - resolution: {integrity: sha512-H9ichh2NQKuFBbw8NCQLSYooMEtPbQ4ufCZvGp4UyJoC5PykW9F3NleJQNU5clUKJlMSQU/R9ck++TrIrAYG/w==} + /@fuel-ts/wordlists@0.57.0: + resolution: {integrity: sha512-G4CHfh47RRbgv8ZMciJjLoM5WGDwZyB8oMgzadJGCAvy56PPgUc2U/R7PEQbEVZyfgKzOPDZko49zZyCn9wm7w==} /@fuel-ui/config@0.17.0(@testing-library/dom@9.3.1)(typescript@5.1.6): resolution: {integrity: sha512-3kJNmSmhLdPtyHPNOOvwMpvRQHgJXoOY96YOkNtscdIX118GfqUxMg10pqFHPwZNnMvaCl+5EdSyiv2QZpxVBQ==} dependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.28.0)(eslint@8.46.0) eslint-config-airbnb-typescript: 17.1.0(@typescript-eslint/eslint-plugin@5.62.0)(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0) @@ -3695,10 +3649,47 @@ packages: - utf-8-validate dev: false + /@fuels/eslint-plugin@0.0.9(@testing-library/dom@9.3.1)(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-2pECNfYPo2jnvUs98yOQ3P3SmIqiy5SophnCl4wYLS9ZlA9K8wQk831ecm6gAW9HpFeFCaikFUcZ3fM6uAQxIg==} + peerDependencies: + eslint: ^8.48.0 + dependencies: + '@next/eslint-plugin-next': 13.4.19 + '@typescript-eslint/eslint-plugin': 6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.6.0(eslint@8.47.0)(typescript@5.1.6) + eslint: 8.47.0 + eslint-config-prettier: 9.0.0(eslint@8.47.0) + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@8.47.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) + eslint-plugin-jest-dom: 5.1.0(@testing-library/dom@9.3.1)(eslint@8.47.0) + eslint-plugin-jsx-a11y: 6.7.1(eslint@8.47.0) + eslint-plugin-prettier: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.47.0)(prettier@3.0.3) + eslint-plugin-react: 7.33.2(eslint@8.47.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.47.0) + eslint-plugin-testing-library: 6.0.1(eslint@8.47.0)(typescript@5.1.6) + prettier: 3.0.3 + transitivePeerDependencies: + - '@testing-library/dom' + - '@types/eslint' + - eslint-import-resolver-webpack + - supports-color + - typescript + dev: true + /@fuels/local-storage@0.0.9: resolution: {integrity: sha512-jdrYBfTBp6M6eoFsMKareqHbaMdhghjCJ+QVhz7axGaFNEdYH8R0SCKsbSLCQoCtfbPHyXYU7ACDV280mFw/Rw==} dev: false + /@fuels/prettier-config@0.0.9(prettier@2.8.8): + resolution: {integrity: sha512-/Foww7TXrf9gdCYe1ax53MGz9Ep6ue/j7MfvAtaZC7P5BrORHef2UMHSeAU6oMiY5L72OYFD2uMgcFVF87VLWQ==} + peerDependencies: + prettier: ^3.0.3 + dependencies: + prettier: 2.8.8 + dev: true + /@fuels/react-xstore@0.0.9(@types/react@18.2.20)(@xstate/react@3.2.2)(react-dom@18.2.0)(react@18.2.0)(ws@8.13.0)(xstate@4.38.2): resolution: {integrity: sha512-eFRK2phYWzMHsDWjbLOldVIDlbGUkufNplFFU6FU1AANSovb7G/8AWTXEC1SAqmYT7iAkgvELngVbS1HxORNaQ==} peerDependencies: @@ -3727,6 +3718,14 @@ packages: - ws dev: false + /@fuels/ts-config@0.0.9(typescript@5.1.6): + resolution: {integrity: sha512-NCUvTITS/ucVmCRhOdRy7uARbz/MDFLMF/Z7Uq6LhWX96u5zIpBcOZxA3RpxHN/QdyBgTQJL2seq0oL9RImsow==} + peerDependencies: + typescript: 5.2.2 + dependencies: + typescript: 5.1.6 + dev: true + /@fuels/vm-asm@0.36.1: resolution: {integrity: sha512-MXtNDk0WXONIrDJOlk07+X7GegpCz2hfbAgSIWycOD0th2z1GndvMqBryiw/pTVDHLnHe+5TGIODLsprI4RiEw==} @@ -4874,6 +4873,12 @@ packages: glob: 7.1.7 dev: true + /@next/eslint-plugin-next@13.4.19: + resolution: {integrity: sha512-N/O+zGb6wZQdwu6atMZHbR7T9Np5SUFUjZqCbj0sXm+MwQO35M8TazVB4otm87GkXYs2l6OPwARd3/PUWhZBVQ==} + dependencies: + glob: 7.1.7 + dev: true + /@next/mdx@13.4.19(@mdx-js/react@2.3.0): resolution: {integrity: sha512-EaWA30YxAqFcyQYNxCoL9/TCcZP1Nk6pvW0vf1M54qDAkAGiloWQqyttVKVbRz+qOYk92he6mBB4ej/7pmEinQ==} peerDependencies: @@ -5043,6 +5048,7 @@ packages: open: 9.1.0 picocolors: 1.0.0 tslib: 2.6.1 + dev: true /@playwright/test@1.37.1: resolution: {integrity: sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==} @@ -9781,7 +9787,6 @@ packages: /@types/long@4.0.0: resolution: {integrity: sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==} - dev: false /@types/mdast@3.0.12: resolution: {integrity: sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==} @@ -9822,7 +9827,6 @@ packages: /@types/node@10.12.18: resolution: {integrity: sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==} - dev: false /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} @@ -9973,7 +9977,7 @@ packages: dependencies: '@types/yargs-parser': 21.0.0 - /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -9985,12 +9989,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.46.0)(typescript@5.1.6) '@typescript-eslint/scope-manager': 5.62.0 - '@typescript-eslint/type-utils': 5.62.0(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/utils': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/type-utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4 - eslint: 8.47.0 + eslint: 8.46.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -10001,8 +10005,8 @@ packages: - supports-color dev: false - /@typescript-eslint/eslint-plugin@6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==} + /@typescript-eslint/eslint-plugin@6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -10013,11 +10017,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 6.4.1 - '@typescript-eslint/type-utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.4.1 + '@typescript-eslint/parser': 6.6.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.6.0 + '@typescript-eslint/type-utils': 6.6.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.6.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.6.0 debug: 4.3.4 eslint: 8.47.0 graphemer: 1.4.0 @@ -10028,6 +10032,26 @@ packages: typescript: 5.1.6 transitivePeerDependencies: - supports-color + dev: true + + /@typescript-eslint/parser@5.62.0(eslint@8.46.0)(typescript@5.1.6): + resolution: {integrity: sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 5.62.0 + '@typescript-eslint/types': 5.62.0 + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6) + debug: 4.3.4 + eslint: 8.46.0 + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color dev: false /@typescript-eslint/parser@5.62.0(eslint@8.47.0)(typescript@5.1.6): @@ -10048,6 +10072,7 @@ packages: typescript: 5.1.6 transitivePeerDependencies: - supports-color + dev: true /@typescript-eslint/parser@6.4.1(eslint@8.47.0)(typescript@5.1.6): resolution: {integrity: sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==} @@ -10068,6 +10093,28 @@ packages: typescript: 5.1.6 transitivePeerDependencies: - supports-color + dev: true + + /@typescript-eslint/parser@6.6.0(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.6.0 + '@typescript-eslint/types': 6.6.0 + '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.1.6) + '@typescript-eslint/visitor-keys': 6.6.0 + debug: 4.3.4 + eslint: 8.47.0 + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true /@typescript-eslint/scope-manager@5.62.0: resolution: {integrity: sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==} @@ -10082,8 +10129,17 @@ packages: dependencies: '@typescript-eslint/types': 6.4.1 '@typescript-eslint/visitor-keys': 6.4.1 + dev: true + + /@typescript-eslint/scope-manager@6.6.0: + resolution: {integrity: sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.6.0 + '@typescript-eslint/visitor-keys': 6.6.0 + dev: true - /@typescript-eslint/type-utils@5.62.0(eslint@8.47.0)(typescript@5.1.6): + /@typescript-eslint/type-utils@5.62.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -10094,17 +10150,17 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.1.6) - '@typescript-eslint/utils': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/utils': 5.62.0(eslint@8.46.0)(typescript@5.1.6) debug: 4.3.4 - eslint: 8.47.0 + eslint: 8.46.0 tsutils: 3.21.0(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: false - /@typescript-eslint/type-utils@6.4.1(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==} + /@typescript-eslint/type-utils@6.6.0(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-8m16fwAcEnQc69IpeDyokNO+D5spo0w1jepWWY2Q6y5ZKNuj5EhVQXjtVAeDDqvW6Yg7dhclbsz6rTtOvcwpHg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -10113,15 +10169,15 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.6.0(eslint@8.47.0)(typescript@5.1.6) debug: 4.3.4 eslint: 8.47.0 ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: - supports-color - dev: false + dev: true /@typescript-eslint/types@5.62.0: resolution: {integrity: sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==} @@ -10130,6 +10186,12 @@ packages: /@typescript-eslint/types@6.4.1: resolution: {integrity: sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==} engines: {node: ^16.0.0 || >=18.0.0} + dev: true + + /@typescript-eslint/types@6.6.0: + resolution: {integrity: sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true /@typescript-eslint/typescript-estree@5.62.0(typescript@5.1.6): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} @@ -10170,6 +10232,28 @@ packages: typescript: 5.1.6 transitivePeerDependencies: - supports-color + dev: true + + /@typescript-eslint/typescript-estree@6.6.0(typescript@5.1.6): + resolution: {integrity: sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.6.0 + '@typescript-eslint/visitor-keys': 6.6.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 + transitivePeerDependencies: + - supports-color + dev: true /@typescript-eslint/utils@5.62.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} @@ -10177,7 +10261,7 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 5.62.0 @@ -10209,10 +10293,10 @@ packages: transitivePeerDependencies: - supports-color - typescript - dev: false + dev: true - /@typescript-eslint/utils@6.4.1(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==} + /@typescript-eslint/utils@6.6.0(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-mPHFoNa2bPIWWglWYdR0QfY9GN0CfvvXX1Sv6DlSTive3jlMTUy+an67//Gysc+0Me9pjitrq0LJp0nGtLgftw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -10220,15 +10304,15 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.4.1 - '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) + '@typescript-eslint/scope-manager': 6.6.0 + '@typescript-eslint/types': 6.6.0 + '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.1.6) eslint: 8.47.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript - dev: false + dev: true /@typescript-eslint/visitor-keys@5.62.0: resolution: {integrity: sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==} @@ -10242,7 +10326,16 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dependencies: '@typescript-eslint/types': 6.4.1 - eslint-visitor-keys: 3.4.2 + eslint-visitor-keys: 3.4.3 + dev: true + + /@typescript-eslint/visitor-keys@6.6.0: + resolution: {integrity: sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.6.0 + eslint-visitor-keys: 3.4.3 + dev: true /@vitejs/plugin-react@3.1.0(vite@4.4.9): resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==} @@ -10971,6 +11064,7 @@ packages: resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} dependencies: has-symbols: 1.0.3 + dev: true /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -11248,6 +11342,7 @@ packages: /big-integer@1.6.51: resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} engines: {node: '>=0.6'} + dev: true /big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -11299,6 +11394,7 @@ packages: engines: {node: '>= 5.10.0'} dependencies: big-integer: 1.6.51 + dev: true /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -11375,6 +11471,7 @@ packages: engines: {node: '>=12'} dependencies: run-applescript: 5.0.0 + dev: true /bundle-require@4.0.1(esbuild@0.18.17): resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} @@ -12320,6 +12417,7 @@ packages: dependencies: bplist-parser: 0.2.0 untildify: 4.0.0 + dev: true /default-browser@4.0.0: resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} @@ -12329,6 +12427,7 @@ packages: default-browser-id: 3.0.0 execa: 7.2.0 titleize: 3.0.0 + dev: true /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} @@ -12344,6 +12443,7 @@ packages: /define-lazy-prop@3.0.0: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} + dev: true /define-properties@1.2.0: resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} @@ -12658,6 +12758,7 @@ packages: dependencies: graceful-fs: 4.2.11 tapable: 2.2.1 + dev: true /enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} @@ -12769,6 +12870,7 @@ packages: internal-slot: 1.0.5 iterator.prototype: 1.1.0 safe-array-concat: 1.0.0 + dev: true /es-module-lexer@0.10.5: resolution: {integrity: sha512-+7IwY/kiGAacQfY+YBhKMvEmyAJnw5grTUgjG85Pe7vcUI/6b7pZjZG8nQ7+48YhzEAEqrEgD2dCz/JIK+AYvw==} @@ -12902,21 +13004,6 @@ packages: semver: 7.5.4 dev: false - /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.28.1)(eslint@8.47.0): - resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} - engines: {node: ^10.12.0 || >=12.0.0} - peerDependencies: - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.2 - dependencies: - confusing-browser-globals: 1.0.11 - eslint: 8.47.0 - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0) - object.assign: 4.1.4 - object.entries: 1.1.6 - semver: 7.5.4 - dev: false - /eslint-config-airbnb-typescript@17.1.0(@typescript-eslint/eslint-plugin@5.62.0)(@typescript-eslint/parser@5.62.0)(eslint-plugin-import@2.28.0)(eslint@8.46.0): resolution: {integrity: sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==} peerDependencies: @@ -12925,28 +13012,13 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0)(eslint@8.46.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.46.0)(typescript@5.1.6) eslint: 8.46.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.28.0)(eslint@8.46.0) eslint-plugin-import: 2.28.0(@typescript-eslint/parser@5.62.0)(eslint@8.46.0) dev: false - /eslint-config-airbnb-typescript@17.1.0(@typescript-eslint/eslint-plugin@6.4.1)(@typescript-eslint/parser@6.4.1)(eslint-plugin-import@2.28.1)(eslint@8.47.0): - resolution: {integrity: sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.13.0 || ^6.0.0 - '@typescript-eslint/parser': ^5.0.0 || ^6.0.0 - eslint: ^7.32.0 || ^8.2.0 - eslint-plugin-import: ^2.25.3 - dependencies: - '@typescript-eslint/eslint-plugin': 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - eslint: 8.47.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.28.1)(eslint@8.47.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0) - dev: false - /eslint-config-next@13.4.13(eslint@8.47.0)(typescript@5.1.6): resolution: {integrity: sha512-EXAh5h1yG/YTNa5YdskzaSZncBjKjvFe2zclMCi2KXyTsXha22wB6MPs/U7idB6a2qjpBdbZcruQY1TWjfNMZw==} peerDependencies: @@ -12988,7 +13060,7 @@ packages: eslint: '>=7.0.0' dependencies: eslint: 8.47.0 - dev: false + dev: true /eslint-import-resolver-node@0.3.7: resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} @@ -12999,6 +13071,16 @@ packages: transitivePeerDependencies: - supports-color + /eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + dependencies: + debug: 3.2.7 + is-core-module: 2.13.0 + resolve: 1.22.4 + transitivePeerDependencies: + - supports-color + dev: true + /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.28.1)(eslint@8.47.0): resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -13021,6 +13103,30 @@ packages: - eslint-import-resolver-node - eslint-import-resolver-webpack - supports-color + dev: true + + /eslint-import-resolver-typescript@3.6.0(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0): + resolution: {integrity: sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + eslint: '*' + eslint-plugin-import: '*' + dependencies: + debug: 4.3.4 + enhanced-resolve: 5.15.0 + eslint: 8.47.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) + fast-glob: 3.3.1 + get-tsconfig: 4.6.2 + is-core-module: 2.13.0 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + dev: true /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint@8.46.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} @@ -13043,7 +13149,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.46.0)(typescript@5.1.6) debug: 3.2.7 eslint: 8.46.0 eslint-import-resolver-node: 0.3.7 @@ -13051,7 +13157,7 @@ packages: - supports-color dev: false - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint@8.47.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@8.47.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -13075,9 +13181,10 @@ packages: '@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6) debug: 3.2.7 eslint: 8.47.0 - eslint-import-resolver-node: 0.3.7 + eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color + dev: true /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.47.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} @@ -13107,6 +13214,37 @@ packages: eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.7)(eslint-plugin-import@2.28.1)(eslint@8.47.0) transitivePeerDependencies: - supports-color + dev: true + + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 6.6.0(eslint@8.47.0)(typescript@5.1.6) + debug: 3.2.7 + eslint: 8.47.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.0(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.47.0) + transitivePeerDependencies: + - supports-color + dev: true /eslint-plugin-eslint-comments@3.2.0(eslint@8.46.0): resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} @@ -13128,7 +13266,7 @@ packages: escape-string-regexp: 1.0.5 eslint: 8.47.0 ignore: 5.2.4 - dev: false + dev: true /eslint-plugin-import@2.28.0(@typescript-eslint/parser@5.62.0)(eslint@8.46.0): resolution: {integrity: sha512-B8s/n+ZluN7sxj9eUf7/pRFERX0r5bnFA2dCaLHy2ZeaQEAz0k+ZZkFWRFHJAqxfxQDx6KLv9LeIki7cFdwW+Q==} @@ -13140,7 +13278,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 5.62.0(eslint@8.46.0)(typescript@5.1.6) array-includes: 3.1.6 array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 @@ -13184,8 +13322,8 @@ packages: debug: 3.2.7 doctrine: 2.1.0 eslint: 8.47.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.7)(eslint@8.47.0) + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.62.0)(eslint-import-resolver-node@0.3.9)(eslint@8.47.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -13199,8 +13337,9 @@ packages: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color + dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -13210,7 +13349,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/parser': 6.6.0(eslint@8.47.0)(typescript@5.1.6) array-includes: 3.1.6 array.prototype.findlastindex: 1.2.2 array.prototype.flat: 1.3.1 @@ -13218,8 +13357,8 @@ packages: debug: 3.2.7 doctrine: 2.1.0 eslint: 8.47.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.4.1)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.47.0) + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.6.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.0)(eslint@8.47.0) has: 1.0.3 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -13233,7 +13372,7 @@ packages: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - dev: false + dev: true /eslint-plugin-jest-dom@5.0.1(@testing-library/dom@9.3.1)(eslint@8.46.0): resolution: {integrity: sha512-zD/BjNk12R5R9cxIu8oa2HfNeDSknI3ewtN8nygIUMQuieWDnTY9Np//6a1Z3G7Y3dx3l45hCUR4EphsgRmUtA==} @@ -13248,18 +13387,21 @@ packages: requireindex: 1.2.0 dev: false - /eslint-plugin-jest-dom@5.0.2(@testing-library/dom@9.3.1)(eslint@8.47.0): - resolution: {integrity: sha512-zfNOwQOrOOGcxb3tcOgB2fEiqmgEbXKcPrNC+NlNSWCi3wg/m+DWVqrrshp4gOjhpP1R/1X7kkHumnf8PLUFhw==} + /eslint-plugin-jest-dom@5.1.0(@testing-library/dom@9.3.1)(eslint@8.47.0): + resolution: {integrity: sha512-JIXZp+E/h/aGlP/rQc4tuOejiHlZXg65qw8JAJMIJA5VsdjOkss/SYcRSqBrQuEOytEM8JvngUjcz31d1RrCrA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6', yarn: '>=1'} peerDependencies: '@testing-library/dom': ^8.0.0 || ^9.0.0 eslint: ^6.8.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@testing-library/dom': + optional: true dependencies: '@babel/runtime': 7.22.6 '@testing-library/dom': 9.3.1 eslint: 8.47.0 requireindex: 1.2.0 - dev: false + dev: true /eslint-plugin-jsx-a11y@6.7.1(eslint@8.46.0): resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} @@ -13309,6 +13451,7 @@ packages: object.entries: 1.1.6 object.fromentries: 2.0.6 semver: 7.5.4 + dev: true /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.9.0)(eslint@8.46.0)(prettier@2.8.8): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} @@ -13327,7 +13470,7 @@ packages: prettier-linter-helpers: 1.0.0 dev: false - /eslint-plugin-prettier@5.0.0(eslint-config-prettier@9.0.0)(eslint@8.47.0)(prettier@2.8.8): + /eslint-plugin-prettier@5.0.0(eslint-config-prettier@9.0.0)(eslint@8.47.0)(prettier@3.0.3): resolution: {integrity: sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -13343,10 +13486,10 @@ packages: dependencies: eslint: 8.47.0 eslint-config-prettier: 9.0.0(eslint@8.47.0) - prettier: 2.8.8 + prettier: 3.0.3 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 - dev: false + dev: true /eslint-plugin-react-hooks@4.6.0(eslint@8.46.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} @@ -13364,7 +13507,7 @@ packages: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: eslint: 8.47.0 - dev: false + dev: true /eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705(eslint@8.47.0): resolution: {integrity: sha512-AZYbMo/NW9chdL7vk6HQzQhT+PvTAEVqWk9ziruUoW2kAOcN5qNyelv70e0F1VNQAbvutOC9oc+xfWycI9FxDw==} @@ -13422,6 +13565,7 @@ packages: resolve: 2.0.0-next.4 semver: 7.5.4 string.prototype.matchall: 4.0.8 + dev: true /eslint-plugin-testing-library@5.11.0(eslint@8.46.0)(typescript@5.1.6): resolution: {integrity: sha512-ELY7Gefo+61OfXKlQeXNIDVVLPcvKTeiQOoMZG9TeuWa7Ln4dUNRv8JdRWBQI9Mbb427XGlVB1aa1QPZxBJM8Q==} @@ -13436,8 +13580,8 @@ packages: - typescript dev: false - /eslint-plugin-testing-library@5.11.1(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-5eX9e1Kc2PqVRed3taaLnAAqPZGEX75C+M/rXzUAI3wIg/ZxzUm1OVAwfe/O+vE+6YXOLetSe9g5GKD2ecXipw==} + /eslint-plugin-testing-library@6.0.1(eslint@8.47.0)(typescript@5.1.6): + resolution: {integrity: sha512-CEYtjpcF3hAaQtYsTZqciR7s5z+T0LCMTwJeW+pz6kBnGtc866wAKmhaiK2Gsjc2jWNP7Gt6zhNr2DE1ZW4e+g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6'} peerDependencies: eslint: ^7.5.0 || ^8.0.0 @@ -13447,7 +13591,7 @@ packages: transitivePeerDependencies: - supports-color - typescript - dev: false + dev: true /eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} @@ -13470,6 +13614,7 @@ packages: /eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true /eslint@8.46.0: resolution: {integrity: sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==} @@ -13561,6 +13706,7 @@ packages: text-table: 0.2.0 transitivePeerDependencies: - supports-color + dev: true /espree@9.6.1: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} @@ -13824,7 +13970,6 @@ packages: /fast-diff@1.3.0: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - dev: false /fast-equals@5.0.1: resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} @@ -14234,33 +14379,33 @@ packages: requiresBuild: true optional: true - /fuels@0.56.1: - resolution: {integrity: sha512-WAiOOnWY41NoQv5HIccNQg/PTPe+uDzBVpqdr4oSh+QZZXiEQmTCtgJHY8HQ2jr3ZH3c6Wpw/27OnPo4ho5WjA==} + /fuels@0.57.0: + resolution: {integrity: sha512-TNyZuRT4IdXbElQKQ1BI4fACjFAx+ONfFT+fRDGlvOV5OkUDgFUKkbTal6mZ1jYxSvjJvkrqD/o+ZbnMzxpUhQ==} hasBin: true dependencies: '@ethersproject/bytes': 5.7.0 - '@fuel-ts/abi-coder': 0.56.1 - '@fuel-ts/abi-typegen': 0.56.1 - '@fuel-ts/address': 0.56.1 - '@fuel-ts/contract': 0.56.1 - '@fuel-ts/crypto': 0.56.1 - '@fuel-ts/hasher': 0.56.1 - '@fuel-ts/hdwallet': 0.56.1 - '@fuel-ts/interfaces': 0.56.1 - '@fuel-ts/math': 0.56.1 - '@fuel-ts/merkle': 0.56.1 - '@fuel-ts/mnemonic': 0.56.1 - '@fuel-ts/predicate': 0.56.1 - '@fuel-ts/program': 0.56.1 - '@fuel-ts/providers': 0.56.1 - '@fuel-ts/script': 0.56.1 - '@fuel-ts/signer': 0.56.1 - '@fuel-ts/testcases': 0.56.1 - '@fuel-ts/transactions': 0.56.1 - '@fuel-ts/versions': 0.56.1 - '@fuel-ts/wallet': 0.56.1 - '@fuel-ts/wallet-manager': 0.56.1 - '@fuel-ts/wordlists': 0.56.1 + '@fuel-ts/abi-coder': 0.57.0 + '@fuel-ts/abi-typegen': 0.57.0 + '@fuel-ts/address': 0.57.0 + '@fuel-ts/contract': 0.57.0 + '@fuel-ts/crypto': 0.57.0 + '@fuel-ts/hasher': 0.57.0 + '@fuel-ts/hdwallet': 0.57.0 + '@fuel-ts/interfaces': 0.57.0 + '@fuel-ts/math': 0.57.0 + '@fuel-ts/merkle': 0.57.0 + '@fuel-ts/mnemonic': 0.57.0 + '@fuel-ts/predicate': 0.57.0 + '@fuel-ts/program': 0.57.0 + '@fuel-ts/providers': 0.57.0 + '@fuel-ts/script': 0.57.0 + '@fuel-ts/signer': 0.57.0 + '@fuel-ts/testcases': 0.57.0 + '@fuel-ts/transactions': 0.57.0 + '@fuel-ts/versions': 0.57.0 + '@fuel-ts/wallet': 0.57.0 + '@fuel-ts/wallet-manager': 0.57.0 + '@fuel-ts/wordlists': 0.57.0 commander: 9.5.0 transitivePeerDependencies: - encoding @@ -14342,6 +14487,7 @@ packages: resolution: {integrity: sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==} dependencies: resolve-pkg-maps: 1.0.0 + dev: true /giget@1.1.2: resolution: {integrity: sha512-HsLoS07HiQ5oqvObOI+Qb2tyZH4Gj5nYGfF9qQcZNrPw+uEFhdXtgJr01aO2pWadGHucajYDLxxbtQkm97ON2A==} @@ -15128,6 +15274,7 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 + dev: true /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} @@ -15195,11 +15342,13 @@ packages: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} hasBin: true + dev: true /is-docker@3.0.0: resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} hasBin: true + dev: true /is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} @@ -15214,6 +15363,7 @@ packages: resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} dependencies: call-bind: 1.0.2 + dev: true /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} @@ -15233,6 +15383,7 @@ packages: engines: {node: '>= 0.4'} dependencies: has-tostringtag: 1.0.0 + dev: true /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} @@ -15258,6 +15409,7 @@ packages: hasBin: true dependencies: is-docker: 3.0.0 + dev: true /is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} @@ -15436,6 +15588,7 @@ packages: engines: {node: '>=8'} dependencies: is-docker: 2.2.1 + dev: true /isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} @@ -15513,6 +15666,7 @@ packages: has-symbols: 1.0.3 has-tostringtag: 1.0.0 reflect.getprototypeof: 1.0.3 + dev: true /jackspeak@2.2.2: resolution: {integrity: sha512-mgNtVv4vUuaKA97yxUHoA3+FkuhtxkjdXEWOyB/N76fjy0FjezEt34oy3epBtvCvS+7DyKwqCFWx/oJLV5+kCg==} @@ -15886,7 +16040,7 @@ packages: jest-pnp-resolver: 1.2.3(jest-resolve@29.6.2) jest-util: 29.6.2 jest-validate: 29.6.2 - resolve: 1.22.3 + resolve: 1.22.4 resolve.exports: 2.0.2 slash: 3.0.0 @@ -16455,9 +16609,6 @@ packages: p-locate: 6.0.0 dev: true - /lodash.clonedeep@4.5.0: - resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} - /lodash.curry@4.1.1: resolution: {integrity: sha512-/u14pXGviLaweY5JI0IUzgzF2J6Ne8INyzAZjImcryjgkZ+ebruBxy2/JaOOkTqScddcYtakjhSaeemV8lR0tA==} dev: false @@ -16483,12 +16634,6 @@ packages: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true - /lodash.uniq@4.5.0: - resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} - - /lodash.upperfirst@4.3.1: - resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} - /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -16523,7 +16668,6 @@ packages: /long@4.0.0: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} - dev: false /longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -17647,7 +17791,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 + resolve: 1.22.4 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -17818,6 +17962,7 @@ packages: define-lazy-prop: 3.0.0 is-inside-container: 1.0.0 is-wsl: 2.2.0 + dev: true /opener@1.5.2: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} @@ -18365,7 +18510,6 @@ packages: engines: {node: '>=6.0.0'} dependencies: fast-diff: 1.3.0 - dev: false /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} @@ -18378,6 +18522,12 @@ packages: hasBin: true dev: false + /prettier@3.0.3: + resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} + engines: {node: '>=14'} + hasBin: true + dev: true + /pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} dependencies: @@ -19259,7 +19409,7 @@ packages: resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} engines: {node: '>= 0.10'} dependencies: - resolve: 1.22.3 + resolve: 1.22.4 /redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} @@ -19278,6 +19428,7 @@ packages: get-intrinsic: 1.2.1 globalthis: 1.0.3 which-builtin-type: 1.1.3 + dev: true /refractor@3.6.0: resolution: {integrity: sha512-MY9W41IOWxxk31o+YvFCNyNzdkc9M20NoZK5vq6jkv4I/uh2zkWcfudj0Q1fovjUQJrNewS9NMzeTtqPf+n5EA==} @@ -19473,7 +19624,6 @@ packages: /requireindex@1.2.0: resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} engines: {node: '>=0.10.5'} - dev: false /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -19498,25 +19648,25 @@ packages: /resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true /resolve.exports@2.0.2: resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} engines: {node: '>=10'} - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve@1.22.3: + resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true - /resolve@1.22.3: - resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -19524,7 +19674,7 @@ packages: resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -19600,6 +19750,7 @@ packages: engines: {node: '>=12'} dependencies: execa: 5.1.1 + dev: true /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} @@ -20420,6 +20571,7 @@ packages: dependencies: '@pkgr/utils': 2.4.2 tslib: 2.6.1 + dev: true /tai64@1.0.0: resolution: {integrity: sha512-bfidqCho3mtZsqNFyVXc4obhDmRIUbQp2godk137z/z47BJ+oKYIVHgJrdYOAciRJ6+P2iDjDtcm/DgQ7I11fQ==} @@ -20427,11 +20579,11 @@ packages: '@types/long': 4.0.0 '@types/node': 10.12.18 long: 4.0.0 - dev: false /tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} + dev: true /tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} @@ -20625,6 +20777,7 @@ packages: /titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} engines: {node: '>=12'} + dev: true /tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} @@ -20718,6 +20871,7 @@ packages: typescript: '>=4.2.0' dependencies: typescript: 5.1.6 + dev: true /ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} @@ -21348,6 +21502,7 @@ packages: /untildify@4.0.0: resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} engines: {node: '>=8'} + dev: true /upath@2.0.1: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} @@ -21970,6 +22125,7 @@ packages: which-boxed-primitive: 1.0.2 which-collection: 1.0.1 which-typed-array: 1.1.11 + dev: true /which-collection@1.0.1: resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index 34b71c056..000000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "allowSyntheticDefaultImports": true, - "downlevelIteration": true, - "preserveSymlinks": false, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react-jsx", - "lib": ["dom", "esnext"], - "module": "esnext", - "moduleResolution": "node", - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "resolveJsonModule": true, - "skipLibCheck": true, - "sourceMap": true, - "strict": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "strictPropertyInitialization": true, - "suppressImplicitAnyIndexErrors": true, - "ignoreDeprecations": "5.0", - "target": "es2020" - }, - "exclude": ["**/dist", "**/build", "node_modules", "**/node_modules"] -} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 399735eec..5b30b8baf 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "extends": "./tsconfig.base.json", + "extends": "./tsconfig.json", "compilerOptions": { "noEmit": true, "allowJs": true diff --git a/tsconfig.json b/tsconfig.json index ffcbb9477..97b9fecab 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,3 +1,3 @@ { - "extends": "./tsconfig.base.json" + "extends": "@fuels/ts-config/base.json" }