From 6db115a317b1ab3a8eb67e2c0cd08302af8da512 Mon Sep 17 00:00:00 2001 From: Ross Bulat Date: Fri, 7 Jun 2024 14:24:52 +0700 Subject: [PATCH] feat(refactor): Use `@w3ux/types` types (#2156) --- package.json | 7 ++-- src/canvas/CreatePool/PoolName/Input.tsx | 2 +- .../JoinPool/Overview/PerformanceGraph.tsx | 2 +- src/canvas/PoolMembers/Lists/Default.tsx | 2 +- src/canvas/PoolMembers/Lists/Member.tsx | 2 +- src/canvas/PoolMembers/Lists/types.ts | 2 +- src/contexts/Api/types.ts | 3 +- src/contexts/FastUnstake/index.tsx | 3 +- src/contexts/Filters/index.tsx | 2 +- src/contexts/Filters/types.ts | 2 +- src/contexts/LedgerHardware/index.tsx | 3 +- src/contexts/LedgerHardware/static/ledger.ts | 2 +- src/contexts/LedgerHardware/types.ts | 3 +- src/contexts/Payouts/Utils.ts | 3 +- src/contexts/Payouts/index.tsx | 3 +- src/contexts/Payouts/types.ts | 2 +- src/contexts/Pools/BondedPools/index.tsx | 3 +- src/contexts/Pools/BondedPools/types.ts | 3 +- src/contexts/Pools/PoolMembers/index.tsx | 3 +- src/contexts/Pools/PoolMembers/types.ts | 3 +- src/contexts/Pools/PoolPerformance/index.tsx | 2 +- src/contexts/Pools/PoolPerformance/types.ts | 2 +- src/contexts/Proxies/types.ts | 3 +- src/contexts/Setup/types.ts | 3 +- src/contexts/TxMeta/index.tsx | 3 +- src/contexts/TxMeta/types.ts | 3 +- src/contexts/UI/index.tsx | 2 +- src/contexts/Validators/Utils.ts | 3 +- .../Validators/ValidatorEntries/index.tsx | 3 +- src/contexts/Validators/types.ts | 2 +- src/controllers/IdentitiesController/index.ts | 5 ++- src/hooks/useDotLottieButton/index.tsx | 2 +- src/hooks/useFillVariables/index.tsx | 2 +- src/hooks/useNominationStatus/index.tsx | 3 +- src/hooks/useOutsideAlerter/index.tsx | 2 +- src/hooks/usePoolFilters/index.tsx | 2 +- src/hooks/usePrices/index.tsx | 2 +- src/hooks/useProxySupported/index.tsx | 3 +- src/hooks/useSubmitExtrinsic/index.tsx | 3 +- src/hooks/useTimeLeft/utils.ts | 2 +- src/hooks/useUnstaking/index.tsx | 2 +- src/hooks/useValidatorFilters/index.tsx | 2 +- src/hooks/withProviders/index.tsx | 2 +- src/kits/Buttons/ButtonHelp.tsx | 2 +- src/kits/Buttons/ButtonMono.tsx | 2 +- src/kits/Buttons/ButtonMonoInvert.tsx | 2 +- src/kits/Buttons/ButtonOption.tsx | 2 +- src/kits/Buttons/ButtonPrimary.tsx | 2 +- src/kits/Buttons/ButtonPrimaryInvert.tsx | 2 +- src/kits/Buttons/ButtonSecondary.tsx | 2 +- src/kits/Buttons/ButtonSubmit.tsx | 2 +- src/kits/Buttons/ButtonSubmitInvert.tsx | 2 +- src/kits/Buttons/ButtonTab.tsx | 2 +- src/kits/Buttons/ButtonTertiary.tsx | 2 +- src/kits/Buttons/ButtonText.tsx | 2 +- src/kits/Buttons/Utils.ts | 2 +- src/kits/Overlay/Provider/types.ts | 2 +- src/kits/Overlay/structure/CanvasCard.tsx | 2 +- src/kits/Overlay/structure/CanvasContent.tsx | 2 +- src/kits/Overlay/structure/ModalCard.tsx | 2 +- .../Overlay/structure/ModalCustomHeader.tsx | 2 +- src/kits/Overlay/structure/ModalFooter.tsx | 2 +- .../Overlay/structure/ModalHardwareItem.tsx | 2 +- src/kits/Overlay/types.ts | 2 +- src/kits/Structure/Body/index.tsx | 2 +- src/kits/Structure/ButtonRow/index.tsx | 2 +- src/kits/Structure/Entry/index.tsx | 2 +- src/kits/Structure/Main/index.tsx | 2 +- src/kits/Structure/RowSection/index.tsx | 2 +- src/kits/Structure/Separator/index.tsx | 2 +- src/kits/Structure/Side/index.tsx | 2 +- src/kits/Structure/StatBoxRow/index.tsx | 2 +- src/kits/Structure/Tx/types.ts | 2 +- src/library/ActionItem/types.ts | 2 +- src/library/Filter/types.ts | 2 +- src/library/GenerateNominations/index.tsx | 2 +- src/library/GenerateNominations/types.ts | 2 +- src/library/Graphs/EraPoints.tsx | 2 +- src/library/Graphs/GeoDonut.tsx | 2 +- src/library/Graphs/PayoutBar.tsx | 3 +- src/library/Graphs/PayoutLine.tsx | 3 +- src/library/Graphs/Utils.ts | 3 +- src/library/Hardware/HardwareAddress/types.ts | 2 +- .../Hardware/HardwareStatusBar/types.ts | 2 +- src/library/Import/types.ts | 2 +- src/library/List/context.tsx | 2 +- src/library/List/index.ts | 2 +- src/library/List/types.ts | 2 +- src/library/Modal/Title.tsx | 2 +- src/library/Nominations/types.ts | 2 +- src/library/Pool/Rewards.tsx | 2 +- src/library/Pool/types.ts | 2 +- src/library/QRCode/qrcode.ts | 2 +- src/library/SelectItems/index.tsx | 2 +- src/library/SelectItems/types.ts | 3 +- src/library/SetupSteps/Nominate.tsx | 2 +- src/library/SideMenu/Main.tsx | 3 +- src/library/SideMenu/types.ts | 2 +- src/library/Stat/index.tsx | 2 +- src/library/Stat/types.ts | 3 +- src/library/StatBoxList/Item.tsx | 2 +- src/library/StatBoxList/Pie.tsx | 2 +- .../SubmitTx/ManualSign/Vault/SignPrompt.tsx | 2 +- src/library/SubmitTx/types.ts | 3 +- .../ValidatorList/ValidatorItem/Default.tsx | 2 +- .../ValidatorList/ValidatorItem/Utils.tsx | 2 +- .../ValidatorList/ValidatorItem/types.ts | 3 +- src/library/ValidatorList/types.ts | 9 +--- src/locale/index.tsx | 2 +- src/locale/utils.ts | 3 +- src/modals/Connect/index.tsx | 2 +- src/modals/ImportLedger/Addresses.tsx | 2 +- src/modals/ImportLedger/Manage.tsx | 2 +- src/modals/ImportLedger/Reset.tsx | 2 +- src/modals/ImportLedger/Splash.tsx | 2 +- src/modals/ImportLedger/index.tsx | 2 +- src/modals/ImportVault/Reader.tsx | 2 +- src/modals/ImportVault/index.tsx | 2 +- .../Forms/ManageCommission/provider/types.ts | 3 +- src/modals/Utils/StaticNote.tsx | 2 +- src/modals/ValidatorMetrics/index.tsx | 2 +- src/pages/Overview/StakeStatus/Tips/index.tsx | 2 +- src/pages/Pools/Roles/types.ts | 2 +- src/theme/graphs.ts | 2 +- src/types.ts | 28 +------------ src/workers/poolPerformance.ts | 2 +- src/workers/stakers.ts | 2 +- yarn.lock | 42 +++++++++++-------- 128 files changed, 188 insertions(+), 178 deletions(-) diff --git a/package.json b/package.json index 69096a3c23..36ac1a79b5 100644 --- a/package.json +++ b/package.json @@ -33,10 +33,10 @@ "@substrate/connect": "0.7.35", "@w3ux/extension-assets": "^0.2.6", "@w3ux/hooks": "^1.0.0", - "@w3ux/react-connect-kit": "^1.1.0", + "@w3ux/react-connect-kit": "^1.2.1", "@w3ux/react-odometer": "^1.0.0", - "@w3ux/react-polkicon": "^1.1.0", - "@w3ux/utils": "^0.2.0", + "@w3ux/react-polkicon": "^1.1.1", + "@w3ux/utils": "^0.3.0", "@w3ux/validator-assets": "^0.1.0", "@zondax/ledger-substrate": "^0.44.2", "bignumber.js": "^9.1.2", @@ -77,6 +77,7 @@ "@typescript-eslint/eslint-plugin": "^7.12.0", "@typescript-eslint/parser": "^7.12.0", "@vitejs/plugin-react-swc": "^3.7.0", + "@w3ux/types": "^0.1.0", "eslint": "8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-typescript": "^3.6.1", diff --git a/src/canvas/CreatePool/PoolName/Input.tsx b/src/canvas/CreatePool/PoolName/Input.tsx index 5b77026a8b..7697903311 100644 --- a/src/canvas/CreatePool/PoolName/Input.tsx +++ b/src/canvas/CreatePool/PoolName/Input.tsx @@ -5,7 +5,7 @@ import type { FormEvent } from 'react'; import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const Input = ({ listenIsValid, diff --git a/src/canvas/JoinPool/Overview/PerformanceGraph.tsx b/src/canvas/JoinPool/Overview/PerformanceGraph.tsx index 7d8c1126b2..172bab91c8 100644 --- a/src/canvas/JoinPool/Overview/PerformanceGraph.tsx +++ b/src/canvas/JoinPool/Overview/PerformanceGraph.tsx @@ -16,7 +16,7 @@ import { useNetwork } from 'contexts/Network'; import { GraphWrapper, HeadingWrapper } from '../Wrappers'; import { Line } from 'react-chartjs-2'; import BigNumber from 'bignumber.js'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { graphColors } from 'theme/graphs'; import { useTheme } from 'contexts/Themes'; import { ButtonHelp } from 'kits/Buttons/ButtonHelp'; diff --git a/src/canvas/PoolMembers/Lists/Default.tsx b/src/canvas/PoolMembers/Lists/Default.tsx index b8d7d676bd..744dce859e 100644 --- a/src/canvas/PoolMembers/Lists/Default.tsx +++ b/src/canvas/PoolMembers/Lists/Default.tsx @@ -10,7 +10,7 @@ import { usePoolMembers } from 'contexts/Pools/PoolMembers'; import { List, ListStatusHeader, Wrapper as ListWrapper } from 'library/List'; import { Pagination } from 'library/List/Pagination'; import { ListProvider } from 'library/List/context'; -import type { Sync } from 'types'; +import type { Sync } from '@w3ux/types'; import { Member } from './Member'; import type { DefaultMembersListProps } from './types'; import type { PoolMember } from 'contexts/Pools/PoolMembers/types'; diff --git a/src/canvas/PoolMembers/Lists/Member.tsx b/src/canvas/PoolMembers/Lists/Member.tsx index 5d1692730a..7d02e0130e 100644 --- a/src/canvas/PoolMembers/Lists/Member.tsx +++ b/src/canvas/PoolMembers/Lists/Member.tsx @@ -18,7 +18,7 @@ import { Identity } from 'library/ListItem/Labels/Identity'; import { PoolMemberBonded } from 'library/ListItem/Labels/PoolMemberBonded'; import { Select } from 'library/ListItem/Labels/Select'; import { Labels, Separator, Wrapper } from 'library/ListItem/Wrappers'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { usePrompt } from 'contexts/Prompt'; import { UnbondMember } from '../Prompts/UnbondMember'; import { WithdrawMember } from '../Prompts/WithdrawMember'; diff --git a/src/canvas/PoolMembers/Lists/types.ts b/src/canvas/PoolMembers/Lists/types.ts index ea4d49b511..8278d5c002 100644 --- a/src/canvas/PoolMembers/Lists/types.ts +++ b/src/canvas/PoolMembers/Lists/types.ts @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export interface MembersListProps { pagination: boolean; diff --git a/src/contexts/Api/types.ts b/src/contexts/Api/types.ts index cd4e7d90bf..17789df51c 100644 --- a/src/contexts/Api/types.ts +++ b/src/contexts/Api/types.ts @@ -5,8 +5,9 @@ import type { ApiPromise } from '@polkadot/api'; import type { U8aLike } from '@polkadot/util/types'; import type BigNumber from 'bignumber.js'; import type { ReactNode } from 'react'; -import type { AnyJson, NetworkName } from '../../types'; +import type { NetworkName } from '../../types'; import type { ApiStatus, ConnectionType } from 'model/Api/types'; +import type { AnyJson } from '@w3ux/types'; export interface APIProviderProps { children: ReactNode; diff --git a/src/contexts/FastUnstake/index.tsx b/src/contexts/FastUnstake/index.tsx index 7b06a23541..efde1f1a94 100644 --- a/src/contexts/FastUnstake/index.tsx +++ b/src/contexts/FastUnstake/index.tsx @@ -12,7 +12,7 @@ import type { ReactNode } from 'react'; import { createContext, useContext, useEffect, useRef, useState } from 'react'; import { useApi } from 'contexts/Api'; import { useStaking } from 'contexts/Staking'; -import type { AnyApi, AnyJson, MaybeAddress } from 'types'; +import type { AnyApi, MaybeAddress } from 'types'; import Worker from 'workers/stakers?worker'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; import { validateLocalExposure } from 'contexts/Validators/Utils'; @@ -24,6 +24,7 @@ import type { LocalMeta, MetaInterface, } from './types'; +import type { AnyJson } from '@w3ux/types'; const worker = new Worker(); diff --git a/src/contexts/Filters/index.tsx b/src/contexts/Filters/index.tsx index f1b4e8bae2..eb7d6b5b5e 100644 --- a/src/contexts/Filters/index.tsx +++ b/src/contexts/Filters/index.tsx @@ -3,7 +3,7 @@ import type { ReactNode } from 'react'; import { createContext, useContext, useState } from 'react'; -import type { AnyFunction, AnyJson } from 'types'; +import type { AnyFunction, AnyJson } from '@w3ux/types'; import { defaultExcludes, defaultFiltersInterface, diff --git a/src/contexts/Filters/types.ts b/src/contexts/Filters/types.ts index 71bfeac79d..bfa84944e1 100644 --- a/src/contexts/Filters/types.ts +++ b/src/contexts/Filters/types.ts @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { AnyFunction, AnyJson } from 'types'; +import type { AnyFunction, AnyJson } from '@w3ux/types'; export type FilterType = 'exclude' | 'include'; diff --git a/src/contexts/LedgerHardware/index.tsx b/src/contexts/LedgerHardware/index.tsx index c8669c361f..1840e1716d 100644 --- a/src/contexts/LedgerHardware/index.tsx +++ b/src/contexts/LedgerHardware/index.tsx @@ -5,7 +5,7 @@ import { setStateWithRef } from '@w3ux/utils'; import type { ReactNode } from 'react'; import { createContext, useContext, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import type { AnyJson, MaybeString } from 'types'; +import type { MaybeString } from 'types'; import { useApi } from 'contexts/Api'; import { getLedgerErrorType } from './Utils'; import { defaultFeedback, defaultLedgerHardwareContext } from './defaults'; @@ -17,6 +17,7 @@ import type { LedgerStatusCode, } from './types'; import { Ledger } from './static/ledger'; +import type { AnyJson } from '@w3ux/types'; export const LedgerHardwareContext = createContext(defaultLedgerHardwareContext); diff --git a/src/contexts/LedgerHardware/static/ledger.ts b/src/contexts/LedgerHardware/static/ledger.ts index 6d563ab099..6b85201692 100644 --- a/src/contexts/LedgerHardware/static/ledger.ts +++ b/src/contexts/LedgerHardware/static/ledger.ts @@ -5,7 +5,7 @@ import TransportWebHID from '@ledgerhq/hw-transport-webhid'; import { newSubstrateApp, type SubstrateApp } from '@zondax/ledger-substrate'; import { withTimeout } from '@w3ux/utils'; import { u8aToBuffer } from '@polkadot/util'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; const LEDGER_DEFAULT_ACCOUNT = 0x80000000; const LEDGER_DEFAULT_CHANGE = 0x80000000; diff --git a/src/contexts/LedgerHardware/types.ts b/src/contexts/LedgerHardware/types.ts index 51ec495300..03b9ba157f 100644 --- a/src/contexts/LedgerHardware/types.ts +++ b/src/contexts/LedgerHardware/types.ts @@ -1,8 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import type { FunctionComponent, SVGProps } from 'react'; -import type { AnyJson, MaybeString, NetworkName } from 'types'; +import type { MaybeString, NetworkName } from 'types'; export interface LedgerHardwareContextInterface { integrityChecked: boolean; diff --git a/src/contexts/Payouts/Utils.ts b/src/contexts/Payouts/Utils.ts index 93e69a2dcd..2a02e3df84 100644 --- a/src/contexts/Payouts/Utils.ts +++ b/src/contexts/Payouts/Utils.ts @@ -2,8 +2,9 @@ // SPDX-License-Identifier: GPL-3.0-only import BigNumber from 'bignumber.js'; -import type { AnyJson, NetworkName } from 'types'; +import type { NetworkName } from 'types'; import type { LocalValidatorExposure } from './types'; +import type { AnyJson } from '@w3ux/types'; // Check if local exposure entry exists for an era. export const hasLocalEraExposure = ( diff --git a/src/contexts/Payouts/index.tsx b/src/contexts/Payouts/index.tsx index a9d0635e13..d1bff6ecef 100644 --- a/src/contexts/Payouts/index.tsx +++ b/src/contexts/Payouts/index.tsx @@ -5,7 +5,8 @@ import type { ReactNode } from 'react'; import { useState, useEffect, useRef, useContext, createContext } from 'react'; import { useStaking } from 'contexts/Staking'; import { useApi } from 'contexts/Api'; -import type { AnyApi, AnyJson, Sync } from 'types'; +import type { AnyApi } from 'types'; +import type { AnyJson, Sync } from '@w3ux/types'; import Worker from 'workers/stakers?worker'; import { rmCommas, setStateWithRef } from '@w3ux/utils'; import BigNumber from 'bignumber.js'; diff --git a/src/contexts/Payouts/types.ts b/src/contexts/Payouts/types.ts index 3fa60c3ddf..76b0650bda 100644 --- a/src/contexts/Payouts/types.ts +++ b/src/contexts/Payouts/types.ts @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { Sync } from 'types'; +import type { Sync } from '@w3ux/types'; export interface PayoutsContextInterface { payoutsSynced: Sync; diff --git a/src/contexts/Pools/BondedPools/index.tsx b/src/contexts/Pools/BondedPools/index.tsx index e110524485..a9461ab1f1 100644 --- a/src/contexts/Pools/BondedPools/index.tsx +++ b/src/contexts/Pools/BondedPools/index.tsx @@ -15,7 +15,8 @@ import type { PoolTab, } from './types'; import { useStaking } from 'contexts/Staking'; -import type { AnyApi, AnyJson, MaybeAddress, Sync } from 'types'; +import type { AnyApi, MaybeAddress } from 'types'; +import type { AnyJson, Sync } from '@w3ux/types'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; import { useNetwork } from 'contexts/Network'; import { useApi } from '../../Api'; diff --git a/src/contexts/Pools/BondedPools/types.ts b/src/contexts/Pools/BondedPools/types.ts index 547cdbb5ab..e768974c38 100644 --- a/src/contexts/Pools/BondedPools/types.ts +++ b/src/contexts/Pools/BondedPools/types.ts @@ -1,10 +1,11 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { AnyApi, AnyJson, MaybeAddress } from 'types'; +import type { AnyApi, MaybeAddress } from 'types'; import type { ActiveBondedPool } from '../ActivePool/types'; import type { AnyFilter } from 'library/Filter/types'; import type { Dispatch, SetStateAction } from 'react'; +import type { AnyJson } from '@w3ux/types'; export interface BondedPoolsContextState { queryBondedPool: (poolId: number) => AnyApi; diff --git a/src/contexts/Pools/PoolMembers/index.tsx b/src/contexts/Pools/PoolMembers/index.tsx index 9c8154e9ab..0c0d20a199 100644 --- a/src/contexts/Pools/PoolMembers/index.tsx +++ b/src/contexts/Pools/PoolMembers/index.tsx @@ -5,13 +5,14 @@ import { setStateWithRef } from '@w3ux/utils'; import type { ReactNode } from 'react'; import { createContext, useContext, useRef, useState } from 'react'; import { usePlugins } from 'contexts/Plugins'; -import type { AnyApi, AnyMetaBatch, Fn, MaybeAddress, Sync } from 'types'; +import type { AnyApi, AnyMetaBatch, Fn, MaybeAddress } from 'types'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; import { useNetwork } from 'contexts/Network'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useApi } from '../../Api'; import { defaultPoolMembers } from './defaults'; import type { PoolMember, PoolMemberContext } from './types'; +import type { Sync } from '@w3ux/types'; export const PoolMembersContext = createContext(defaultPoolMembers); diff --git a/src/contexts/Pools/PoolMembers/types.ts b/src/contexts/Pools/PoolMembers/types.ts index 7c7b4d7612..9587a711a2 100644 --- a/src/contexts/Pools/PoolMembers/types.ts +++ b/src/contexts/Pools/PoolMembers/types.ts @@ -1,7 +1,8 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { AnyMetaBatch, MaybeAddress, Sync } from 'types'; +import type { Sync } from '@w3ux/types'; +import type { AnyMetaBatch, MaybeAddress } from 'types'; export interface PoolMemberContext { fetchPoolMembersMetaBatch: (k: string, v: AnyMetaBatch[], r: boolean) => void; diff --git a/src/contexts/Pools/PoolPerformance/index.tsx b/src/contexts/Pools/PoolPerformance/index.tsx index 3efa8aff97..c42d363fc7 100644 --- a/src/contexts/Pools/PoolPerformance/index.tsx +++ b/src/contexts/Pools/PoolPerformance/index.tsx @@ -24,7 +24,7 @@ import { defaultPoolPerformanceTask, defaultPoolPerformanceContext, } from './defaults'; -import type { Sync } from 'types'; +import type { Sync } from '@w3ux/types'; const worker = new Worker(); diff --git a/src/contexts/Pools/PoolPerformance/types.ts b/src/contexts/Pools/PoolPerformance/types.ts index 6f0a735f1c..95f60083b7 100644 --- a/src/contexts/Pools/PoolPerformance/types.ts +++ b/src/contexts/Pools/PoolPerformance/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type BigNumber from 'bignumber.js'; -import type { Sync } from 'types'; +import type { Sync } from '@w3ux/types'; export interface PoolPerformanceContextInterface { getPoolRewardPoints: (key: PoolRewardPointsKey) => PoolRewardPoints; diff --git a/src/contexts/Proxies/types.ts b/src/contexts/Proxies/types.ts index 861ab6ee64..ce051c6623 100644 --- a/src/contexts/Proxies/types.ts +++ b/src/contexts/Proxies/types.ts @@ -1,8 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import type BigNumber from 'bignumber.js'; -import type { AnyJson, MaybeAddress } from 'types'; +import type { MaybeAddress } from 'types'; export type ProxyType = | 'Any' diff --git a/src/contexts/Setup/types.ts b/src/contexts/Setup/types.ts index 1ab6dcaebd..b63a5895de 100644 --- a/src/contexts/Setup/types.ts +++ b/src/contexts/Setup/types.ts @@ -1,9 +1,10 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import type { PoolRoles } from 'contexts/Pools/ActivePool/types'; import type { ValidatorPrefs } from 'contexts/Validators/types'; -import type { AnyJson, BondFor, MaybeAddress, MaybeString } from 'types'; +import type { BondFor, MaybeAddress, MaybeString } from 'types'; export type PayeeOptions = | 'Staked' diff --git a/src/contexts/TxMeta/index.tsx b/src/contexts/TxMeta/index.tsx index bb52ad3744..69ae892582 100644 --- a/src/contexts/TxMeta/index.tsx +++ b/src/contexts/TxMeta/index.tsx @@ -7,7 +7,7 @@ import type { ReactNode } from 'react'; import { createContext, useContext, useRef, useState } from 'react'; import { useBonded } from 'contexts/Bonded'; import { useStaking } from 'contexts/Staking'; -import type { AnyJson, MaybeAddress } from 'types'; +import type { MaybeAddress } from 'types'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useImportedAccounts } from 'contexts/Connect/ImportedAccounts'; import * as defaults from './defaults'; @@ -15,6 +15,7 @@ import type { TxMetaContextInterface } from './types'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; import { useActiveBalances } from 'hooks/useActiveBalances'; import { useApi } from 'contexts/Api'; +import type { AnyJson } from '@w3ux/types'; export const TxMetaContext = createContext( defaults.defaultTxMeta diff --git a/src/contexts/TxMeta/types.ts b/src/contexts/TxMeta/types.ts index b9dea49042..5ba6ebcadb 100644 --- a/src/contexts/TxMeta/types.ts +++ b/src/contexts/TxMeta/types.ts @@ -1,8 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import type BigNumber from 'bignumber.js'; -import type { AnyJson, MaybeAddress } from 'types'; +import type { MaybeAddress } from 'types'; export interface TxMetaContextInterface { sender: MaybeAddress; diff --git a/src/contexts/UI/index.tsx b/src/contexts/UI/index.tsx index 84b3e5072f..a6b666f317 100644 --- a/src/contexts/UI/index.tsx +++ b/src/contexts/UI/index.tsx @@ -6,7 +6,7 @@ import type { ReactNode, RefObject } from 'react'; import { createContext, useContext, useEffect, useRef, useState } from 'react'; import { PageWidthMediumThreshold } from 'consts'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import * as defaults from './defaults'; import type { UIContextInterface } from './types'; diff --git a/src/contexts/Validators/Utils.ts b/src/contexts/Validators/Utils.ts index 60d99aa50c..1370670467 100644 --- a/src/contexts/Validators/Utils.ts +++ b/src/contexts/Validators/Utils.ts @@ -1,6 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import BigNumber from 'bignumber.js'; import type { LocalMeta } from 'contexts/FastUnstake/types'; import type { @@ -8,7 +9,7 @@ import type { LocalValidatorEntriesData, Validator, } from 'contexts/Validators/types'; -import type { AnyJson, NetworkName } from 'types'; +import type { NetworkName } from 'types'; // Get favorite validators from local storage. export const getLocalFavorites = (network: NetworkName) => { diff --git a/src/contexts/Validators/ValidatorEntries/index.tsx b/src/contexts/Validators/ValidatorEntries/index.tsx index 7c81484a4a..766bbb537c 100644 --- a/src/contexts/Validators/ValidatorEntries/index.tsx +++ b/src/contexts/Validators/ValidatorEntries/index.tsx @@ -5,7 +5,7 @@ import { greaterThanZero, rmCommas, shuffle } from '@w3ux/utils'; import BigNumber from 'bignumber.js'; import type { ReactNode } from 'react'; import { createContext, useContext, useEffect, useRef, useState } from 'react'; -import type { AnyApi, AnyJson, Fn, Sync } from 'types'; +import type { AnyApi, Fn } from 'types'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; import { useNetwork } from 'contexts/Network'; import { useApi } from 'contexts/Api'; @@ -32,6 +32,7 @@ import { import { getLocalEraValidators, setLocalEraValidators } from '../Utils'; import { useErasPerDay } from 'hooks/useErasPerDay'; import { IdentitiesController } from 'controllers/IdentitiesController'; +import type { AnyJson, Sync } from '@w3ux/types'; export const ValidatorsContext = createContext( defaultValidatorsContext diff --git a/src/contexts/Validators/types.ts b/src/contexts/Validators/types.ts index 4895714b9e..6915192fd2 100644 --- a/src/contexts/Validators/types.ts +++ b/src/contexts/Validators/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type BigNumber from 'bignumber.js'; -import type { AnyJson, Sync } from 'types'; +import type { AnyJson, Sync } from '@w3ux/types'; export interface ValidatorsContextInterface { fetchValidatorPrefs: (a: ValidatorAddresses) => Promise; diff --git a/src/controllers/IdentitiesController/index.ts b/src/controllers/IdentitiesController/index.ts index 4aedf5013a..a7cdc450fa 100644 --- a/src/controllers/IdentitiesController/index.ts +++ b/src/controllers/IdentitiesController/index.ts @@ -1,8 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { AnyApi, AnyJson } from 'types'; +import type { AnyApi } from 'types'; import type { ApiPromise } from '@polkadot/api'; +import type { AnyJson } from '@w3ux/types'; export class IdentitiesController { static fetch = async (api: ApiPromise, addresses: string[]) => { @@ -20,7 +21,7 @@ export class IdentitiesController { return Object.fromEntries( data .map((key: string, index: number) => [addresses[index], key]) - .filter(([, value]: AnyJson) => value !== null) + .filter(([, value]) => value !== null) ); }; diff --git a/src/hooks/useDotLottieButton/index.tsx b/src/hooks/useDotLottieButton/index.tsx index a5fbe4071a..b11647fe0e 100644 --- a/src/hooks/useDotLottieButton/index.tsx +++ b/src/hooks/useDotLottieButton/index.tsx @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'; import { useEffect, useRef, useState } from 'react'; import { useTheme } from 'contexts/Themes'; import type { Theme } from 'contexts/Themes/types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const useDotLottieButton = (filename: string, options: AnyJson = {}) => { const { mode } = useTheme(); diff --git a/src/hooks/useFillVariables/index.tsx b/src/hooks/useFillVariables/index.tsx index e2e0feae22..279696109d 100644 --- a/src/hooks/useFillVariables/index.tsx +++ b/src/hooks/useFillVariables/index.tsx @@ -4,7 +4,7 @@ import { capitalizeFirstLetter, planckToUnit } from '@w3ux/utils'; import { useApi } from 'contexts/Api'; import { useNetwork } from 'contexts/Network'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useErasPerDay } from '../useErasPerDay'; export const useFillVariables = () => { diff --git a/src/hooks/useNominationStatus/index.tsx b/src/hooks/useNominationStatus/index.tsx index bb157d4a48..72c62ae02e 100644 --- a/src/hooks/useNominationStatus/index.tsx +++ b/src/hooks/useNominationStatus/index.tsx @@ -5,9 +5,10 @@ import { useTranslation } from 'react-i18next'; import { useActivePool } from 'contexts/Pools/ActivePool'; import { useStaking } from 'contexts/Staking'; import { useValidators } from 'contexts/Validators/ValidatorEntries'; -import type { AnyJson, BondFor, MaybeAddress } from 'types'; +import type { BondFor, MaybeAddress } from 'types'; import { useSyncing } from 'hooks/useSyncing'; import { useBalances } from 'contexts/Balances'; +import type { AnyJson } from '@w3ux/types'; export const useNominationStatus = () => { const { t } = useTranslation(); diff --git a/src/hooks/useOutsideAlerter/index.tsx b/src/hooks/useOutsideAlerter/index.tsx index aa7636c3c9..bdf83b10cb 100644 --- a/src/hooks/useOutsideAlerter/index.tsx +++ b/src/hooks/useOutsideAlerter/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import { useEffect, type RefObject } from 'react'; -import type { AnyFunction, AnyJson } from 'types'; +import type { AnyFunction, AnyJson } from '@w3ux/types'; // A hook that alerts clicks outside of the passed ref. export const useOutsideAlerter = ( diff --git a/src/hooks/usePoolFilters/index.tsx b/src/hooks/usePoolFilters/index.tsx index 4f56d815e6..fdda8bd1ad 100644 --- a/src/hooks/usePoolFilters/index.tsx +++ b/src/hooks/usePoolFilters/index.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'; import { useBondedPools } from 'contexts/Pools/BondedPools'; import { useStaking } from 'contexts/Staking'; -import type { AnyFunction, AnyJson } from 'types'; +import type { AnyFunction, AnyJson } from '@w3ux/types'; import type { AnyFilter } from 'library/Filter/types'; import type { BondedPool } from 'contexts/Pools/BondedPools/types'; diff --git a/src/hooks/usePrices/index.tsx b/src/hooks/usePrices/index.tsx index 7406c7bd73..c527667461 100644 --- a/src/hooks/usePrices/index.tsx +++ b/src/hooks/usePrices/index.tsx @@ -5,7 +5,7 @@ import { useEffect, useRef, useState } from 'react'; import { usePlugins } from 'contexts/Plugins'; import { useUnitPrice } from 'hooks/useUnitPrice'; import { useNetwork } from 'contexts/Network'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const usePrices = () => { const { network } = useNetwork(); diff --git a/src/hooks/useProxySupported/index.tsx b/src/hooks/useProxySupported/index.tsx index 86c613baf1..d13cfd9212 100644 --- a/src/hooks/useProxySupported/index.tsx +++ b/src/hooks/useProxySupported/index.tsx @@ -8,7 +8,8 @@ import { import { useBonded } from 'contexts/Bonded'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useProxies } from 'contexts/Proxies'; -import type { AnyApi, AnyJson, MaybeAddress } from 'types'; +import type { AnyApi, MaybeAddress } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const useProxySupported = () => { const { getBondedAccount } = useBonded(); diff --git a/src/hooks/useSubmitExtrinsic/index.tsx b/src/hooks/useSubmitExtrinsic/index.tsx index e87287f4e0..9a41b9ff39 100644 --- a/src/hooks/useSubmitExtrinsic/index.tsx +++ b/src/hooks/useSubmitExtrinsic/index.tsx @@ -8,7 +8,7 @@ import { DappName, ManualSigners } from 'consts'; import { useApi } from 'contexts/Api'; import { useLedgerHardware } from 'contexts/LedgerHardware'; import { useTxMeta } from 'contexts/TxMeta'; -import type { AnyApi, AnyJson } from 'types'; +import type { AnyApi } from 'types'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useImportedAccounts } from 'contexts/Connect/ImportedAccounts'; import { useBuildPayload } from '../useBuildPayload'; @@ -16,6 +16,7 @@ import { useProxySupported } from '../useProxySupported'; import type { UseSubmitExtrinsic, UseSubmitExtrinsicProps } from './types'; import { NotificationsController } from 'controllers/NotificationsController'; import { useExtensions } from '@w3ux/react-connect-kit'; +import type { AnyJson } from '@w3ux/types'; export const useSubmitExtrinsic = ({ tx, diff --git a/src/hooks/useTimeLeft/utils.ts b/src/hooks/useTimeLeft/utils.ts index 3bdb784420..fbb3695639 100644 --- a/src/hooks/useTimeLeft/utils.ts +++ b/src/hooks/useTimeLeft/utils.ts @@ -7,7 +7,7 @@ import { getUnixTime, intervalToDuration, } from 'date-fns'; -import type { AnyFunction } from 'types'; +import type { AnyFunction } from '@w3ux/types'; import { defaultDuration } from './defaults'; import type { TimeleftDuration } from './types'; diff --git a/src/hooks/useUnstaking/index.tsx b/src/hooks/useUnstaking/index.tsx index bbc98d08ea..14ce3a5b64 100644 --- a/src/hooks/useUnstaking/index.tsx +++ b/src/hooks/useUnstaking/index.tsx @@ -6,7 +6,7 @@ import { useApi } from 'contexts/Api'; import { useFastUnstake } from 'contexts/FastUnstake'; import { useStaking } from 'contexts/Staking'; import { useTransferOptions } from 'contexts/TransferOptions'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useNominationStatus } from '../useNominationStatus'; diff --git a/src/hooks/useValidatorFilters/index.tsx b/src/hooks/useValidatorFilters/index.tsx index b2aac95fc4..d079afd169 100644 --- a/src/hooks/useValidatorFilters/index.tsx +++ b/src/hooks/useValidatorFilters/index.tsx @@ -4,7 +4,7 @@ import { u8aToString, u8aUnwrapBytes } from '@polkadot/util'; import { useTranslation } from 'react-i18next'; import { useValidators } from 'contexts/Validators/ValidatorEntries'; -import type { AnyFunction, AnyJson } from 'types'; +import type { AnyFunction, AnyJson } from '@w3ux/types'; import { MaxEraRewardPointsEras } from 'consts'; import type { AnyFilter } from 'library/Filter/types'; diff --git a/src/hooks/withProviders/index.tsx b/src/hooks/withProviders/index.tsx index 404f1ac666..13d89ed0f7 100644 --- a/src/hooks/withProviders/index.tsx +++ b/src/hooks/withProviders/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { FC } from 'react'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; // `providers` accepts standalone functional components or an array of a functional component and its props. export type Provider = FC | [FC, AnyJson]; diff --git a/src/kits/Buttons/ButtonHelp.tsx b/src/kits/Buttons/ButtonHelp.tsx index 67e2f89469..2562e2ce41 100644 --- a/src/kits/Buttons/ButtonHelp.tsx +++ b/src/kits/Buttons/ButtonHelp.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import InfoSVG from './svg/help.svg?react'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps } from './types'; import { appendOrEmpty } from '@w3ux/utils'; import { onMouseHandlers } from './Utils'; diff --git a/src/kits/Buttons/ButtonMono.tsx b/src/kits/Buttons/ButtonMono.tsx index 2be22df9c4..6328e041f9 100644 --- a/src/kits/Buttons/ButtonMono.tsx +++ b/src/kits/Buttons/ButtonMono.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; import { onMouseHandlers } from './Utils'; diff --git a/src/kits/Buttons/ButtonMonoInvert.tsx b/src/kits/Buttons/ButtonMonoInvert.tsx index 94bcd25568..1fc14834a6 100644 --- a/src/kits/Buttons/ButtonMonoInvert.tsx +++ b/src/kits/Buttons/ButtonMonoInvert.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/ButtonOption.tsx b/src/kits/Buttons/ButtonOption.tsx index 74de54fc0e..3173f329de 100644 --- a/src/kits/Buttons/ButtonOption.tsx +++ b/src/kits/Buttons/ButtonOption.tsx @@ -3,7 +3,7 @@ import { faChevronRight } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps } from './types'; import { appendOrEmpty } from '@w3ux/utils'; import { onMouseHandlers } from './Utils'; diff --git a/src/kits/Buttons/ButtonPrimary.tsx b/src/kits/Buttons/ButtonPrimary.tsx index 6853e32b01..9031df5420 100644 --- a/src/kits/Buttons/ButtonPrimary.tsx +++ b/src/kits/Buttons/ButtonPrimary.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; diff --git a/src/kits/Buttons/ButtonPrimaryInvert.tsx b/src/kits/Buttons/ButtonPrimaryInvert.tsx index 5330d0858e..0154b2cf1c 100644 --- a/src/kits/Buttons/ButtonPrimaryInvert.tsx +++ b/src/kits/Buttons/ButtonPrimaryInvert.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/ButtonSecondary.tsx b/src/kits/Buttons/ButtonSecondary.tsx index aae3e0bd3d..e7e2912417 100644 --- a/src/kits/Buttons/ButtonSecondary.tsx +++ b/src/kits/Buttons/ButtonSecondary.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/ButtonSubmit.tsx b/src/kits/Buttons/ButtonSubmit.tsx index f54e689e2f..1c52bcaa9a 100644 --- a/src/kits/Buttons/ButtonSubmit.tsx +++ b/src/kits/Buttons/ButtonSubmit.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/ButtonSubmitInvert.tsx b/src/kits/Buttons/ButtonSubmitInvert.tsx index 4765e8759a..eb86f0f06b 100644 --- a/src/kits/Buttons/ButtonSubmitInvert.tsx +++ b/src/kits/Buttons/ButtonSubmitInvert.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOr, appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/ButtonTab.tsx b/src/kits/Buttons/ButtonTab.tsx index 7cad7dea23..8b85f07176 100644 --- a/src/kits/Buttons/ButtonTab.tsx +++ b/src/kits/Buttons/ButtonTab.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps } from './types'; import { appendOrEmpty } from '@w3ux/utils'; import { onMouseHandlers } from './Utils'; diff --git a/src/kits/Buttons/ButtonTertiary.tsx b/src/kits/Buttons/ButtonTertiary.tsx index 8771d9f890..71b3ba9bf9 100644 --- a/src/kits/Buttons/ButtonTertiary.tsx +++ b/src/kits/Buttons/ButtonTertiary.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/ButtonText.tsx b/src/kits/Buttons/ButtonText.tsx index 34444abeec..73768e5210 100644 --- a/src/kits/Buttons/ButtonText.tsx +++ b/src/kits/Buttons/ButtonText.tsx @@ -3,7 +3,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { motion } from 'framer-motion'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; import type { ButtonCommonProps, ButtonIconProps } from './types'; import { onMouseHandlers } from './Utils'; import { appendOrEmpty } from '@w3ux/utils'; diff --git a/src/kits/Buttons/Utils.ts b/src/kits/Buttons/Utils.ts index e28ff8aa5d..ba706dfb93 100644 --- a/src/kits/Buttons/Utils.ts +++ b/src/kits/Buttons/Utils.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { MouseEvent } from 'react'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; // Formats mouse handlers for buttons given its props. export const onMouseHandlers = (props: AnyJson) => { diff --git a/src/kits/Overlay/Provider/types.ts b/src/kits/Overlay/Provider/types.ts index 4005bda16f..ccc1fc487c 100644 --- a/src/kits/Overlay/Provider/types.ts +++ b/src/kits/Overlay/Provider/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { RefObject, FC } from 'react'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export interface OverlayContextInterface { openOverlayInstances: number; diff --git a/src/kits/Overlay/structure/CanvasCard.tsx b/src/kits/Overlay/structure/CanvasCard.tsx index de103982f0..15467c4c14 100644 --- a/src/kits/Overlay/structure/CanvasCard.tsx +++ b/src/kits/Overlay/structure/CanvasCard.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; /** * @name CanvasCard diff --git a/src/kits/Overlay/structure/CanvasContent.tsx b/src/kits/Overlay/structure/CanvasContent.tsx index 3b85cdc9cc..f9872ec93c 100644 --- a/src/kits/Overlay/structure/CanvasContent.tsx +++ b/src/kits/Overlay/structure/CanvasContent.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; /** * @name CanvasContent diff --git a/src/kits/Overlay/structure/ModalCard.tsx b/src/kits/Overlay/structure/ModalCard.tsx index 2b40e4b355..271b3377c9 100644 --- a/src/kits/Overlay/structure/ModalCard.tsx +++ b/src/kits/Overlay/structure/ModalCard.tsx @@ -3,7 +3,7 @@ import type { ForwardedRef } from 'react'; import { forwardRef } from 'react'; -import type { ComponentBaseWithClassName } from 'types'; +import type { ComponentBaseWithClassName } from '@w3ux/types'; /** * @name ModalCard diff --git a/src/kits/Overlay/structure/ModalCustomHeader.tsx b/src/kits/Overlay/structure/ModalCustomHeader.tsx index acca8e5a8b..c587e817e6 100644 --- a/src/kits/Overlay/structure/ModalCustomHeader.tsx +++ b/src/kits/Overlay/structure/ModalCustomHeader.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; /** * @name ModalCustomHeader diff --git a/src/kits/Overlay/structure/ModalFooter.tsx b/src/kits/Overlay/structure/ModalFooter.tsx index d82685c5cf..c47c908f82 100644 --- a/src/kits/Overlay/structure/ModalFooter.tsx +++ b/src/kits/Overlay/structure/ModalFooter.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; /** * @name ModalFooter diff --git a/src/kits/Overlay/structure/ModalHardwareItem.tsx b/src/kits/Overlay/structure/ModalHardwareItem.tsx index 094d7f56ed..5d9b8fa810 100644 --- a/src/kits/Overlay/structure/ModalHardwareItem.tsx +++ b/src/kits/Overlay/structure/ModalHardwareItem.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; /** * @name ModalHardwareItem diff --git a/src/kits/Overlay/types.ts b/src/kits/Overlay/types.ts index 5a54e3b5d0..ca587e27a0 100644 --- a/src/kits/Overlay/types.ts +++ b/src/kits/Overlay/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { AnimationProps } from 'framer-motion'; -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; export type ModalAnimationProps = ComponentBase & AnimationProps; diff --git a/src/kits/Structure/Body/index.tsx b/src/kits/Structure/Body/index.tsx index 5405d1dc87..8ae467cf8e 100644 --- a/src/kits/Structure/Body/index.tsx +++ b/src/kits/Structure/Body/index.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; /** diff --git a/src/kits/Structure/ButtonRow/index.tsx b/src/kits/Structure/ButtonRow/index.tsx index ed0368e41a..3eb0befe86 100644 --- a/src/kits/Structure/ButtonRow/index.tsx +++ b/src/kits/Structure/ButtonRow/index.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; export type RowProps = ComponentBase & { diff --git a/src/kits/Structure/Entry/index.tsx b/src/kits/Structure/Entry/index.tsx index a4bafe3c08..3413fd459e 100644 --- a/src/kits/Structure/Entry/index.tsx +++ b/src/kits/Structure/Entry/index.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; export type EntryProps = ComponentBase & { diff --git a/src/kits/Structure/Main/index.tsx b/src/kits/Structure/Main/index.tsx index 986e6fbcbc..f42d1d8058 100644 --- a/src/kits/Structure/Main/index.tsx +++ b/src/kits/Structure/Main/index.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; import type { ForwardedRef } from 'react'; import { forwardRef } from 'react'; diff --git a/src/kits/Structure/RowSection/index.tsx b/src/kits/Structure/RowSection/index.tsx index ee4299655d..a388808b87 100644 --- a/src/kits/Structure/RowSection/index.tsx +++ b/src/kits/Structure/RowSection/index.tsx @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import { appendOr, appendOrEmpty } from '@w3ux/utils'; -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { RowPrimaryWrapper, RowSecondaryWrapper } from './Wrappers'; export type RowSectionProps = ComponentBase & { diff --git a/src/kits/Structure/Separator/index.tsx b/src/kits/Structure/Separator/index.tsx index 4698c4dd15..65819aae82 100644 --- a/src/kits/Structure/Separator/index.tsx +++ b/src/kits/Structure/Separator/index.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; /** diff --git a/src/kits/Structure/Side/index.tsx b/src/kits/Structure/Side/index.tsx index 74a1516106..53899d8397 100644 --- a/src/kits/Structure/Side/index.tsx +++ b/src/kits/Structure/Side/index.tsx @@ -3,7 +3,7 @@ import { appendOrEmpty } from '@w3ux/utils'; import type { CSSProperties } from 'react'; -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; export type SideProps = ComponentBase & { diff --git a/src/kits/Structure/StatBoxRow/index.tsx b/src/kits/Structure/StatBoxRow/index.tsx index b14db5aa62..c945e57ae5 100644 --- a/src/kits/Structure/StatBoxRow/index.tsx +++ b/src/kits/Structure/StatBoxRow/index.tsx @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; import { Wrapper } from './Wrapper'; /** diff --git a/src/kits/Structure/Tx/types.ts b/src/kits/Structure/Tx/types.ts index 01e5981dac..dab2d10544 100644 --- a/src/kits/Structure/Tx/types.ts +++ b/src/kits/Structure/Tx/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { ReactElement } from 'react'; -import type { DisplayFor } from 'types'; +import type { DisplayFor } from '@w3ux/types'; export interface SignerProps { label: string; diff --git a/src/library/ActionItem/types.ts b/src/library/ActionItem/types.ts index f2254c902a..c9623e4b3e 100644 --- a/src/library/ActionItem/types.ts +++ b/src/library/ActionItem/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { ReactNode } from 'react'; -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; export type ActionItemProps = ComponentBase & { // the title. diff --git a/src/library/Filter/types.ts b/src/library/Filter/types.ts index aa6a4ca3aa..ed60ec2e4b 100644 --- a/src/library/Filter/types.ts +++ b/src/library/Filter/types.ts @@ -3,7 +3,7 @@ import type { IconProp } from '@fortawesome/fontawesome-svg-core'; import type { ReactNode } from 'react'; -import type { AnyFunction } from 'types'; +import type { AnyFunction } from '@w3ux/types'; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyFilter = any; diff --git a/src/library/GenerateNominations/index.tsx b/src/library/GenerateNominations/index.tsx index aef66eaca6..53968eb697 100644 --- a/src/library/GenerateNominations/index.tsx +++ b/src/library/GenerateNominations/index.tsx @@ -29,7 +29,7 @@ import { FavoritesPrompt } from 'canvas/ManageNominations/Prompts/FavoritesPromp import { usePrompt } from 'contexts/Prompt'; import { useFetchMehods } from './useFetchMethods'; import type { AddNominationsType, GenerateNominationsProps } from './types'; -import type { AnyJson, AnyFunction } from 'types'; +import type { AnyJson, AnyFunction } from '@w3ux/types'; import { ButtonPrimaryInvert } from 'kits/Buttons/ButtonPrimaryInvert'; import { ButtonMonoInvert } from 'kits/Buttons/ButtonMonoInvert'; diff --git a/src/library/GenerateNominations/types.ts b/src/library/GenerateNominations/types.ts index 424ae41cad..598772e0c7 100644 --- a/src/library/GenerateNominations/types.ts +++ b/src/library/GenerateNominations/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { Validator } from 'contexts/Validators/types'; -import type { AnyFunction, DisplayFor } from 'types'; +import type { AnyFunction, DisplayFor } from '@w3ux/types'; export interface GenerateNominationsProps { setters: AnyFunction[]; diff --git a/src/library/Graphs/EraPoints.tsx b/src/library/Graphs/EraPoints.tsx index 450a669873..90a20adf56 100644 --- a/src/library/Graphs/EraPoints.tsx +++ b/src/library/Graphs/EraPoints.tsx @@ -17,7 +17,7 @@ import { useTheme } from 'contexts/Themes'; import { graphColors } from 'theme/graphs'; import { useNetwork } from 'contexts/Network'; import type { EraPointsProps } from './types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; ChartJS.register( CategoryScale, diff --git a/src/library/Graphs/GeoDonut.tsx b/src/library/Graphs/GeoDonut.tsx index 4ce00d3d13..4d68872917 100644 --- a/src/library/Graphs/GeoDonut.tsx +++ b/src/library/Graphs/GeoDonut.tsx @@ -9,7 +9,7 @@ import chroma from 'chroma-js'; import { ellipsisFn } from '@w3ux/utils'; import { useNetwork } from 'contexts/Network'; import type { GeoDonutProps } from './types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; ChartJS.register(ArcElement, Tooltip, Legend); diff --git a/src/library/Graphs/PayoutBar.tsx b/src/library/Graphs/PayoutBar.tsx index 9d4fdbcd78..0ae1846f74 100644 --- a/src/library/Graphs/PayoutBar.tsx +++ b/src/library/Graphs/PayoutBar.tsx @@ -20,13 +20,14 @@ import { useStaking } from 'contexts/Staking'; import { useTheme } from 'contexts/Themes'; import { DefaultLocale, locales } from 'locale'; import { graphColors } from 'theme/graphs'; -import type { AnyJson, AnySubscan } from 'types'; +import type { AnySubscan } from 'types'; import { useNetwork } from 'contexts/Network'; import type { PayoutBarProps } from './types'; import { formatRewardsForGraphs } from './Utils'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useBalances } from 'contexts/Balances'; import { useSyncing } from 'hooks/useSyncing'; +import type { AnyJson } from '@w3ux/types'; ChartJS.register( CategoryScale, diff --git a/src/library/Graphs/PayoutLine.tsx b/src/library/Graphs/PayoutLine.tsx index 5c559f6b89..99aac2ecde 100644 --- a/src/library/Graphs/PayoutLine.tsx +++ b/src/library/Graphs/PayoutLine.tsx @@ -17,7 +17,7 @@ import { useTranslation } from 'react-i18next'; import { useStaking } from 'contexts/Staking'; import { useTheme } from 'contexts/Themes'; import { graphColors } from 'theme/graphs'; -import type { AnyJson, AnySubscan } from 'types'; +import type { AnySubscan } from 'types'; import { useNetwork } from 'contexts/Network'; import type { PayoutLineProps } from './types'; import { @@ -28,6 +28,7 @@ import { import { useBalances } from 'contexts/Balances'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useSyncing } from 'hooks/useSyncing'; +import type { AnyJson } from '@w3ux/types'; ChartJS.register( CategoryScale, diff --git a/src/library/Graphs/Utils.ts b/src/library/Graphs/Utils.ts index 81369098b2..d9b34356ce 100644 --- a/src/library/Graphs/Utils.ts +++ b/src/library/Graphs/Utils.ts @@ -13,8 +13,9 @@ import { subDays, } from 'date-fns'; import { MaxPayoutDays } from 'consts'; -import type { AnyApi, AnyJson, AnySubscan } from 'types'; +import type { AnyApi, AnySubscan } from 'types'; import type { PayoutDayCursor } from './types'; +import type { AnyJson } from '@w3ux/types'; // Given payouts, calculate daily income and fill missing days with zero amounts. export const calculateDailyPayouts = ( diff --git a/src/library/Hardware/HardwareAddress/types.ts b/src/library/Hardware/HardwareAddress/types.ts index 602a6b2984..8fa6bed7fe 100644 --- a/src/library/Hardware/HardwareAddress/types.ts +++ b/src/library/Hardware/HardwareAddress/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { ReactNode } from 'react'; -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; export type HardwareAddressProps = ComponentBase & { // the network of the address. diff --git a/src/library/Hardware/HardwareStatusBar/types.ts b/src/library/Hardware/HardwareStatusBar/types.ts index 9ec66e1d4b..c1d10d95fc 100644 --- a/src/library/Hardware/HardwareStatusBar/types.ts +++ b/src/library/Hardware/HardwareStatusBar/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { FunctionComponent, SVGProps } from 'react'; -import type { ComponentBase } from 'types'; +import type { ComponentBase } from '@w3ux/types'; export type HardwareStatusBarProps = ComponentBase & { // whether to animate in the status bar. diff --git a/src/library/Import/types.ts b/src/library/Import/types.ts index 70c2dc1d34..08deedf72e 100644 --- a/src/library/Import/types.ts +++ b/src/library/Import/types.ts @@ -3,7 +3,7 @@ import type { ImportedAccount } from '@w3ux/react-connect-kit/types'; import type { FunctionComponent, SVGProps } from 'react'; -import type { AnyFunction } from 'types'; +import type { AnyFunction } from '@w3ux/types'; export interface HeadingProps { connectTo?: string; diff --git a/src/library/List/context.tsx b/src/library/List/context.tsx index ad25bd3de0..1bf02262b9 100644 --- a/src/library/List/context.tsx +++ b/src/library/List/context.tsx @@ -3,7 +3,7 @@ import { createContext, useContext, useState } from 'react'; import { defaultContext } from './defaults'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import type { ListContextInterface, ListProviderProps } from './types'; import type { ListFormat } from 'library/PoolList/types'; diff --git a/src/library/List/index.ts b/src/library/List/index.ts index 24b4670e8e..6c5f5c10c2 100644 --- a/src/library/List/index.ts +++ b/src/library/List/index.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import styled from 'styled-components'; -import type { DisplayFor } from 'types'; +import type { DisplayFor } from '@w3ux/types'; import type { ListProps, PaginationWrapperProps } from './types'; export const Wrapper = styled.div` diff --git a/src/library/List/types.ts b/src/library/List/types.ts index 5daa5200c2..2377e9a11a 100644 --- a/src/library/List/types.ts +++ b/src/library/List/types.ts @@ -3,7 +3,7 @@ import type { ListFormat } from 'library/PoolList/types'; import type { FormEvent, ReactNode } from 'react'; -import type { AnyJson, DisplayFor } from 'types'; +import type { AnyJson, DisplayFor } from '@w3ux/types'; export interface PaginationWrapperProps { $next: boolean; diff --git a/src/library/Modal/Title.tsx b/src/library/Modal/Title.tsx index f7bc1c8cf2..e178d03a1c 100644 --- a/src/library/Modal/Title.tsx +++ b/src/library/Modal/Title.tsx @@ -8,7 +8,7 @@ import { useHelp } from 'contexts/Help'; import CrossSVG from 'img/cross.svg?react'; import { useOverlay } from 'kits/Overlay/Provider'; import { TitleWrapper } from './Wrappers'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import type { CSSProperties } from 'styled-components'; import { ButtonHelp } from 'kits/Buttons/ButtonHelp'; diff --git a/src/library/Nominations/types.ts b/src/library/Nominations/types.ts index 9b20d140ba..9b2ded2ead 100644 --- a/src/library/Nominations/types.ts +++ b/src/library/Nominations/types.ts @@ -3,7 +3,7 @@ import type { ListFormat } from 'library/PoolList/types'; import type { Validator } from 'contexts/Validators/types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export interface ManageNominationsInterface { addToSelected: (item: AnyJson) => void; diff --git a/src/library/Pool/Rewards.tsx b/src/library/Pool/Rewards.tsx index ec18e8c2a4..53f1131ff1 100644 --- a/src/library/Pool/Rewards.tsx +++ b/src/library/Pool/Rewards.tsx @@ -17,7 +17,7 @@ import { import { usePoolPerformance } from 'contexts/Pools/PoolPerformance'; import { useTranslation } from 'react-i18next'; import type { RewardProps, RewardsGraphProps } from './types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const Rewards = ({ address, displayFor = 'default' }: RewardProps) => { const { t } = useTranslation('library'); diff --git a/src/library/Pool/types.ts b/src/library/Pool/types.ts index 15abd39984..f2deba6648 100644 --- a/src/library/Pool/types.ts +++ b/src/library/Pool/types.ts @@ -4,7 +4,7 @@ import type { PoolRoles, PoolState } from 'contexts/Pools/ActivePool/types'; import type { PoolAddresses } from 'contexts/Pools/BondedPools/types'; import type { Identity, SuperIdentity } from 'contexts/Validators/types'; -import type { DisplayFor } from 'types'; +import type { DisplayFor } from '@w3ux/types'; export interface PoolProps { pool: Pool; diff --git a/src/library/QRCode/qrcode.ts b/src/library/QRCode/qrcode.ts index c1cf5693dd..2564491099 100644 --- a/src/library/QRCode/qrcode.ts +++ b/src/library/QRCode/qrcode.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import _qrcode from 'qrcode-generator'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; // A small hurdle to jump through, just to get the default/default correct (as generated) const qrcode: typeof _qrcode = _qrcode; diff --git a/src/library/SelectItems/index.tsx b/src/library/SelectItems/index.tsx index 187dd80c95..3c53766004 100644 --- a/src/library/SelectItems/index.tsx +++ b/src/library/SelectItems/index.tsx @@ -9,7 +9,7 @@ import { useLayoutEffect, useRef, } from 'react'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { SelectItemsWrapper, TwoThreshold } from './Wrapper'; import type { SelectItemsProps } from './types'; diff --git a/src/library/SelectItems/types.ts b/src/library/SelectItems/types.ts index 9abcc5c837..898b56e073 100644 --- a/src/library/SelectItems/types.ts +++ b/src/library/SelectItems/types.ts @@ -1,8 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import type { Dispatch, ReactNode, SetStateAction } from 'react'; -import type { AnyJson, MaybeAddress } from 'types'; +import type { MaybeAddress } from 'types'; export interface SelectItemsProps { layout?: 'two-col' | 'three-col'; diff --git a/src/library/SetupSteps/Nominate.tsx b/src/library/SetupSteps/Nominate.tsx index 2b4d3cee47..9d6c6975b5 100644 --- a/src/library/SetupSteps/Nominate.tsx +++ b/src/library/SetupSteps/Nominate.tsx @@ -11,7 +11,7 @@ import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { Subheading } from 'pages/Nominate/Wrappers'; import { GenerateNominations } from '../GenerateNominations'; import type { NominationsProps } from './types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const Nominate = ({ bondFor, section }: NominationsProps) => { const { t } = useTranslation('library'); diff --git a/src/library/SideMenu/Main.tsx b/src/library/SideMenu/Main.tsx index 896ec6e485..eefc4cd9ed 100644 --- a/src/library/SideMenu/Main.tsx +++ b/src/library/SideMenu/Main.tsx @@ -12,7 +12,7 @@ import type { SetupContextInterface } from 'contexts/Setup/types'; import { useStaking } from 'contexts/Staking'; import { useUi } from 'contexts/UI'; import type { UIContextInterface } from 'contexts/UI/types'; -import type { AnyJson, PageCategory, PageItem, PagesConfigItems } from 'types'; +import type { PageCategory, PageItem, PagesConfigItems } from 'types'; import { useNetwork } from 'contexts/Network'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { useImportedAccounts } from 'contexts/Connect/ImportedAccounts'; @@ -21,6 +21,7 @@ import { Primary } from './Primary'; import { LogoWrapper } from './Wrapper'; import { useBalances } from 'contexts/Balances'; import { useSyncing } from 'hooks/useSyncing'; +import type { AnyJson } from '@w3ux/types'; export const Main = () => { const { t, i18n } = useTranslation('base'); diff --git a/src/library/SideMenu/types.ts b/src/library/SideMenu/types.ts index 6b004498fe..f12fdacb31 100644 --- a/src/library/SideMenu/types.ts +++ b/src/library/SideMenu/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { FunctionComponent, ReactNode, SVGProps } from 'react'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export interface MinimisedProps { $minimised?: boolean; diff --git a/src/library/Stat/index.tsx b/src/library/Stat/index.tsx index 3e5bc7efce..e509fb4837 100644 --- a/src/library/Stat/index.tsx +++ b/src/library/Stat/index.tsx @@ -11,7 +11,7 @@ import { useNetwork } from 'contexts/Network'; import { Wrapper } from './Wrapper'; import type { StatAddress, StatProps } from './types'; import { NotificationsController } from 'controllers/NotificationsController'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { ButtonPrimary } from 'kits/Buttons/ButtonPrimary'; import { ButtonSecondary } from 'kits/Buttons/ButtonSecondary'; import { ButtonHelp } from 'kits/Buttons/ButtonHelp'; diff --git a/src/library/Stat/types.ts b/src/library/Stat/types.ts index 2cb0dbd3ea..34646d4178 100644 --- a/src/library/Stat/types.ts +++ b/src/library/Stat/types.ts @@ -2,7 +2,8 @@ // SPDX-License-Identifier: GPL-3.0-only import type { IconProp } from '@fortawesome/fontawesome-svg-core'; -import type { AnyJson, MaybeAddress } from 'types'; +import type { AnyJson } from '@w3ux/types'; +import type { MaybeAddress } from 'types'; export interface StatProps { label: string; diff --git a/src/library/StatBoxList/Item.tsx b/src/library/StatBoxList/Item.tsx index 9a3cdf0962..3fc8654fe8 100644 --- a/src/library/StatBoxList/Item.tsx +++ b/src/library/StatBoxList/Item.tsx @@ -6,7 +6,7 @@ import { Number } from './Number'; import { Pie } from './Pie'; import { Text } from './Text'; import { StatBoxWrapper } from './Wrapper'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const StatBox = ({ children }: { children: ReactNode }) => ( { const help = helpKey !== undefined; diff --git a/src/library/SubmitTx/ManualSign/Vault/SignPrompt.tsx b/src/library/SubmitTx/ManualSign/Vault/SignPrompt.tsx index 99b6e4aebb..34d4c95709 100644 --- a/src/library/SubmitTx/ManualSign/Vault/SignPrompt.tsx +++ b/src/library/SubmitTx/ManualSign/Vault/SignPrompt.tsx @@ -14,7 +14,7 @@ import { QRViewerWrapper } from 'library/Import/Wrappers'; import { QrDisplayPayload } from 'library/QRCode/DisplayPayload'; import { QrScanSignature } from 'library/QRCode/ScanSignature'; import type { SignerPromptProps } from 'library/SubmitTx/types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { ButtonPrimary } from 'kits/Buttons/ButtonPrimary'; import { ButtonSecondary } from 'kits/Buttons/ButtonSecondary'; diff --git a/src/library/SubmitTx/types.ts b/src/library/SubmitTx/types.ts index 4f1416550d..80ffcd5bfe 100644 --- a/src/library/SubmitTx/types.ts +++ b/src/library/SubmitTx/types.ts @@ -2,8 +2,9 @@ // SPDX-License-Identifier: GPL-3.0-only import type { IconProp } from '@fortawesome/fontawesome-svg-core'; +import type { DisplayFor } from '@w3ux/types'; import type { ReactNode } from 'react'; -import type { DisplayFor, MaybeAddress } from 'types'; +import type { MaybeAddress } from 'types'; export type SubmitTxProps = SubmitProps & { buttons?: ReactNode[]; diff --git a/src/library/ValidatorList/ValidatorItem/Default.tsx b/src/library/ValidatorList/ValidatorItem/Default.tsx index 5c5a3b2595..41d250a676 100644 --- a/src/library/ValidatorList/ValidatorItem/Default.tsx +++ b/src/library/ValidatorList/ValidatorItem/Default.tsx @@ -14,7 +14,7 @@ import { ParaValidator } from 'library/ListItem/Labels/ParaValidator'; import { Labels, Separator, Wrapper } from 'library/ListItem/Wrappers'; import { useOverlay } from 'kits/Overlay/Provider'; import { usePlugins } from 'contexts/Plugins'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { Quartile } from 'library/ListItem/Labels/Quartile'; import { useValidators } from '../../../contexts/Validators/ValidatorEntries'; import { useList } from '../../List/context'; diff --git a/src/library/ValidatorList/ValidatorItem/Utils.tsx b/src/library/ValidatorList/ValidatorItem/Utils.tsx index 47239d7663..ef97e50f41 100644 --- a/src/library/ValidatorList/ValidatorItem/Utils.tsx +++ b/src/library/ValidatorList/ValidatorItem/Utils.tsx @@ -4,7 +4,7 @@ import { u8aToString, u8aUnwrapBytes } from '@polkadot/util'; import type BigNumber from 'bignumber.js'; import { MaxEraRewardPointsEras } from 'consts'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const getIdentityDisplay = ( _identity: AnyJson, diff --git a/src/library/ValidatorList/ValidatorItem/types.ts b/src/library/ValidatorList/ValidatorItem/types.ts index fcd3b063ac..be40331a50 100644 --- a/src/library/ValidatorList/ValidatorItem/types.ts +++ b/src/library/ValidatorList/ValidatorItem/types.ts @@ -2,8 +2,9 @@ // SPDX-License-Identifier: GPL-3.0-only import type { MaybeAddress } from '@w3ux/react-connect-kit/types'; +import type { DisplayFor } from '@w3ux/types'; import type { ValidatorListEntry } from 'contexts/Validators/types'; -import type { BondFor, DisplayFor } from 'types'; +import type { BondFor } from 'types'; export interface ValidatorItemProps { validator: ValidatorListEntry; diff --git a/src/library/ValidatorList/types.ts b/src/library/ValidatorList/types.ts index ddd4ad01c3..7d33921ade 100644 --- a/src/library/ValidatorList/types.ts +++ b/src/library/ValidatorList/types.ts @@ -1,14 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyFunction, AnyJson, DisplayFor } from '@w3ux/types'; import type { Validator } from 'contexts/Validators/types'; -import type { - AnyFunction, - AnyJson, - BondFor, - DisplayFor, - MaybeAddress, -} from 'types'; +import type { BondFor, MaybeAddress } from 'types'; export interface ValidatorListProps { validators: Validator[]; diff --git a/src/locale/index.tsx b/src/locale/index.tsx index cc24954ffc..cbcc0cc761 100644 --- a/src/locale/index.tsx +++ b/src/locale/index.tsx @@ -5,7 +5,7 @@ import { enGB, zhCN } from 'date-fns/locale'; import i18next from 'i18next'; import { initReactI18next } from 'react-i18next'; import { version } from '../../package.json'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import baseEn from './en/base.json'; import helpEn from './en/help.json'; import libEn from './en/library.json'; diff --git a/src/locale/utils.ts b/src/locale/utils.ts index 95095a048e..c96a1eb2ca 100644 --- a/src/locale/utils.ts +++ b/src/locale/utils.ts @@ -1,6 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import { extractUrlValue, varToUrlHash } from '@w3ux/utils'; import { DefaultLocale, @@ -8,7 +9,7 @@ import { fallbackResources, lngNamespaces, } from 'locale'; -import type { AnyApi, AnyJson } from 'types'; +import type { AnyApi } from 'types'; // Gets the active language // diff --git a/src/modals/Connect/index.tsx b/src/modals/Connect/index.tsx index e60a67e6ab..e2c4363e7e 100644 --- a/src/modals/Connect/index.tsx +++ b/src/modals/Connect/index.tsx @@ -6,7 +6,7 @@ import { useEffect, useRef, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Close } from 'library/Modal/Close'; import { SelectItems } from 'library/SelectItems'; -import type { AnyFunction } from 'types'; +import type { AnyFunction } from '@w3ux/types'; import { Extension } from './Extension'; import { Ledger } from './Ledger'; import { Proxies } from './Proxies'; diff --git a/src/modals/ImportLedger/Addresses.tsx b/src/modals/ImportLedger/Addresses.tsx index 668e043b0e..bc2706ffdb 100644 --- a/src/modals/ImportLedger/Addresses.tsx +++ b/src/modals/ImportLedger/Addresses.tsx @@ -11,7 +11,7 @@ import { usePrompt } from 'contexts/Prompt'; import { Confirm } from 'library/Import/Confirm'; import { Remove } from 'library/Import/Remove'; import { AddressesWrapper } from 'library/Import/Wrappers'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useNetwork } from 'contexts/Network'; import { useOtherAccounts } from 'contexts/Connect/OtherAccounts'; import { ButtonText } from 'kits/Buttons/ButtonText'; diff --git a/src/modals/ImportLedger/Manage.tsx b/src/modals/ImportLedger/Manage.tsx index e550f07cde..af99368f82 100644 --- a/src/modals/ImportLedger/Manage.tsx +++ b/src/modals/ImportLedger/Manage.tsx @@ -8,7 +8,7 @@ import { useHelp } from 'contexts/Help'; import { usePrompt } from 'contexts/Prompt'; import LedgerSVG from '@w3ux/extension-assets/LedgerSquare.svg?react'; import { Heading } from 'library/Import/Heading'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useOverlay } from 'kits/Overlay/Provider'; import { useNetwork } from 'contexts/Network'; import { Addresess } from './Addresses'; diff --git a/src/modals/ImportLedger/Reset.tsx b/src/modals/ImportLedger/Reset.tsx index c6f592ae8a..d9126c43ba 100644 --- a/src/modals/ImportLedger/Reset.tsx +++ b/src/modals/ImportLedger/Reset.tsx @@ -6,7 +6,7 @@ import { getLocalLedgerAddresses } from 'contexts/LedgerHardware/Utils'; import type { LedgerAddress } from 'contexts/LedgerHardware/types'; import { usePrompt } from 'contexts/Prompt'; import { ConfirmWrapper } from 'library/Import/Wrappers'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useOtherAccounts } from 'contexts/Connect/OtherAccounts'; import type { LedgerAccount } from '@w3ux/react-connect-kit/types'; import { ButtonMono } from 'kits/Buttons/ButtonMono'; diff --git a/src/modals/ImportLedger/Splash.tsx b/src/modals/ImportLedger/Splash.tsx index 2c249b80d4..ea488c3399 100644 --- a/src/modals/ImportLedger/Splash.tsx +++ b/src/modals/ImportLedger/Splash.tsx @@ -8,7 +8,7 @@ import { useLedgerHardware } from 'contexts/LedgerHardware'; import { useHelp } from 'contexts/Help'; import { useTheme } from 'contexts/Themes'; import LedgerLogoSvg from '@w3ux/extension-assets/Ledger.svg?react'; -import type { AnyFunction } from 'types'; +import type { AnyFunction } from '@w3ux/types'; import { useOverlay } from 'kits/Overlay/Provider'; import { SplashWrapper } from './Wrappers'; import { ButtonHelp } from 'kits/Buttons/ButtonHelp'; diff --git a/src/modals/ImportLedger/index.tsx b/src/modals/ImportLedger/index.tsx index d747346347..5153af0ded 100644 --- a/src/modals/ImportLedger/index.tsx +++ b/src/modals/ImportLedger/index.tsx @@ -13,7 +13,7 @@ import type { LedgerAddress, LedgerResponse, } from 'contexts/LedgerHardware/types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useEffectIgnoreInitial } from '@w3ux/hooks'; import { useNetwork } from 'contexts/Network'; import { useTranslation } from 'react-i18next'; diff --git a/src/modals/ImportVault/Reader.tsx b/src/modals/ImportVault/Reader.tsx index 4a75576393..46e3826b3c 100644 --- a/src/modals/ImportVault/Reader.tsx +++ b/src/modals/ImportVault/Reader.tsx @@ -9,7 +9,7 @@ import { QRViewerWrapper } from 'library/Import/Wrappers'; import { QrScanSignature } from 'library/QRCode/ScanSignature'; import { useNetwork } from 'contexts/Network'; import { useOtherAccounts } from 'contexts/Connect/OtherAccounts'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { ButtonSecondary } from 'kits/Buttons/ButtonSecondary'; import { useVaultAccounts } from '@w3ux/react-connect-kit'; diff --git a/src/modals/ImportVault/index.tsx b/src/modals/ImportVault/index.tsx index 11bdcba60e..fbe5674eba 100644 --- a/src/modals/ImportVault/index.tsx +++ b/src/modals/ImportVault/index.tsx @@ -12,7 +12,7 @@ import { Heading } from 'library/Import/Heading'; import { NoAccounts } from 'library/Import/NoAccounts'; import { Remove } from 'library/Import/Remove'; import { AddressesWrapper } from 'library/Import/Wrappers'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useOverlay } from 'kits/Overlay/Provider'; import { useOtherAccounts } from 'contexts/Connect/OtherAccounts'; import { Reader } from './Reader'; diff --git a/src/modals/ManagePool/Forms/ManageCommission/provider/types.ts b/src/modals/ManagePool/Forms/ManageCommission/provider/types.ts index b88a9cbe98..cd46dbd0d4 100644 --- a/src/modals/ManagePool/Forms/ManageCommission/provider/types.ts +++ b/src/modals/ManagePool/Forms/ManageCommission/provider/types.ts @@ -1,8 +1,9 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only +import type { AnyJson } from '@w3ux/types'; import type { Dispatch, ReactNode, SetStateAction } from 'react'; -import type { AnyJson, MaybeAddress } from 'types'; +import type { MaybeAddress } from 'types'; export interface PoolCommissionContextInterface { setCommission: Dispatch>; diff --git a/src/modals/Utils/StaticNote.tsx b/src/modals/Utils/StaticNote.tsx index 5e70886f00..dcbee48138 100644 --- a/src/modals/Utils/StaticNote.tsx +++ b/src/modals/Utils/StaticNote.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; interface StaticNoteProps { value: string; diff --git a/src/modals/ValidatorMetrics/index.tsx b/src/modals/ValidatorMetrics/index.tsx index 4318c839e9..7c814f88c7 100644 --- a/src/modals/ValidatorMetrics/index.tsx +++ b/src/modals/ValidatorMetrics/index.tsx @@ -19,7 +19,7 @@ import { StatusLabel } from 'library/StatusLabel'; import { useOverlay } from 'kits/Overlay/Provider'; import { PluginLabel } from 'library/PluginLabel'; import { useNetwork } from 'contexts/Network'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { SubscanController } from 'controllers/SubscanController'; import { usePlugins } from 'contexts/Plugins'; import { useApi } from 'contexts/Api'; diff --git a/src/pages/Overview/StakeStatus/Tips/index.tsx b/src/pages/Overview/StakeStatus/Tips/index.tsx index 3dc748635e..32da5bc0fe 100644 --- a/src/pages/Overview/StakeStatus/Tips/index.tsx +++ b/src/pages/Overview/StakeStatus/Tips/index.tsx @@ -11,7 +11,7 @@ import { useActivePool } from 'contexts/Pools/ActivePool'; import { useStaking } from 'contexts/Staking'; import { useTransferOptions } from 'contexts/TransferOptions'; import { useFillVariables } from 'hooks/useFillVariables'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import { useNetwork } from 'contexts/Network'; import { useActiveAccounts } from 'contexts/ActiveAccounts'; import { Items } from './Items'; diff --git a/src/pages/Pools/Roles/types.ts b/src/pages/Pools/Roles/types.ts index 1ca4095163..bd3e48d896 100644 --- a/src/pages/Pools/Roles/types.ts +++ b/src/pages/Pools/Roles/types.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-3.0-only import type { PoolRoles } from 'contexts/Pools/ActivePool/types'; -import type { AnyFunction } from 'types'; +import type { AnyFunction } from '@w3ux/types'; export interface RolesProps { defaultRoles: PoolRoles; diff --git a/src/theme/graphs.ts b/src/theme/graphs.ts index 9ee3037096..dfdfac7585 100644 --- a/src/theme/graphs.ts +++ b/src/theme/graphs.ts @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; export const graphColors: Record = { inactive: { diff --git a/src/types.ts b/src/types.ts index 77fb00fdfd..e4152512b1 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2024 @paritytech/polkadot-staking-dashboard authors & contributors // SPDX-License-Identifier: GPL-3.0-only -import type { FC, FunctionComponent, ReactNode, SVGProps } from 'react'; +import type { FC, FunctionComponent, SVGProps } from 'react'; import type { Theme } from 'contexts/Themes/types'; import type { ExtensionInjected } from '@w3ux/react-connect-kit/types'; import type BigNumber from 'bignumber.js'; @@ -16,9 +16,9 @@ import type { } from 'contexts/Api/types'; import type { SyncEvent } from 'controllers/SyncController/types'; import type { DetailActivePool } from 'controllers/ActivePoolsController/types'; -import type { CSSProperties } from 'styled-components'; import type { APIEventDetail } from 'model/Api/types'; import type { OnlineStatusEvent } from 'controllers/OnlineStatusController/types'; +import type { AnyJson } from '@w3ux/types'; declare global { interface Window { @@ -133,15 +133,9 @@ export type MaybeAddress = string | null; export type MaybeString = string | null; -// track the status of a syncing / fetching process. -export type Sync = 'unsynced' | 'syncing' | 'synced'; - // track whether bonding should be for nominator or nomination pool. export type BondFor = 'pool' | 'nominator'; -// which medium components are being displayed on. -export type DisplayFor = 'default' | 'modal' | 'canvas' | 'card'; - // generic function with no args or return type. export type Fn = () => void; @@ -149,26 +143,8 @@ export type Fn = () => void; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyApi = any; // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type AnyJson = any; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export type AnyFunction = any; -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyMetaBatch = any; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnySubscan = any; // eslint-disable-next-line @typescript-eslint/no-explicit-any export type AnyPolkawatch = any; - -// A generic type to handle React components. We assume the component may have -// children and styling applied to it. -export interface ComponentBase { - // passing react children. - children?: ReactNode; - // passing custom styling. - style?: CSSProperties; -} - -export type ComponentBaseWithClassName = ComponentBase & { - // passing a className string. - className?: string; -}; diff --git a/src/workers/poolPerformance.ts b/src/workers/poolPerformance.ts index 7ed330f984..8ede0710ee 100644 --- a/src/workers/poolPerformance.ts +++ b/src/workers/poolPerformance.ts @@ -6,7 +6,7 @@ import BigNumber from 'bignumber.js'; import type { PoolRewardPointsKey } from 'contexts/Pools/PoolPerformance/types'; import type { Exposure } from 'contexts/Staking/types'; import type { ErasRewardPoints } from 'contexts/Validators/types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; // eslint-disable-next-line no-restricted-globals, @typescript-eslint/no-explicit-any export const ctx: Worker = self as any; diff --git a/src/workers/stakers.ts b/src/workers/stakers.ts index 531c21b1b6..34da1b5200 100644 --- a/src/workers/stakers.ts +++ b/src/workers/stakers.ts @@ -8,7 +8,7 @@ import type { ExposureOther, Staker, } from 'contexts/Staking/types'; -import type { AnyJson } from 'types'; +import type { AnyJson } from '@w3ux/types'; import type { LocalValidatorExposure } from 'contexts/Payouts/types'; import type { ProcessExposuresArgs, ProcessEraForExposureArgs } from './types'; diff --git a/yarn.lock b/yarn.lock index 5e503fd3a7..e5ba78b8a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2815,19 +2815,19 @@ __metadata: languageName: node linkType: hard -"@w3ux/react-connect-kit@npm:^1.1.0": - version: 1.1.0 - resolution: "@w3ux/react-connect-kit@npm:1.1.0" +"@w3ux/react-connect-kit@npm:^1.2.1": + version: 1.2.1 + resolution: "@w3ux/react-connect-kit@npm:1.2.1" dependencies: "@chainsafe/metamask-polkadot-adapter": "npm:^0.6.0" "@polkadot/util": "npm:^12.6.2" "@polkagate/extension-dapp": "npm:^0.46.13" "@w3ux/extension-assets": "npm:^0.2.6" "@w3ux/hooks": "npm:^1.0.0" - "@w3ux/utils": "npm:^0.2.0" + "@w3ux/utils": "npm:^0.3.0" peerDependencies: "@polkadot/api": ^11 - checksum: 10c0/5e2b38ee8296ba24895fb962aaecbb6d81e00ae7e45a34f4a4a35cb374491640c8095d9d040fa7bf29b949e24e311ff20fa78b070dbc77096aaae4ef8a99d3ff + checksum: 10c0/6bf636f0fd39942dfcbc7c72fd9f9883c34fb65d8f3dce128f507418b6c80522a5463b339fbe8803932cbe4725b70e2210175483677b9f9b2f1e49af1590f2e4 languageName: node linkType: hard @@ -2838,25 +2838,32 @@ __metadata: languageName: node linkType: hard -"@w3ux/react-polkicon@npm:^1.1.0": - version: 1.1.0 - resolution: "@w3ux/react-polkicon@npm:1.1.0" +"@w3ux/react-polkicon@npm:^1.1.1": + version: 1.1.1 + resolution: "@w3ux/react-polkicon@npm:1.1.1" dependencies: "@polkadot/util": "npm:^12.6.2" - "@w3ux/utils": "npm:^0.2.0" + "@w3ux/utils": "npm:^0.3.0" framer-motion: "npm:^11.2.10" - checksum: 10c0/9504131146f023a64d8178789c7a3eb10376747346480b3cfcd43310a6a43f3ab7ace06a3af67b143ab8d42d48413652d9371eec5f2de841ad8d487facd5573c + checksum: 10c0/c88b5b112ca208a432d8581c7a43de1ac4b7d60fe28c36905ce22d23e8eaec2cbe49546df85adc41e071a19fe63189766eceb26cc304d8119a6f15824c0d9252 languageName: node linkType: hard -"@w3ux/utils@npm:^0.2.0": - version: 0.2.0 - resolution: "@w3ux/utils@npm:0.2.0" +"@w3ux/types@npm:^0.1.0": + version: 0.1.0 + resolution: "@w3ux/types@npm:0.1.0" + checksum: 10c0/b7e55a4dea37298c5e34edf16cd049ef4b5e0a1f28bfe927f6615a31fc1c6e0810c509bbac20530256725f2438348979d7b750da9a03732d2e8214ab4ea9859c + languageName: node + linkType: hard + +"@w3ux/utils@npm:^0.3.0": + version: 0.3.0 + resolution: "@w3ux/utils@npm:0.3.0" dependencies: "@polkadot/keyring": "npm:^12.6.2" "@polkadot/util": "npm:^12.6.2" bignumber.js: "npm:^9.1.1" - checksum: 10c0/33f0fa63f04338f72f1569d1e2c44470a7dfbf8ec3edfc087e29d6ebfa254928985ba94a534d1965620a4d35143deb0a201f6a37d0b349771b8ce049342ba77f + checksum: 10c0/8e5b231d4d39c0c5fa88d81f2fdcdf7a8f5a4fd5e8047124c8953fe539bc120593d80801432837247911a0fcc6eb877867c545283d1bdb2b1a7103ebf24257cf languageName: node linkType: hard @@ -6610,10 +6617,11 @@ __metadata: "@vitejs/plugin-react-swc": "npm:^3.7.0" "@w3ux/extension-assets": "npm:^0.2.6" "@w3ux/hooks": "npm:^1.0.0" - "@w3ux/react-connect-kit": "npm:^1.1.0" + "@w3ux/react-connect-kit": "npm:^1.2.1" "@w3ux/react-odometer": "npm:^1.0.0" - "@w3ux/react-polkicon": "npm:^1.1.0" - "@w3ux/utils": "npm:^0.2.0" + "@w3ux/react-polkicon": "npm:^1.1.1" + "@w3ux/types": "npm:^0.1.0" + "@w3ux/utils": "npm:^0.3.0" "@w3ux/validator-assets": "npm:^0.1.0" "@zondax/ledger-substrate": "npm:^0.44.2" bignumber.js: "npm:^9.1.2"