From 5174f5ffbecf583d6b9d47d07c46ae777e0032f9 Mon Sep 17 00:00:00 2001 From: Jaco Date: Fri, 7 Jan 2022 16:37:36 +0100 Subject: [PATCH] Bump API & common (#6797) * Bump API & common * BN imports * Root imports * Bump --- package.json | 42 +- packages/apps-config/package.json | 12 +- packages/apps-electron/package.json | 2 +- packages/apps/package.json | 2 +- packages/page-accounts/package.json | 4 +- .../page-accounts/src/Accounts/Account.tsx | 3 +- .../page-accounts/src/Accounts/index.spec.ts | 2 +- packages/page-accounts/src/Accounts/index.tsx | 2 +- .../page-accounts/src/Accounts/useProxies.ts | 2 +- .../src/modals/CreateEthDerivationPath.tsx | 2 +- .../page-accounts/src/modals/Delegate.tsx | 2 +- .../src/modals/InputValidateAmount.tsx | 2 +- .../src/modals/MultisigCreate.tsx | 2 +- .../src/modals/ProxyOverview.tsx | 2 +- .../page-accounts/src/modals/RecoverSetup.tsx | 2 +- .../page-accounts/src/modals/Transfer.tsx | 2 +- packages/page-accounts/src/types.ts | 2 +- packages/page-assets/src/Balances/Account.tsx | 2 +- .../page-assets/src/Balances/Transfer.tsx | 2 +- .../page-assets/src/Balances/useBalances.ts | 2 +- .../src/Overview/Create/Create.tsx | 2 +- .../page-assets/src/Overview/Create/Info.tsx | 2 +- .../page-assets/src/Overview/Create/index.tsx | 2 +- .../page-assets/src/Overview/Create/types.ts | 2 +- .../page-assets/src/Overview/Mint/Mint.tsx | 2 +- .../page-assets/src/Overview/Mint/index.tsx | 2 +- packages/page-assets/src/Overview/index.tsx | 2 +- packages/page-assets/src/index.tsx | 2 +- packages/page-assets/src/types.ts | 2 +- packages/page-assets/src/useAssetInfos.ts | 2 +- .../page-bounties/src/Bounties.slow.spec.tsx | 2 +- packages/page-bounties/src/Bounties.spec.ts | 2 +- .../src/BountyActions/BountyAcceptCurator.tsx | 2 +- .../src/BountyActions/BountyClaimAction.tsx | 2 +- .../BountyActions/BountyInitiateVoting.tsx | 2 +- .../BountyActions/ProposeCuratorAction.tsx | 3 +- .../page-bounties/src/BountyActions/index.tsx | 2 +- packages/page-bounties/src/BountyCreate.tsx | 2 +- .../src/BountyExtraActions/CloseBounty.tsx | 2 +- .../src/BountyExtraActions/SlashCurator.tsx | 2 +- .../BountyActionMessage.tsx | 3 +- packages/page-bounties/src/DueBlocks.tsx | 2 +- packages/page-bounties/src/Summary.tsx | 2 +- .../src/helpers/calculateBountyBond.spec.ts | 3 +- .../src/helpers/calculateBountyBond.ts | 2 +- .../determineUnassignCuratorAction.spec.ts | 3 +- .../helpers/determineUnassignCuratorAction.ts | 2 +- .../src/helpers/increaseDateByBlocks.ts | 2 +- .../src/helpers/isClaimable.spec.ts | 3 +- .../page-bounties/src/helpers/isClaimable.ts | 2 +- .../page-bounties/src/helpers/permillOf.ts | 2 +- .../page-bounties/src/hooks/useBounties.tsx | 2 +- packages/page-bounties/test/hooks/defaults.ts | 3 +- packages/page-calendar/src/types.ts | 2 +- packages/page-calendar/src/useScheduled.ts | 2 +- packages/page-claims/src/Attest.tsx | 2 +- packages/page-claims/src/Claim.tsx | 2 +- packages/page-contracts/package.json | 2 +- .../page-contracts/src/Contracts/Call.tsx | 3 +- .../page-contracts/src/Contracts/Summary.tsx | 2 +- .../src/shared/InputMegaGas.tsx | 2 +- packages/page-contracts/src/types.ts | 2 +- packages/page-contracts/src/useWeight.ts | 2 +- .../src/Motions/ProposeMotion.tsx | 3 +- packages/page-council/src/Overview/Vote.tsx | 2 +- packages/page-council/src/Overview/types.ts | 2 +- .../page-democracy/src/Overview/Fasttrack.tsx | 2 +- .../page-democracy/src/Overview/PreImage.tsx | 3 +- .../page-democracy/src/Overview/Propose.tsx | 2 +- .../src/Overview/Referendum.tsx | 3 +- .../src/Overview/ReferendumVotes.tsx | 2 +- .../page-democracy/src/Overview/Seconding.tsx | 2 +- .../page-democracy/src/Overview/Summary.tsx | 2 +- .../page-democracy/src/Overview/Voting.tsx | 2 +- packages/page-democracy/src/useChangeCalc.ts | 2 +- packages/page-democracy/src/util.spec.ts | 3 +- packages/page-democracy/src/util.ts | 4 +- .../page-explorer/src/BlockInfo/Extrinsic.tsx | 3 +- .../page-explorer/src/BlockInfo/Summary.tsx | 3 +- packages/page-gilt/src/Overview/BidAdd.tsx | 2 +- packages/page-gilt/src/Overview/Summary.tsx | 3 +- packages/page-gilt/src/Overview/types.ts | 2 +- packages/page-parachains/src/Auctions/Bid.tsx | 2 +- .../page-parachains/src/Auctions/WinRange.tsx | 2 +- .../src/Crowdloan/Contribute.tsx | 2 +- .../page-parachains/src/Crowdloan/Fund.tsx | 2 +- .../page-parachains/src/Crowdloan/FundAdd.tsx | 2 +- .../page-parachains/src/Crowdloan/Funds.tsx | 2 +- .../page-parachains/src/Crowdloan/Summary.tsx | 2 +- .../src/Overview/LeaseBlocks.tsx | 2 +- .../src/Overview/Parachain.tsx | 3 +- .../page-parachains/src/Overview/Periods.tsx | 2 +- .../page-parachains/src/Overview/types.ts | 2 +- .../page-parachains/src/Overview/useEvents.ts | 2 +- .../src/Parathreads/Actions.tsx | 2 +- .../src/Parathreads/RegisterId.tsx | 2 +- .../src/Parathreads/RegisterThread.tsx | 3 +- .../src/Parathreads/constants.tsx | 4 +- .../page-parachains/src/Proposals/Propose.tsx | 3 +- packages/page-parachains/src/Teleport.tsx | 2 +- packages/page-parachains/src/types.ts | 2 +- .../page-parachains/src/useActionsQueue.ts | 2 +- packages/page-parachains/src/useFunds.ts | 3 +- .../page-parachains/src/useLeaseRanges.ts | 2 +- .../page-parachains/src/useWinningData.ts | 3 +- packages/page-poll/src/index.tsx | 3 +- packages/page-rpc/src/Rpc/Account.tsx | 2 +- .../page-society/src/Candidates/BidNew.tsx | 2 +- .../page-society/src/Candidates/VouchFor.tsx | 2 +- packages/page-society/src/Overview/Member.tsx | 2 +- .../page-society/src/Overview/Summary.tsx | 2 +- packages/page-society/src/Overview/index.tsx | 2 +- packages/page-society/src/index.tsx | 3 +- .../src/Actions/Account/BondExtra.tsx | 3 +- .../Actions/Account/InputValidateAmount.tsx | 3 +- .../InputValidationUnstakeThreshold.tsx | 2 +- .../src/Actions/Account/ListNominees.tsx | 2 +- .../src/Actions/Account/Rebond.tsx | 3 +- .../src/Actions/Account/Unbond.tsx | 2 +- .../src/Actions/Account/WarnBond.tsx | 2 +- .../src/Actions/Account/index.tsx | 3 +- packages/page-staking/src/Actions/index.tsx | 3 +- .../src/Actions/partials/Bond.tsx | 2 +- .../src/Actions/partials/Validate.tsx | 3 +- packages/page-staking/src/Actions/types.ts | 2 +- .../src/Actions/useUnbondDuration.ts | 2 +- .../src/Overview/Address/StakeOther.tsx | 3 +- .../src/Overview/Address/Status.tsx | 2 +- .../src/Overview/Address/index.tsx | 2 +- packages/page-staking/src/Payouts/Stash.tsx | 2 +- .../page-staking/src/Payouts/Validator.tsx | 2 +- packages/page-staking/src/Payouts/index.tsx | 3 +- packages/page-staking/src/Payouts/types.ts | 2 +- .../page-staking/src/Payouts/useEraBlocks.ts | 2 +- packages/page-staking/src/Payouts/util.tsx | 2 +- .../page-staking/src/Query/ChartPrefs.tsx | 3 +- .../page-staking/src/Query/ChartRewards.tsx | 3 +- .../page-staking/src/Query/ChartStake.tsx | 3 +- packages/page-staking/src/Query/types.ts | 2 +- packages/page-staking/src/Query/util.ts | 2 +- packages/page-staking/src/Slashes/Summary.tsx | 3 +- packages/page-staking/src/Slashes/index.tsx | 3 +- packages/page-staking/src/Slashes/types.ts | 2 +- packages/page-staking/src/Targets/Summary.tsx | 2 +- .../page-staking/src/Targets/Validator.tsx | 2 +- packages/page-staking/src/Targets/index.tsx | 2 +- packages/page-staking/src/types.ts | 2 +- packages/page-staking/src/useSortedTargets.ts | 3 +- packages/page-sudo/src/Sudo.tsx | 2 +- .../page-tech-comm/src/Proposals/Propose.tsx | 2 +- .../page-tech-comm/src/Proposals/Voting.tsx | 2 +- .../src/Overview/ProposalCreate.tsx | 2 +- .../page-treasury/src/Overview/Summary.tsx | 2 +- packages/page-treasury/src/Tips/Tip.tsx | 2 +- packages/page-treasury/src/Tips/TipCreate.tsx | 2 +- .../page-treasury/src/Tips/TipEndorse.tsx | 2 +- packages/page-treasury/src/Tips/Tips.tsx | 2 +- packages/page-treasury/src/Tips/index.tsx | 2 +- packages/react-api/package.json | 6 +- packages/react-api/src/Api.tsx | 3 +- packages/react-api/src/types.ts | 2 +- packages/react-components/package.json | 14 +- packages/react-components/src/AddressInfo.tsx | 2 +- packages/react-components/src/AddressMini.tsx | 2 +- packages/react-components/src/Balance.tsx | 2 +- packages/react-components/src/Bonded.tsx | 2 +- packages/react-components/src/Call.tsx | 2 +- packages/react-components/src/CardSummary.tsx | 2 +- packages/react-components/src/Chart/Line.tsx | 2 +- packages/react-components/src/Chart/types.ts | 2 +- .../src/ConvictionDropdown.tsx | 3 +- .../react-components/src/DemocracyLocks.tsx | 2 +- .../react-components/src/InputBalance.tsx | 3 +- packages/react-components/src/InputNumber.tsx | 3 +- .../react-components/src/LinkExternal.tsx | 2 +- packages/react-components/src/ParaLink.tsx | 2 +- packages/react-components/src/Progress.tsx | 2 +- .../react-components/src/ProposedAction.tsx | 2 +- .../react-components/src/StakingUnbonding.tsx | 3 +- packages/react-components/src/VoteValue.tsx | 2 +- .../react-hooks/src/useAvailableSlashes.ts | 3 +- packages/react-hooks/src/useInflation.ts | 2 +- packages/react-hooks/src/useNonZeroBn.ts | 2 +- packages/react-hooks/src/useParaApi.ts | 2 +- packages/react-hooks/src/useParaEndpoints.ts | 2 +- packages/react-hooks/src/useProxies.ts | 3 +- packages/react-hooks/src/useTreasury.ts | 2 +- packages/react-hooks/src/useVotingStatus.ts | 2 +- packages/react-hooks/src/useWeight.ts | 2 +- packages/react-hooks/src/useWeightFee.ts | 3 +- packages/react-params/src/Param/Amount.tsx | 2 +- packages/react-params/src/Param/Balance.tsx | 2 +- packages/react-query/src/BlockToTime.tsx | 2 +- packages/react-query/src/Elapsed.tsx | 2 +- packages/react-query/src/FormatBalance.tsx | 2 +- packages/react-query/src/Nonce.tsx | 2 +- packages/react-query/src/SessionToTime.tsx | 2 +- packages/react-query/src/TimeNow.tsx | 2 +- packages/react-signer/src/Address.tsx | 2 +- packages/react-signer/src/PaymentInfo.tsx | 2 +- packages/react-signer/src/SignFields.tsx | 3 +- packages/react-signer/src/Tip.tsx | 2 +- packages/react-signer/src/Transaction.tsx | 2 +- packages/test-support/package.json | 2 +- .../scripts/lib/changeBountyStateFunctions.ts | 2 +- .../test-support/scripts/lib/constants.ts | 2 +- packages/test-support/scripts/lib/helpers.ts | 3 +- .../scripts/lib/multiFunctions.ts | 3 +- packages/test-support/src/api/createApi.ts | 2 +- .../src/creation/stakingInfo/stakingLedger.ts | 3 +- .../src/creation/treasury/defaults.ts | 2 +- packages/test-support/src/pages/Page.tsx | 2 +- .../test-support/src/utils/accountDefaults.ts | 3 +- packages/test-support/src/utils/balance.ts | 4 +- .../test-support/src/utils/mockApiHooks.ts | 3 +- yarn.lock | 710 +++++++++--------- 216 files changed, 617 insertions(+), 647 deletions(-) diff --git a/package.json b/package.json index 1a7d28da8d..cba2cc1d99 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@babel/runtime": "^7.16.7", "@crustio/crust-pin": "^1.0.0", "@pinata/sdk": "^1.1.23", - "@polkadot/dev": "^0.65.14", + "@polkadot/dev": "^0.65.21", "@types/bn.js": "^4.11.6", "@types/chart.js": "^2.9.35", "@types/file-saver": "^2.0.4", @@ -89,26 +89,26 @@ "webpack-cli": "^4.9.1" }, "resolutions": { - "@polkadot/api": "^7.2.1", - "@polkadot/api-augment": "^7.2.1", - "@polkadot/api-base": "^7.2.1", - "@polkadot/api-contract": "^7.2.1", - "@polkadot/api-derive": "^7.2.1", - "@polkadot/hw-ledger": "^8.2.2", - "@polkadot/keyring": "^8.2.2", - "@polkadot/networks": "^8.2.2", - "@polkadot/phishing": "^0.7.11", - "@polkadot/rpc-augment": "^7.2.1", - "@polkadot/rpc-core": "^7.2.1", - "@polkadot/rpc-provider": "^7.2.1", - "@polkadot/types": "^7.2.1", - "@polkadot/types-augment": "^7.2.1", - "@polkadot/types-codec": "^7.2.1", - "@polkadot/types-create": "^7.2.1", - "@polkadot/types-known": "^7.2.1", - "@polkadot/types-support": "^7.2.1", - "@polkadot/util": "^8.2.2", - "@polkadot/util-crypto": "^8.2.2", + "@polkadot/api": "^7.2.2-8", + "@polkadot/api-augment": "^7.2.2-8", + "@polkadot/api-base": "^7.2.2-8", + "@polkadot/api-contract": "^7.2.2-8", + "@polkadot/api-derive": "^7.2.2-8", + "@polkadot/hw-ledger": "^8.2.3-29", + "@polkadot/keyring": "^8.2.3-29", + "@polkadot/networks": "^8.2.3-29", + "@polkadot/phishing": "^0.7.30", + "@polkadot/rpc-augment": "^7.2.2-8", + "@polkadot/rpc-core": "^7.2.2-8", + "@polkadot/rpc-provider": "^7.2.2-8", + "@polkadot/types": "^7.2.2-8", + "@polkadot/types-augment": "^7.2.2-8", + "@polkadot/types-codec": "^7.2.2-8", + "@polkadot/types-create": "^7.2.2-8", + "@polkadot/types-known": "^7.2.2-8", + "@polkadot/types-support": "^7.2.2-8", + "@polkadot/util": "^8.2.3-29", + "@polkadot/util-crypto": "^8.2.3-29", "@polkadot/wasm-crypto": "^4.5.1", "babel-core": "^7.0.0-bridge.0", "styled-components": "^5.3.1", diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index 4b196ae70b..76ab51aed4 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -28,12 +28,12 @@ "@metaverse-network-sdk/type-definitions": "^0.0.1-6", "@parallel-finance/type-definitions": "1.4.4", "@phala/typedefs": "0.2.30", - "@polkadot/api": "^7.2.1", - "@polkadot/api-derive": "^7.2.1", - "@polkadot/networks": "^8.2.2", - "@polkadot/types": "^7.2.1", - "@polkadot/util": "^8.2.2", - "@polkadot/x-fetch": "^8.2.2", + "@polkadot/api": "^7.2.2-8", + "@polkadot/api-derive": "^7.2.2-8", + "@polkadot/networks": "^8.2.3-29", + "@polkadot/types": "^7.2.2-8", + "@polkadot/util": "^8.2.3-29", + "@polkadot/x-fetch": "^8.2.3-29", "@polymathnetwork/polymesh-types": "0.0.2", "@snowfork/snowbridge-types": "0.2.6", "@sora-substrate/type-definitions": "1.7.4", diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 8b0ee6933c..2c877d5279 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -14,7 +14,7 @@ "dependencies": { "@babel/core": "^7.16.7", "@babel/polyfill": "^7.12.1", - "@polkadot/dev": "^0.65.14", + "@polkadot/dev": "^0.65.21", "@polkadot/react-components": "^0.100.2-32", "electron-log": "^4.4.4", "electron-updater": "^4.6.5" diff --git a/packages/apps/package.json b/packages/apps/package.json index 380d86f5ca..73f6bf4057 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -18,7 +18,7 @@ "@babel/runtime": "^7.16.7", "@polkadot/apps-config": "^0.100.2-32", "@polkadot/apps-routing": "^0.100.2-32", - "@polkadot/dev": "^0.65.14", + "@polkadot/dev": "^0.65.21", "@polkadot/react-api": "^0.100.2-32", "@polkadot/react-components": "^0.100.2-32", "@polkadot/react-hooks": "^0.100.2-32", diff --git a/packages/page-accounts/package.json b/packages/page-accounts/package.json index 0220f3344b..90d330623f 100644 --- a/packages/page-accounts/package.json +++ b/packages/page-accounts/package.json @@ -14,9 +14,9 @@ "version": "0.100.2-32", "dependencies": { "@babel/runtime": "^7.16.7", - "@polkadot/phishing": "^0.7.25", + "@polkadot/phishing": "^0.7.30", "@polkadot/react-components": "^0.100.2-32", - "@polkadot/vanitygen": "^0.48.10", + "@polkadot/vanitygen": "^0.48.11-2", "detect-browser": "^5.3.0", "file-saver": "^2.0.5" }, diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index 30fce85634..87f79ea593 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -11,7 +11,6 @@ import type { ProxyDefinition, RecoveryConfig } from '@polkadot/types/interfaces import type { KeyringAddress, KeyringJson$Meta } from '@polkadot/ui-keyring/types'; import type { AccountBalance, Delegation } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react'; import styled, { ThemeContext } from 'styled-components'; @@ -19,7 +18,7 @@ import { ApiPromise } from '@polkadot/api'; import { AddressInfo, AddressSmall, Badge, Button, ChainLock, CryptoType, ExpandButton, Forget, Icon, LinkExternal, Menu, Popup, StatusContext, Tags } from '@polkadot/react-components'; import { useAccountInfo, useApi, useBalancesAll, useBestNumber, useCall, useLedger, useStakingInfo, useToggle } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; -import { BN_ZERO, formatBalance, formatNumber, isFunction } from '@polkadot/util'; +import { BN, BN_ZERO, formatBalance, formatNumber, isFunction } from '@polkadot/util'; import Backup from '../modals/Backup'; import ChangePass from '../modals/ChangePass'; diff --git a/packages/page-accounts/src/Accounts/index.spec.ts b/packages/page-accounts/src/Accounts/index.spec.ts index 796e36eb8e..2c2cb620f5 100644 --- a/packages/page-accounts/src/Accounts/index.spec.ts +++ b/packages/page-accounts/src/Accounts/index.spec.ts @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 import { fireEvent, screen, within } from '@testing-library/react'; -import BN from 'bn.js'; import { POLKADOT_GENESIS } from '@polkadot/apps-config'; import i18next from '@polkadot/react-components/i18n'; @@ -18,6 +17,7 @@ import { u32 } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types/create'; import { AccountId, Multisig, ProxyDefinition, Timepoint, Voting, VotingDelegating } from '@polkadot/types/interfaces'; import { keyring } from '@polkadot/ui-keyring'; +import { BN } from '@polkadot/util'; import { AccountRow } from '../../test/pageElements/AccountRow'; import { AccountsPage } from '../../test/pages/accountsPage'; diff --git a/packages/page-accounts/src/Accounts/index.tsx b/packages/page-accounts/src/Accounts/index.tsx index 1bc8f68e5a..0d91412658 100644 --- a/packages/page-accounts/src/Accounts/index.tsx +++ b/packages/page-accounts/src/Accounts/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; +import type { BN } from '@polkadot/util'; import type { AccountBalance, Delegation, SortedAccount } from '../types'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/page-accounts/src/Accounts/useProxies.ts b/packages/page-accounts/src/Accounts/useProxies.ts index d0365920c7..9362b3318e 100644 --- a/packages/page-accounts/src/Accounts/useProxies.ts +++ b/packages/page-accounts/src/Accounts/useProxies.ts @@ -1,11 +1,11 @@ // Copyright 2017-2022 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Vec } from '@polkadot/types'; import type { AccountId, BalanceOf } from '@polkadot/types/interfaces'; import type { NodeRuntimeProxyType, PalletProxyProxyDefinition } from '@polkadot/types/lookup'; import type { ITuple } from '@polkadot/types/types'; +import type { BN } from '@polkadot/util'; import { useEffect, useState } from 'react'; diff --git a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx index 4e69887565..b7d5f98a19 100644 --- a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx +++ b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2022 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; import React, { ReactNode, useEffect, useRef, useState } from 'react'; import { Checkbox, Dropdown, Input, InputNumber, MarkError, MarkWarning, Modal } from '@polkadot/react-components'; import { useToggle } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; import { useTranslation } from '../translate'; import { DeriveValidationOutput } from '../types'; diff --git a/packages/page-accounts/src/modals/Delegate.tsx b/packages/page-accounts/src/modals/Delegate.tsx index a4a9d8648c..f1631a3092 100644 --- a/packages/page-accounts/src/modals/Delegate.tsx +++ b/packages/page-accounts/src/modals/Delegate.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Conviction } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { AmountValidateState } from '../Accounts/types'; import React, { useState } from 'react'; diff --git a/packages/page-accounts/src/modals/InputValidateAmount.tsx b/packages/page-accounts/src/modals/InputValidateAmount.tsx index 34c6a51824..8bc35e0e8a 100644 --- a/packages/page-accounts/src/modals/InputValidateAmount.tsx +++ b/packages/page-accounts/src/modals/InputValidateAmount.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import type { AmountValidateState } from '../Accounts/types'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-accounts/src/modals/MultisigCreate.tsx b/packages/page-accounts/src/modals/MultisigCreate.tsx index f15d493860..e4007a917d 100644 --- a/packages/page-accounts/src/modals/MultisigCreate.tsx +++ b/packages/page-accounts/src/modals/MultisigCreate.tsx @@ -4,12 +4,12 @@ import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { ModalProps } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; import { Button, Input, InputAddressMulti, InputNumber, Modal } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { keyring } from '@polkadot/ui-keyring'; +import { BN } from '@polkadot/util'; import useKnownAddresses from '../Accounts/useKnownAddresses'; import { useTranslation } from '../translate'; diff --git a/packages/page-accounts/src/modals/ProxyOverview.tsx b/packages/page-accounts/src/modals/ProxyOverview.tsx index 16aa13a12b..ab514b6e52 100644 --- a/packages/page-accounts/src/modals/ProxyOverview.tsx +++ b/packages/page-accounts/src/modals/ProxyOverview.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { NodeRuntimeProxyType, PalletProxyProxyDefinition } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/modals/RecoverSetup.tsx b/packages/page-accounts/src/modals/RecoverSetup.tsx index 7fceaff9ac..f0f0f0bfdf 100644 --- a/packages/page-accounts/src/modals/RecoverSetup.tsx +++ b/packages/page-accounts/src/modals/RecoverSetup.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-accounts/src/modals/Transfer.tsx b/packages/page-accounts/src/modals/Transfer.tsx index ce433264b3..744e9b76fe 100644 --- a/packages/page-accounts/src/modals/Transfer.tsx +++ b/packages/page-accounts/src/modals/Transfer.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { AccountInfoWithProviders, AccountInfoWithRefCount } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-accounts/src/types.ts b/packages/page-accounts/src/types.ts index 37cfe767bc..907bc26d2c 100644 --- a/packages/page-accounts/src/types.ts +++ b/packages/page-accounts/src/types.ts @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/app-accounts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ActionStatus } from '@polkadot/react-components/Status/types'; import type { Balance, Conviction } from '@polkadot/types/interfaces'; import type { KeyringAddress } from '@polkadot/ui-keyring/types'; +import type { BN } from '@polkadot/util'; import { WithTranslation } from 'react-i18next'; diff --git a/packages/page-assets/src/Balances/Account.tsx b/packages/page-assets/src/Balances/Account.tsx index c7055b9c2e..5e681474ce 100644 --- a/packages/page-assets/src/Balances/Account.tsx +++ b/packages/page-assets/src/Balances/Account.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { PalletAssetsAssetAccount } from '@polkadot/types/lookup'; import type { bool } from '@polkadot/types-codec'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-assets/src/Balances/Transfer.tsx b/packages/page-assets/src/Balances/Transfer.tsx index 47bb202a48..5a5847390e 100644 --- a/packages/page-assets/src/Balances/Transfer.tsx +++ b/packages/page-assets/src/Balances/Transfer.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-assets/src/Balances/useBalances.ts b/packages/page-assets/src/Balances/useBalances.ts index cb5c090440..2e94d6c7d7 100644 --- a/packages/page-assets/src/Balances/useBalances.ts +++ b/packages/page-assets/src/Balances/useBalances.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { PalletAssetsAssetAccount } from '@polkadot/types/lookup'; import type { Option } from '@polkadot/types-codec'; +import type { BN } from '@polkadot/util'; import { createNamedHook, useAccounts, useApi, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-assets/src/Overview/Create/Create.tsx b/packages/page-assets/src/Overview/Create/Create.tsx index 925e9f0fc8..33cc83a24a 100644 --- a/packages/page-assets/src/Overview/Create/Create.tsx +++ b/packages/page-assets/src/Overview/Create/Create.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { InfoState, TeamState } from './types'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-assets/src/Overview/Create/Info.tsx b/packages/page-assets/src/Overview/Create/Info.tsx index db6a22fdfb..f9f282c5f7 100644 --- a/packages/page-assets/src/Overview/Create/Info.tsx +++ b/packages/page-assets/src/Overview/Create/Info.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { InfoState } from './types'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-assets/src/Overview/Create/index.tsx b/packages/page-assets/src/Overview/Create/index.tsx index c4525e0257..05f8109ac2 100644 --- a/packages/page-assets/src/Overview/Create/index.tsx +++ b/packages/page-assets/src/Overview/Create/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-assets/src/Overview/Create/types.ts b/packages/page-assets/src/Overview/Create/types.ts index a2d7c6c10a..16cac1a51a 100644 --- a/packages/page-assets/src/Overview/Create/types.ts +++ b/packages/page-assets/src/Overview/Create/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; export interface InfoState { accountId: string; diff --git a/packages/page-assets/src/Overview/Mint/Mint.tsx b/packages/page-assets/src/Overview/Mint/Mint.tsx index 4460b86aa9..178e2bed63 100644 --- a/packages/page-assets/src/Overview/Mint/Mint.tsx +++ b/packages/page-assets/src/Overview/Mint/Mint.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { PalletAssetsAssetDetails, PalletAssetsAssetMetadata } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-assets/src/Overview/Mint/index.tsx b/packages/page-assets/src/Overview/Mint/index.tsx index d0ff730d87..4b0d64ff00 100644 --- a/packages/page-assets/src/Overview/Mint/index.tsx +++ b/packages/page-assets/src/Overview/Mint/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { PalletAssetsAssetDetails, PalletAssetsAssetMetadata } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-assets/src/Overview/index.tsx b/packages/page-assets/src/Overview/index.tsx index a70927fd3d..e3ae47a956 100644 --- a/packages/page-assets/src/Overview/index.tsx +++ b/packages/page-assets/src/Overview/index.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { AssetInfo } from '../types'; import React from 'react'; diff --git a/packages/page-assets/src/index.tsx b/packages/page-assets/src/index.tsx index e3472f4ab1..c42c0848c6 100644 --- a/packages/page-assets/src/index.tsx +++ b/packages/page-assets/src/index.tsx @@ -3,7 +3,7 @@ import '@polkadot/api-augment/substrate'; -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useRef } from 'react'; import { Route, Switch } from 'react-router'; diff --git a/packages/page-assets/src/types.ts b/packages/page-assets/src/types.ts index 38e4fca22c..7c0d910f61 100644 --- a/packages/page-assets/src/types.ts +++ b/packages/page-assets/src/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { PalletAssetsAssetDetails, PalletAssetsAssetMetadata } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; export interface AssetInfo { details: PalletAssetsAssetDetails | null; diff --git a/packages/page-assets/src/useAssetInfos.ts b/packages/page-assets/src/useAssetInfos.ts index 92748bbebc..a1948ca36e 100644 --- a/packages/page-assets/src/useAssetInfos.ts +++ b/packages/page-assets/src/useAssetInfos.ts @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/app-assets authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Option } from '@polkadot/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { PalletAssetsAssetDetails, PalletAssetsAssetMetadata } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import type { AssetInfo } from './types'; import { useEffect, useState } from 'react'; diff --git a/packages/page-bounties/src/Bounties.slow.spec.tsx b/packages/page-bounties/src/Bounties.slow.spec.tsx index c9e64935b1..a42f2498f4 100644 --- a/packages/page-bounties/src/Bounties.slow.spec.tsx +++ b/packages/page-bounties/src/Bounties.slow.spec.tsx @@ -4,7 +4,6 @@ import '@polkadot/react-components/i18n'; import { render } from '@testing-library/react'; -import BN from 'bn.js'; import React, { Suspense } from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; @@ -17,6 +16,7 @@ import { MemoryStore } from '@polkadot/test-support/keyring'; import { aliceSigner } from '@polkadot/test-support/keyring/signers'; import { WaitForApi } from '@polkadot/test-support/react'; import { execute } from '@polkadot/test-support/transaction/execute'; +import { BN } from '@polkadot/util'; const SUBSTRATE_PORT = Number.parseInt(process.env.TEST_SUBSTRATE_PORT || '30333'); diff --git a/packages/page-bounties/src/Bounties.spec.ts b/packages/page-bounties/src/Bounties.spec.ts index 70984cd694..40dab79c24 100644 --- a/packages/page-bounties/src/Bounties.spec.ts +++ b/packages/page-bounties/src/Bounties.spec.ts @@ -7,7 +7,6 @@ import type { BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; import type { PalletBountiesBounty } from '@polkadot/types/lookup'; import { fireEvent } from '@testing-library/react'; -import BN from 'bn.js'; import { ApiPromise } from '@polkadot/api'; import i18next from '@polkadot/react-components/i18n'; @@ -19,6 +18,7 @@ import { mockHooks } from '@polkadot/test-support/hooks/mockHooks'; import { MemoryStore } from '@polkadot/test-support/keyring'; import { alice, bob } from '@polkadot/test-support/keyring/addresses'; import { keyring } from '@polkadot/ui-keyring'; +import { BN } from '@polkadot/util'; import { defaultBountyUpdatePeriod, mockBountyHooks } from '../test/hooks/defaults'; import { BountiesPage } from '../test/pages/bountiesPage'; diff --git a/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx b/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx index 46c7ea01d4..c1c8306c77 100644 --- a/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx +++ b/packages/page-bounties/src/BountyActions/BountyAcceptCurator.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, BountyIndex } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx b/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx index 102732ca59..1e16be552b 100644 --- a/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx +++ b/packages/page-bounties/src/BountyActions/BountyClaimAction.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, BountyIndex } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx b/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx index e5793ef32b..f0cbda9205 100644 --- a/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx +++ b/packages/page-bounties/src/BountyActions/BountyInitiateVoting.tsx @@ -4,12 +4,12 @@ import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import type { BountyIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useRef, useState } from 'react'; import { getTreasuryProposalThreshold } from '@polkadot/apps-config'; import { Button, InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; import { truncateTitle } from '../helpers'; import { useBounties } from '../hooks'; diff --git a/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx b/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx index 48db20c7af..1518429108 100644 --- a/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx +++ b/packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx @@ -4,13 +4,12 @@ import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import type { Balance, BountyIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; import { getTreasuryProposalThreshold } from '@polkadot/apps-config'; import { Button, InputAddress, InputBalance, MarkError, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useCollectiveMembers, useToggle } from '@polkadot/react-hooks'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import { truncateTitle } from '../helpers'; import { useBounties } from '../hooks'; diff --git a/packages/page-bounties/src/BountyActions/index.tsx b/packages/page-bounties/src/BountyActions/index.tsx index cdeae4e39e..5f50fc86b9 100644 --- a/packages/page-bounties/src/BountyActions/index.tsx +++ b/packages/page-bounties/src/BountyActions/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; import type { Balance, BlockNumber, BountyIndex, BountyStatus } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-bounties/src/BountyCreate.tsx b/packages/page-bounties/src/BountyCreate.tsx index 33bd43daa6..940a673c35 100644 --- a/packages/page-bounties/src/BountyCreate.tsx +++ b/packages/page-bounties/src/BountyCreate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx b/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx index b68b643bed..6e4a7487ff 100644 --- a/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx +++ b/packages/page-bounties/src/BountyExtraActions/CloseBounty.tsx @@ -3,12 +3,12 @@ import type { BountyIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useRef, useState } from 'react'; import { getTreasuryProposalThreshold } from '@polkadot/apps-config'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useCollectiveMembers } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; import { truncateTitle } from '../helpers'; import { useBounties } from '../hooks'; diff --git a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx index d5e3caa7b0..2537111481 100644 --- a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx +++ b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx @@ -4,12 +4,12 @@ import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; import type { AccountId, BountyIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; import { getTreasuryProposalThreshold } from '@polkadot/apps-config'; import { InputAddress, Modal, TxButton } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveInstance, useCollectiveMembers } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; import { truncateTitle } from '../helpers'; import { useBounties } from '../hooks'; diff --git a/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx b/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx index 4f8ed16262..87efa45f93 100644 --- a/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx +++ b/packages/page-bounties/src/BountyNextActionInfo/BountyActionMessage.tsx @@ -3,11 +3,10 @@ import type { BlockNumber, BountyStatus } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { useBountyStatus } from '@polkadot/app-bounties/hooks'; -import { BN_HUNDRED, BN_ZERO } from '@polkadot/util'; +import { BN, BN_HUNDRED, BN_ZERO } from '@polkadot/util'; import { useBounties } from '../hooks'; import { useTranslation } from '../translate'; diff --git a/packages/page-bounties/src/DueBlocks.tsx b/packages/page-bounties/src/DueBlocks.tsx index f2739dc5a3..7758b93103 100644 --- a/packages/page-bounties/src/DueBlocks.tsx +++ b/packages/page-bounties/src/DueBlocks.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-bounties/src/Summary.tsx b/packages/page-bounties/src/Summary.tsx index 27003669fa..42a64a0847 100644 --- a/packages/page-bounties/src/Summary.tsx +++ b/packages/page-bounties/src/Summary.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useTreasury } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; +import { BN } from '@polkadot/util'; import { useBounties } from './hooks'; import { useTranslation } from './translate'; diff --git a/packages/page-bounties/src/helpers/calculateBountyBond.spec.ts b/packages/page-bounties/src/helpers/calculateBountyBond.spec.ts index 7b5a37963b..5423dd9201 100644 --- a/packages/page-bounties/src/helpers/calculateBountyBond.spec.ts +++ b/packages/page-bounties/src/helpers/calculateBountyBond.spec.ts @@ -1,10 +1,9 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { calculateBountyBond } from '@polkadot/app-bounties/helpers/calculateBountyBond'; import { TypeRegistry } from '@polkadot/types/create'; +import { BN } from '@polkadot/util'; describe('Calculate bounty bond', () => { it('sums deposit base and deposit for each byte of description', () => { diff --git a/packages/page-bounties/src/helpers/calculateBountyBond.ts b/packages/page-bounties/src/helpers/calculateBountyBond.ts index 3d7c274426..599076f53e 100644 --- a/packages/page-bounties/src/helpers/calculateBountyBond.ts +++ b/packages/page-bounties/src/helpers/calculateBountyBond.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; export function calculateBountyBond (description: string, depositBase: BN, depositPerByte: BN): BN { return depositBase.add(depositPerByte.muln(countUtf8Bytes(description))); diff --git a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts index 0769c18926..95b50269e6 100644 --- a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts +++ b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.spec.ts @@ -1,11 +1,10 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { determineUnassignCuratorAction } from '@polkadot/app-bounties/helpers/determineUnassignCuratorAction'; import { createAugmentedApi } from '@polkadot/test-support/api'; import { BountyFactory } from '@polkadot/test-support/creation/bounties/bountyFactory'; +import { BN } from '@polkadot/util'; describe('adjust slash curator component for', () => { const augmentedApi = createAugmentedApi(); diff --git a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts index 1365cc98ef..5a97f7cb14 100644 --- a/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts +++ b/packages/page-bounties/src/helpers/determineUnassignCuratorAction.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { BountyStatus } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import { BN_ZERO } from '@polkadot/util'; diff --git a/packages/page-bounties/src/helpers/increaseDateByBlocks.ts b/packages/page-bounties/src/helpers/increaseDateByBlocks.ts index 17012a89ba..742523e9bb 100644 --- a/packages/page-bounties/src/helpers/increaseDateByBlocks.ts +++ b/packages/page-bounties/src/helpers/increaseDateByBlocks.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; export function increaseDateByBlocks (blocks: BN, blockTime: number): Date { return new Date(Date.now() + blocks.muln(blockTime).toNumber()); diff --git a/packages/page-bounties/src/helpers/isClaimable.spec.ts b/packages/page-bounties/src/helpers/isClaimable.spec.ts index fc9bbf6e03..1276afe026 100644 --- a/packages/page-bounties/src/helpers/isClaimable.spec.ts +++ b/packages/page-bounties/src/helpers/isClaimable.spec.ts @@ -1,9 +1,8 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { TypeRegistry } from '@polkadot/types/create'; +import { BN } from '@polkadot/util'; import { isClaimable } from './isClaimable'; diff --git a/packages/page-bounties/src/helpers/isClaimable.ts b/packages/page-bounties/src/helpers/isClaimable.ts index 0bb81244a9..97f2bd5298 100644 --- a/packages/page-bounties/src/helpers/isClaimable.ts +++ b/packages/page-bounties/src/helpers/isClaimable.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export function isClaimable (accounts: string[], beneficiary: AccountId, payoutDue: BN): boolean { return payoutDue.ltn(0) && accounts.includes(beneficiary.toString()); diff --git a/packages/page-bounties/src/helpers/permillOf.ts b/packages/page-bounties/src/helpers/permillOf.ts index 392a0c55b4..2c1a51b04b 100644 --- a/packages/page-bounties/src/helpers/permillOf.ts +++ b/packages/page-bounties/src/helpers/permillOf.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import { BN_MILLION } from '@polkadot/util'; diff --git a/packages/page-bounties/src/hooks/useBounties.tsx b/packages/page-bounties/src/hooks/useBounties.tsx index 3783d6b6e1..c6d52972e7 100644 --- a/packages/page-bounties/src/hooks/useBounties.tsx +++ b/packages/page-bounties/src/hooks/useBounties.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-bounties authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; +import type { BN } from '@polkadot/util'; import { DeriveBounties } from '@polkadot/api-derive/types'; import { createNamedHook, useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; diff --git a/packages/page-bounties/test/hooks/defaults.ts b/packages/page-bounties/test/hooks/defaults.ts index 3b6b8595d7..646941a187 100644 --- a/packages/page-bounties/test/hooks/defaults.ts +++ b/packages/page-bounties/test/hooks/defaults.ts @@ -3,11 +3,10 @@ import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; -import BN from 'bn.js'; - import { DeriveBounties } from '@polkadot/api-derive/types'; import { balanceOf } from '@polkadot/test-support/creation/balance'; import { BlockNumber } from '@polkadot/types/interfaces'; +import { BN } from '@polkadot/util'; import { BountyApi } from '../../src/hooks'; diff --git a/packages/page-calendar/src/types.ts b/packages/page-calendar/src/types.ts index 48be18c10e..22c2350f98 100644 --- a/packages/page-calendar/src/types.ts +++ b/packages/page-calendar/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; export type EntryType = 'councilElection' | 'councilMotion' | 'democracyDispatch' | 'democracyLaunch' | 'parachainAuction' | 'parachainLease' | 'referendumDispatch' | 'referendumVote' | 'scheduler' | 'societyChallenge' | 'societyRotate'| 'stakingEpoch' | 'stakingEra' | 'stakingSlash' | 'treasurySpend'; diff --git a/packages/page-calendar/src/useScheduled.ts b/packages/page-calendar/src/useScheduled.ts index 565c15336a..8090774638 100644 --- a/packages/page-calendar/src/useScheduled.ts +++ b/packages/page-calendar/src/useScheduled.ts @@ -1,11 +1,11 @@ // Copyright 2017-2022 @polkadot/app-calendar authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveCollectiveProposal, DeriveDispatch, DeriveReferendumExt, DeriveSessionProgress } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { BlockNumber, EraIndex, LeasePeriodOf, Scheduled, UnappliedSlash } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { BN } from '@polkadot/util'; import type { EntryInfo, EntryInfoTyped, EntryType } from './types'; import { useEffect, useState } from 'react'; diff --git a/packages/page-claims/src/Attest.tsx b/packages/page-claims/src/Attest.tsx index 9e4c904dbf..3cbd387e8b 100644 --- a/packages/page-claims/src/Attest.tsx +++ b/packages/page-claims/src/Attest.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { TxCallback } from '@polkadot/react-components/Status/types'; import type { Option } from '@polkadot/types'; import type { BalanceOf, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-claims/src/Claim.tsx b/packages/page-claims/src/Claim.tsx index 0a3863a942..beaec7b3b4 100644 --- a/packages/page-claims/src/Claim.tsx +++ b/packages/page-claims/src/Claim.tsx @@ -1,12 +1,12 @@ // Copyright 2017-2022 @polkadot/app-claims authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { TxCallback } from '@polkadot/react-components/Status/types'; import type { Option } from '@polkadot/types'; import type { BalanceOf, EthereumAddress, StatementKind } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-contracts/package.json b/packages/page-contracts/package.json index 71a93fba43..10e779e511 100644 --- a/packages/page-contracts/package.json +++ b/packages/page-contracts/package.json @@ -14,6 +14,6 @@ "version": "0.100.2-32", "dependencies": { "@babel/runtime": "^7.16.7", - "@polkadot/api-contract": "^7.2.1" + "@polkadot/api-contract": "^7.2.2-8" } } diff --git a/packages/page-contracts/src/Contracts/Call.tsx b/packages/page-contracts/src/Contracts/Call.tsx index 33ab559366..9d6df12d47 100644 --- a/packages/page-contracts/src/Contracts/Call.tsx +++ b/packages/page-contracts/src/Contracts/Call.tsx @@ -6,14 +6,13 @@ import type { ContractPromise } from '@polkadot/api-contract'; import type { ContractCallOutcome } from '@polkadot/api-contract/types'; import type { CallResult } from './types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; import styled from 'styled-components'; import { Button, Dropdown, Expander, InputAddress, InputBalance, Modal, Toggle, TxButton } from '@polkadot/react-components'; import { useAccountId, useApi, useDebounce, useFormField, useToggle } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; -import { BN_ONE, BN_ZERO } from '@polkadot/util'; +import { BN, BN_ONE, BN_ZERO } from '@polkadot/util'; import { InputMegaGas, Params } from '../shared'; import { useTranslation } from '../translate'; diff --git a/packages/page-contracts/src/Contracts/Summary.tsx b/packages/page-contracts/src/Contracts/Summary.tsx index c3d14e209b..3ce6d79ad9 100644 --- a/packages/page-contracts/src/Contracts/Summary.tsx +++ b/packages/page-contracts/src/Contracts/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-contracts/src/shared/InputMegaGas.tsx b/packages/page-contracts/src/shared/InputMegaGas.tsx index 7dc6f13c8d..e47b9ec274 100644 --- a/packages/page-contracts/src/shared/InputMegaGas.tsx +++ b/packages/page-contracts/src/shared/InputMegaGas.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { UseWeight } from '../types'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-contracts/src/types.ts b/packages/page-contracts/src/types.ts index fb44a24649..3839437edf 100644 --- a/packages/page-contracts/src/types.ts +++ b/packages/page-contracts/src/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-contracts authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Abi } from '@polkadot/api-contract'; +import type { BN } from '@polkadot/util'; export interface CodeJson { abi?: string | null; diff --git a/packages/page-contracts/src/useWeight.ts b/packages/page-contracts/src/useWeight.ts index a42a99e901..a11e95ea56 100644 --- a/packages/page-contracts/src/useWeight.ts +++ b/packages/page-contracts/src/useWeight.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Weight } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { UseWeight } from './types'; import { useCallback, useMemo, useState } from 'react'; diff --git a/packages/page-council/src/Motions/ProposeMotion.tsx b/packages/page-council/src/Motions/ProposeMotion.tsx index fac2221cd0..1be6e971dc 100644 --- a/packages/page-council/src/Motions/ProposeMotion.tsx +++ b/packages/page-council/src/Motions/ProposeMotion.tsx @@ -3,13 +3,12 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; import { getProposalThreshold } from '@polkadot/apps-config'; import { Button, Extrinsic, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-council/src/Overview/Vote.tsx b/packages/page-council/src/Overview/Vote.tsx index c1f9e98d71..f3e422128b 100644 --- a/packages/page-council/src/Overview/Vote.tsx +++ b/packages/page-council/src/Overview/Vote.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-council authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-council/src/Overview/types.ts b/packages/page-council/src/Overview/types.ts index 24fcef8e62..00f9940d94 100644 --- a/packages/page-council/src/Overview/types.ts +++ b/packages/page-council/src/Overview/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveElectionsInfo } from '@polkadot/api-derive/types'; import type { SetIndex } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export interface ComponentProps { electionsInfo?: DeriveElectionsInfo; diff --git a/packages/page-democracy/src/Overview/Fasttrack.tsx b/packages/page-democracy/src/Overview/Fasttrack.tsx index 5638f8c3d6..adf88e046a 100644 --- a/packages/page-democracy/src/Overview/Fasttrack.tsx +++ b/packages/page-democracy/src/Overview/Fasttrack.tsx @@ -4,12 +4,12 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { Hash, VoteThreshold } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useMemo, useState } from 'react'; import { getFastTrackThreshold } from '@polkadot/apps-config'; import { Button, Input, InputAddress, InputNumber, Modal, Toggle, TxButton } from '@polkadot/react-components'; import { useApi, useCall, useCollectiveInstance, useToggle } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-democracy/src/Overview/PreImage.tsx b/packages/page-democracy/src/Overview/PreImage.tsx index 3423166a3a..f001d7a78e 100644 --- a/packages/page-democracy/src/Overview/PreImage.tsx +++ b/packages/page-democracy/src/Overview/PreImage.tsx @@ -4,14 +4,13 @@ import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import type { Hash } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; import { Extrinsic, Input, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { Available } from '@polkadot/react-query'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import { blake2AsHex } from '@polkadot/util-crypto'; import { useTranslation } from '../translate'; diff --git a/packages/page-democracy/src/Overview/Propose.tsx b/packages/page-democracy/src/Overview/Propose.tsx index e18be59f92..0526b37c48 100644 --- a/packages/page-democracy/src/Overview/Propose.tsx +++ b/packages/page-democracy/src/Overview/Propose.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useCallback, useState } from 'react'; diff --git a/packages/page-democracy/src/Overview/Referendum.tsx b/packages/page-democracy/src/Overview/Referendum.tsx index ca68ad5de9..0ec4fe4855 100644 --- a/packages/page-democracy/src/Overview/Referendum.tsx +++ b/packages/page-democracy/src/Overview/Referendum.tsx @@ -4,14 +4,13 @@ import type { DeriveReferendumExt } from '@polkadot/api-derive/types'; import type { Balance } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import styled from 'styled-components'; import { Badge, Button, Icon, LinkExternal } from '@polkadot/react-components'; import { useAccounts, useApi, useBestNumber, useCall } from '@polkadot/react-hooks'; import { BlockToTime } from '@polkadot/react-query'; -import { BN_ONE, formatNumber, isBoolean } from '@polkadot/util'; +import { BN, BN_ONE, formatNumber, isBoolean } from '@polkadot/util'; import { useTranslation } from '../translate'; import useChangeCalc from '../useChangeCalc'; diff --git a/packages/page-democracy/src/Overview/ReferendumVotes.tsx b/packages/page-democracy/src/Overview/ReferendumVotes.tsx index 9888f8c062..a2dc873473 100644 --- a/packages/page-democracy/src/Overview/ReferendumVotes.tsx +++ b/packages/page-democracy/src/Overview/ReferendumVotes.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveReferendumVote } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-democracy/src/Overview/Seconding.tsx b/packages/page-democracy/src/Overview/Seconding.tsx index 21ed2dfae1..22296a9047 100644 --- a/packages/page-democracy/src/Overview/Seconding.tsx +++ b/packages/page-democracy/src/Overview/Seconding.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveProposalImage } from '@polkadot/api-derive/types'; import type { AccountId, Balance } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-democracy/src/Overview/Summary.tsx b/packages/page-democracy/src/Overview/Summary.tsx index 0a288c52d8..d5bdbb8c6f 100644 --- a/packages/page-democracy/src/Overview/Summary.tsx +++ b/packages/page-democracy/src/Overview/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-democracy/src/Overview/Voting.tsx b/packages/page-democracy/src/Overview/Voting.tsx index 91d11d93ba..b21ea54199 100644 --- a/packages/page-democracy/src/Overview/Voting.tsx +++ b/packages/page-democracy/src/Overview/Voting.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { PropIndex, Proposal } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-democracy/src/useChangeCalc.ts b/packages/page-democracy/src/useChangeCalc.ts index eef647ee1e..5cf5ca4f3e 100644 --- a/packages/page-democracy/src/useChangeCalc.ts +++ b/packages/page-democracy/src/useChangeCalc.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { VoteThreshold } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import { useEffect, useState } from 'react'; diff --git a/packages/page-democracy/src/util.spec.ts b/packages/page-democracy/src/util.spec.ts index efbdf8ff8b..77ae95cc28 100644 --- a/packages/page-democracy/src/util.spec.ts +++ b/packages/page-democracy/src/util.spec.ts @@ -1,10 +1,9 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { calcPassing } from '@polkadot/api-derive/democracy/util'; import { TypeRegistry } from '@polkadot/types/create'; +import { BN } from '@polkadot/util'; import { approxChanges } from './util'; diff --git a/packages/page-democracy/src/util.ts b/packages/page-democracy/src/util.ts index bb20bc7f09..04204af53b 100644 --- a/packages/page-democracy/src/util.ts +++ b/packages/page-democracy/src/util.ts @@ -3,10 +3,8 @@ import type { VoteThreshold } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - import { calcPassing } from '@polkadot/api-derive/democracy/util'; -import { BN_ONE, BN_TEN, BN_ZERO } from '@polkadot/util'; +import { BN, BN_ONE, BN_TEN, BN_ZERO } from '@polkadot/util'; interface Approx { changeAye: BN; diff --git a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx index 160584917c..f470a44103 100644 --- a/packages/page-explorer/src/BlockInfo/Extrinsic.tsx +++ b/packages/page-explorer/src/BlockInfo/Extrinsic.tsx @@ -4,12 +4,11 @@ import type { KeyedEvent } from '@polkadot/react-query/types'; import type { BlockNumber, DispatchInfo, Extrinsic, Weight } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import styled from 'styled-components'; import { AddressMini, Call, Expander, LinkExternal } from '@polkadot/react-components'; -import { formatNumber } from '@polkadot/util'; +import { BN, formatNumber } from '@polkadot/util'; import Event from '../Event'; import { useTranslation } from '../translate'; diff --git a/packages/page-explorer/src/BlockInfo/Summary.tsx b/packages/page-explorer/src/BlockInfo/Summary.tsx index 539822cae0..ed2632b296 100644 --- a/packages/page-explorer/src/BlockInfo/Summary.tsx +++ b/packages/page-explorer/src/BlockInfo/Summary.tsx @@ -4,13 +4,12 @@ import type { KeyedEvent } from '@polkadot/react-query/types'; import type { Balance, DispatchInfo, SignedBlock, Weight } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { formatNumber } from '@polkadot/util'; +import { BN, formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-gilt/src/Overview/BidAdd.tsx b/packages/page-gilt/src/Overview/BidAdd.tsx index 3bae94681e..618b435acd 100644 --- a/packages/page-gilt/src/Overview/BidAdd.tsx +++ b/packages/page-gilt/src/Overview/BidAdd.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-gilt authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-gilt/src/Overview/Summary.tsx b/packages/page-gilt/src/Overview/Summary.tsx index f35800c9c6..92efbdc1f4 100644 --- a/packages/page-gilt/src/Overview/Summary.tsx +++ b/packages/page-gilt/src/Overview/Summary.tsx @@ -3,12 +3,11 @@ import type { ActiveGiltsTotal } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import React from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useBestNumber } from '@polkadot/react-hooks'; -import { BN_HUNDRED, BN_QUINTILL, formatNumber } from '@polkadot/util'; +import { BN, BN_HUNDRED, BN_QUINTILL, formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-gilt/src/Overview/types.ts b/packages/page-gilt/src/Overview/types.ts index b33ca628f0..22b8547092 100644 --- a/packages/page-gilt/src/Overview/types.ts +++ b/packages/page-gilt/src/Overview/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-gilt authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ActiveGiltsTotal, BalanceOf } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export interface QueueTotal { balance: BalanceOf; diff --git a/packages/page-parachains/src/Auctions/Bid.tsx b/packages/page-parachains/src/Auctions/Bid.tsx index 7a8e608587..1b3a76eeeb 100644 --- a/packages/page-parachains/src/Auctions/Bid.tsx +++ b/packages/page-parachains/src/Auctions/Bid.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { AuctionInfo, OwnedId, OwnerInfo, Winning } from '../types'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-parachains/src/Auctions/WinRange.tsx b/packages/page-parachains/src/Auctions/WinRange.tsx index 36b559191d..974b74f5f3 100644 --- a/packages/page-parachains/src/Auctions/WinRange.tsx +++ b/packages/page-parachains/src/Auctions/WinRange.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { AuctionInfo, WinnerData } from '../types'; import React from 'react'; diff --git a/packages/page-parachains/src/Crowdloan/Contribute.tsx b/packages/page-parachains/src/Crowdloan/Contribute.tsx index 00e2716483..ac7c6bb51e 100644 --- a/packages/page-parachains/src/Crowdloan/Contribute.tsx +++ b/packages/page-parachains/src/Crowdloan/Contribute.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { Balance, BalanceOf, BlockNumber, ParaId } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-parachains/src/Crowdloan/Fund.tsx b/packages/page-parachains/src/Crowdloan/Fund.tsx index fe5421eb6f..1a0ee3a90c 100644 --- a/packages/page-parachains/src/Crowdloan/Fund.tsx +++ b/packages/page-parachains/src/Crowdloan/Fund.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { Campaign, LeasePeriod } from '../types'; import React, { useEffect, useMemo, useState } from 'react'; diff --git a/packages/page-parachains/src/Crowdloan/FundAdd.tsx b/packages/page-parachains/src/Crowdloan/FundAdd.tsx index b120acf060..2d375a64f2 100644 --- a/packages/page-parachains/src/Crowdloan/FundAdd.tsx +++ b/packages/page-parachains/src/Crowdloan/FundAdd.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { AuctionInfo, LeasePeriod, OwnedId, OwnerInfo } from '../types'; import React, { useState } from 'react'; diff --git a/packages/page-parachains/src/Crowdloan/Funds.tsx b/packages/page-parachains/src/Crowdloan/Funds.tsx index 842c83a531..488b761194 100644 --- a/packages/page-parachains/src/Crowdloan/Funds.tsx +++ b/packages/page-parachains/src/Crowdloan/Funds.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ParaId } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { Campaign, LeasePeriod } from '../types'; import React, { useMemo, useRef } from 'react'; diff --git a/packages/page-parachains/src/Crowdloan/Summary.tsx b/packages/page-parachains/src/Crowdloan/Summary.tsx index da6a0e19d5..3a20606972 100644 --- a/packages/page-parachains/src/Crowdloan/Summary.tsx +++ b/packages/page-parachains/src/Crowdloan/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-parachains/src/Overview/LeaseBlocks.tsx b/packages/page-parachains/src/Overview/LeaseBlocks.tsx index 6d89e1a9bf..99318a5dea 100644 --- a/packages/page-parachains/src/Overview/LeaseBlocks.tsx +++ b/packages/page-parachains/src/Overview/LeaseBlocks.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { LeasePeriod } from '../types'; import React, { useMemo } from 'react'; diff --git a/packages/page-parachains/src/Overview/Parachain.tsx b/packages/page-parachains/src/Overview/Parachain.tsx index c2c283c5f6..73d23a1be0 100644 --- a/packages/page-parachains/src/Overview/Parachain.tsx +++ b/packages/page-parachains/src/Overview/Parachain.tsx @@ -5,12 +5,11 @@ import type { AccountId, GroupIndex, ParaId } from '@polkadot/types/interfaces'; import type { LeasePeriod, QueuedAction } from '../types'; import type { EventMapInfo, ValidatorInfo } from './types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { AddressMini, Expander, ParaLink } from '@polkadot/react-components'; import { BlockToTime } from '@polkadot/react-query'; -import { formatNumber } from '@polkadot/util'; +import { BN, formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; import Lifecycle from './Lifecycle'; diff --git a/packages/page-parachains/src/Overview/Periods.tsx b/packages/page-parachains/src/Overview/Periods.tsx index fd27901a0a..e3270d0060 100644 --- a/packages/page-parachains/src/Overview/Periods.tsx +++ b/packages/page-parachains/src/Overview/Periods.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { LeasePeriod } from '../types'; import React, { useMemo } from 'react'; diff --git a/packages/page-parachains/src/Overview/types.ts b/packages/page-parachains/src/Overview/types.ts index 5eb64eea8e..2c8b9eb199 100644 --- a/packages/page-parachains/src/Overview/types.ts +++ b/packages/page-parachains/src/Overview/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, ParaValidatorIndex } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export interface EventMapInfo { blockHash: string; diff --git a/packages/page-parachains/src/Overview/useEvents.ts b/packages/page-parachains/src/Overview/useEvents.ts index 1a78324f74..6dab722d4a 100644 --- a/packages/page-parachains/src/Overview/useEvents.ts +++ b/packages/page-parachains/src/Overview/useEvents.ts @@ -1,12 +1,12 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { SignedBlockExtended } from '@polkadot/api-derive/types'; import type { Event } from '@polkadot/types/interfaces'; import type { PolkadotPrimitivesV1CandidateReceipt } from '@polkadot/types/lookup'; import type { IEvent } from '@polkadot/types/types'; +import type { BN } from '@polkadot/util'; import type { EventMapInfo } from './types'; import { useEffect, useState } from 'react'; diff --git a/packages/page-parachains/src/Parathreads/Actions.tsx b/packages/page-parachains/src/Parathreads/Actions.tsx index 6df51137e5..867d75be7e 100644 --- a/packages/page-parachains/src/Parathreads/Actions.tsx +++ b/packages/page-parachains/src/Parathreads/Actions.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ParaId } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { OwnedId } from '../types'; import React from 'react'; diff --git a/packages/page-parachains/src/Parathreads/RegisterId.tsx b/packages/page-parachains/src/Parathreads/RegisterId.tsx index 19b157a006..ec9d9159ca 100644 --- a/packages/page-parachains/src/Parathreads/RegisterId.tsx +++ b/packages/page-parachains/src/Parathreads/RegisterId.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-parachains/src/Parathreads/RegisterThread.tsx b/packages/page-parachains/src/Parathreads/RegisterThread.tsx index bba9e9ed65..0f26445f39 100644 --- a/packages/page-parachains/src/Parathreads/RegisterThread.tsx +++ b/packages/page-parachains/src/Parathreads/RegisterThread.tsx @@ -4,12 +4,11 @@ import type { BalanceOf } from '@polkadot/types/interfaces'; import type { OwnedId, OwnerInfo } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useMemo, useState } from 'react'; import { InputAddress, InputBalance, InputFile, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { compactAddLength } from '@polkadot/util'; +import { BN, compactAddLength } from '@polkadot/util'; import InputOwner from '../InputOwner'; import { useTranslation } from '../translate'; diff --git a/packages/page-parachains/src/Parathreads/constants.tsx b/packages/page-parachains/src/Parathreads/constants.tsx index 1af540aa08..47540dbfbc 100644 --- a/packages/page-parachains/src/Parathreads/constants.tsx +++ b/packages/page-parachains/src/Parathreads/constants.tsx @@ -1,9 +1,7 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - -import { BN_ONE, BN_THOUSAND } from '@polkadot/util'; +import { BN, BN_ONE, BN_THOUSAND } from '@polkadot/util'; export const LOWEST_PUBLIC_ID = new BN(2_000); diff --git a/packages/page-parachains/src/Proposals/Propose.tsx b/packages/page-parachains/src/Proposals/Propose.tsx index 27fc253ab6..3a9990d279 100644 --- a/packages/page-parachains/src/Proposals/Propose.tsx +++ b/packages/page-parachains/src/Proposals/Propose.tsx @@ -3,12 +3,11 @@ import type { TFunction } from 'i18next'; -import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; import { Button, Input, InputAddress, InputBalance, InputFile, InputNumber, InputWasm, MarkWarning, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { BN_TEN, BN_THOUSAND, BN_ZERO, compactAddLength } from '@polkadot/util'; +import { BN, BN_TEN, BN_THOUSAND, BN_ZERO, compactAddLength } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-parachains/src/Teleport.tsx b/packages/page-parachains/src/Teleport.tsx index e69df68248..24b698e3be 100644 --- a/packages/page-parachains/src/Teleport.tsx +++ b/packages/page-parachains/src/Teleport.tsx @@ -1,11 +1,11 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { SubmittableExtrinsicFunction } from '@polkadot/api/types'; import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; import type { Option } from '@polkadot/apps-config/settings/types'; import type { XcmVersionedMultiLocation } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-parachains/src/types.ts b/packages/page-parachains/src/types.ts index f69dcd2f89..d2e0118162 100644 --- a/packages/page-parachains/src/types.ts +++ b/packages/page-parachains/src/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, AuctionIndex, BalanceOf, BlockNumber, LeasePeriodOf, ParachainProposal, ParaId, SessionIndex } from '@polkadot/types/interfaces'; import type { PolkadotParachainPrimitivesHrmpChannelId, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsHrmpHrmpChannel } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; export type ChannelMap = Record; diff --git a/packages/page-parachains/src/useActionsQueue.ts b/packages/page-parachains/src/useActionsQueue.ts index b9be6e5ecd..22654bf289 100644 --- a/packages/page-parachains/src/useActionsQueue.ts +++ b/packages/page-parachains/src/useActionsQueue.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-parachains authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ParaId, SessionIndex } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { QueuedAction } from './types'; import { useMemo } from 'react'; diff --git a/packages/page-parachains/src/useFunds.ts b/packages/page-parachains/src/useFunds.ts index e79535505b..859c82e902 100644 --- a/packages/page-parachains/src/useFunds.ts +++ b/packages/page-parachains/src/useFunds.ts @@ -7,11 +7,10 @@ import type { PolkadotRuntimeCommonCrowdloanFundInfo } from '@polkadot/types/loo import type { ITuple } from '@polkadot/types/types'; import type { Campaign, Campaigns } from './types'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; import { createNamedHook, useApi, useBestNumber, useCall, useEventTrigger, useIsMountedRef, useMapKeys } from '@polkadot/react-hooks'; -import { BN_ZERO, u8aConcat } from '@polkadot/util'; +import { BN, BN_ZERO, u8aConcat } from '@polkadot/util'; import { encodeAddress } from '@polkadot/util-crypto'; import { CROWD_PREFIX } from './constants'; diff --git a/packages/page-parachains/src/useLeaseRanges.ts b/packages/page-parachains/src/useLeaseRanges.ts index db902ca261..3f37740ac9 100644 --- a/packages/page-parachains/src/useLeaseRanges.ts +++ b/packages/page-parachains/src/useLeaseRanges.ts @@ -3,10 +3,10 @@ import type { u32 } from '@polkadot/types'; -import BN from 'bn.js'; import { useMemo } from 'react'; import { createNamedHook, useApi } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; const RANGES_DEFAULT: [number, number][] = [ [0, 0], [0, 1], [0, 2], [0, 3], diff --git a/packages/page-parachains/src/useWinningData.ts b/packages/page-parachains/src/useWinningData.ts index 6a227690a4..937d10bcd3 100644 --- a/packages/page-parachains/src/useWinningData.ts +++ b/packages/page-parachains/src/useWinningData.ts @@ -5,11 +5,10 @@ import type { Option, StorageKey } from '@polkadot/types'; import type { BlockNumber, WinningData } from '@polkadot/types/interfaces'; import type { AuctionInfo, WinnerData, Winning } from './types'; -import BN from 'bn.js'; import { useEffect, useRef, useState } from 'react'; import { createNamedHook, useApi, useBestNumber, useCall, useEventTrigger, useIsMountedRef } from '@polkadot/react-hooks'; -import { BN_ONE, BN_ZERO, u8aEq } from '@polkadot/util'; +import { BN, BN_ONE, BN_ZERO, u8aEq } from '@polkadot/util'; import { CROWD_PREFIX } from './constants'; import { useLeaseRanges } from './useLeaseRanges'; diff --git a/packages/page-poll/src/index.tsx b/packages/page-poll/src/index.tsx index 7ad62b484a..c53fafaffa 100644 --- a/packages/page-poll/src/index.tsx +++ b/packages/page-poll/src/index.tsx @@ -4,7 +4,6 @@ import type { Approvals, Balance, BlockNumber } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; -import BN from 'bn.js'; import React, { useEffect, useRef, useState } from 'react'; import { Trans } from 'react-i18next'; import styled from 'styled-components'; @@ -12,7 +11,7 @@ import styled from 'styled-components'; import { Button, Columar, InputAddress, Progress, Spinner, Tabs, Toggle, TxButton } from '@polkadot/react-components'; import { useApi, useBestNumber, useCallMulti } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; -import { BN_MILLION, BN_ONE, BN_ZERO, bnMax, formatBalance, formatNumber } from '@polkadot/util'; +import { BN, BN_MILLION, BN_ONE, BN_ZERO, bnMax, formatBalance, formatNumber } from '@polkadot/util'; import { useTranslation } from './translate'; diff --git a/packages/page-rpc/src/Rpc/Account.tsx b/packages/page-rpc/src/Rpc/Account.tsx index 14a0212f0c..10399700ca 100644 --- a/packages/page-rpc/src/Rpc/Account.tsx +++ b/packages/page-rpc/src/Rpc/Account.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-rpc authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-society/src/Candidates/BidNew.tsx b/packages/page-society/src/Candidates/BidNew.tsx index c77832a044..b0bc6a779b 100644 --- a/packages/page-society/src/Candidates/BidNew.tsx +++ b/packages/page-society/src/Candidates/BidNew.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-society/src/Candidates/VouchFor.tsx b/packages/page-society/src/Candidates/VouchFor.tsx index ca59d59907..20db9a9e2d 100644 --- a/packages/page-society/src/Candidates/VouchFor.tsx +++ b/packages/page-society/src/Candidates/VouchFor.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-society/src/Overview/Member.tsx b/packages/page-society/src/Overview/Member.tsx index fd9004ddb5..18a8cbf156 100644 --- a/packages/page-society/src/Overview/Member.tsx +++ b/packages/page-society/src/Overview/Member.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Balance, BlockNumber } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { MapMember } from '../types'; import React, { useCallback, useMemo } from 'react'; diff --git a/packages/page-society/src/Overview/Summary.tsx b/packages/page-society/src/Overview/Summary.tsx index 521d5af8d0..be55fdb4c8 100644 --- a/packages/page-society/src/Overview/Summary.tsx +++ b/packages/page-society/src/Overview/Summary.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveSociety } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-society/src/Overview/index.tsx b/packages/page-society/src/Overview/index.tsx index 6bcdd81d52..cf8dac59cd 100644 --- a/packages/page-society/src/Overview/index.tsx +++ b/packages/page-society/src/Overview/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-society authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveSociety } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import type { MapMember } from '../types'; import React from 'react'; diff --git a/packages/page-society/src/index.tsx b/packages/page-society/src/index.tsx index c415c3dafd..bb20b2c85b 100644 --- a/packages/page-society/src/index.tsx +++ b/packages/page-society/src/index.tsx @@ -4,13 +4,12 @@ import type { DeriveSociety, DeriveSocietyMember } from '@polkadot/api-derive/types'; import type { MapMember } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router'; import { Tabs } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { BN_THREE, BN_TWO } from '@polkadot/util'; +import { BN, BN_THREE, BN_TWO } from '@polkadot/util'; import Candidates from './Candidates'; import Overview from './Overview'; diff --git a/packages/page-staking/src/Actions/Account/BondExtra.tsx b/packages/page-staking/src/Actions/Account/BondExtra.tsx index 2d068e0406..4c2badf044 100644 --- a/packages/page-staking/src/Actions/Account/BondExtra.tsx +++ b/packages/page-staking/src/Actions/Account/BondExtra.tsx @@ -4,14 +4,13 @@ import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { AmountValidateState } from '../types'; -import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; import { ApiPromise } from '@polkadot/api'; import { InputAddress, InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BalanceFree } from '@polkadot/react-query'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import { useTranslation } from '../../translate'; import ValidateAmount from './InputValidateAmount'; diff --git a/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx b/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx index 65f7c71738..9e11afc6c7 100644 --- a/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidateAmount.tsx @@ -4,12 +4,11 @@ import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { AmountValidateState } from '../types'; -import BN from 'bn.js'; import React, { useEffect, useState } from 'react'; import { MarkError, MarkWarning } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { BN_TEN, BN_THOUSAND, BN_ZERO, formatBalance } from '@polkadot/util'; +import { BN, BN_TEN, BN_THOUSAND, BN_ZERO, formatBalance } from '@polkadot/util'; import { useTranslation } from '../../translate'; diff --git a/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx b/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx index 6f12b07014..487fd0cd7d 100644 --- a/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx +++ b/packages/page-staking/src/Actions/Account/InputValidationUnstakeThreshold.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/ListNominees.tsx b/packages/page-staking/src/Actions/Account/ListNominees.tsx index 32ed49a666..e4ae54e050 100644 --- a/packages/page-staking/src/Actions/Account/ListNominees.tsx +++ b/packages/page-staking/src/Actions/Account/ListNominees.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveEraExposure, DeriveSessionIndexes } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/Rebond.tsx b/packages/page-staking/src/Actions/Account/Rebond.tsx index bb9cdded5c..2418859ae5 100644 --- a/packages/page-staking/src/Actions/Account/Rebond.tsx +++ b/packages/page-staking/src/Actions/Account/Rebond.tsx @@ -3,12 +3,11 @@ import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; import { InputBalance, Modal, TxButton } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import { useTranslation } from '../../translate'; import SenderInfo from '../partials/SenderInfo'; diff --git a/packages/page-staking/src/Actions/Account/Unbond.tsx b/packages/page-staking/src/Actions/Account/Unbond.tsx index 30e579627c..4777faea49 100644 --- a/packages/page-staking/src/Actions/Account/Unbond.tsx +++ b/packages/page-staking/src/Actions/Account/Unbond.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, StakingLedger } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-staking/src/Actions/Account/WarnBond.tsx b/packages/page-staking/src/Actions/Account/WarnBond.tsx index 7844e2853e..fed8e027bc 100644 --- a/packages/page-staking/src/Actions/Account/WarnBond.tsx +++ b/packages/page-staking/src/Actions/Account/WarnBond.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveStakingAccount } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Actions/Account/index.tsx b/packages/page-staking/src/Actions/Account/index.tsx index 8afb84c19d..82d6633f29 100644 --- a/packages/page-staking/src/Actions/Account/index.tsx +++ b/packages/page-staking/src/Actions/Account/index.tsx @@ -8,14 +8,13 @@ import type { SlashingSpans, UnappliedSlash } from '@polkadot/types/interfaces'; import type { SortedTargets } from '../../types'; import type { Slash } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useContext, useMemo } from 'react'; import styled from 'styled-components'; import { ApiPromise } from '@polkadot/api'; import { AddressInfo, AddressMini, AddressSmall, Badge, Button, Menu, Popup, StakingBonded, StakingRedeemable, StakingUnbonding, StatusContext, TxButton } from '@polkadot/react-components'; import { useApi, useCall, useToggle } from '@polkadot/react-hooks'; -import { formatNumber, isFunction } from '@polkadot/util'; +import { BN, formatNumber, isFunction } from '@polkadot/util'; import { useTranslation } from '../../translate'; import BondExtra from './BondExtra'; diff --git a/packages/page-staking/src/Actions/index.tsx b/packages/page-staking/src/Actions/index.tsx index ad0690ee7c..9c4cb33800 100644 --- a/packages/page-staking/src/Actions/index.tsx +++ b/packages/page-staking/src/Actions/index.tsx @@ -4,13 +4,12 @@ import type { StakerState } from '@polkadot/react-hooks/types'; import type { SortedTargets } from '../types'; -import BN from 'bn.js'; import React, { useMemo, useRef, useState } from 'react'; import { Button, Table, ToggleGroup } from '@polkadot/react-components'; import { useAvailableSlashes } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import ElectionBanner from '../ElectionBanner'; import { useTranslation } from '../translate'; diff --git a/packages/page-staking/src/Actions/partials/Bond.tsx b/packages/page-staking/src/Actions/partials/Bond.tsx index ad5d29edef..d6649ae8c2 100644 --- a/packages/page-staking/src/Actions/partials/Bond.tsx +++ b/packages/page-staking/src/Actions/partials/Bond.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import type { AmountValidateState, DestinationType } from '../types'; import type { BondInfo } from './types'; diff --git a/packages/page-staking/src/Actions/partials/Validate.tsx b/packages/page-staking/src/Actions/partials/Validate.tsx index cd90eba950..ab7ffaa099 100644 --- a/packages/page-staking/src/Actions/partials/Validate.tsx +++ b/packages/page-staking/src/Actions/partials/Validate.tsx @@ -3,12 +3,11 @@ import type { ValidateInfo } from './types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { Dropdown, InputAddress, InputNumber, Modal } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { BN_HUNDRED as MAX_COMM, isFunction } from '@polkadot/util'; +import { BN, BN_HUNDRED as MAX_COMM, isFunction } from '@polkadot/util'; import { useTranslation } from '../../translate'; diff --git a/packages/page-staking/src/Actions/types.ts b/packages/page-staking/src/Actions/types.ts index cc13ab0d6a..8527321f3f 100644 --- a/packages/page-staking/src/Actions/types.ts +++ b/packages/page-staking/src/Actions/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, Balance, UnappliedSlashOther } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export interface AmountValidateState { error: string | null; diff --git a/packages/page-staking/src/Actions/useUnbondDuration.ts b/packages/page-staking/src/Actions/useUnbondDuration.ts index 25f766f3ff..cccf2b0f7b 100644 --- a/packages/page-staking/src/Actions/useUnbondDuration.ts +++ b/packages/page-staking/src/Actions/useUnbondDuration.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveSessionInfo } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import { useMemo } from 'react'; diff --git a/packages/page-staking/src/Overview/Address/StakeOther.tsx b/packages/page-staking/src/Overview/Address/StakeOther.tsx index 0265501f5e..73be1dee00 100644 --- a/packages/page-staking/src/Overview/Address/StakeOther.tsx +++ b/packages/page-staking/src/Overview/Address/StakeOther.tsx @@ -3,13 +3,12 @@ import type { NominatorValue } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { AddressMini, Expander } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; interface Props { stakeOther?: BN; diff --git a/packages/page-staking/src/Overview/Address/Status.tsx b/packages/page-staking/src/Overview/Address/Status.tsx index 41883fb940..f771ebd44a 100644 --- a/packages/page-staking/src/Overview/Address/Status.tsx +++ b/packages/page-staking/src/Overview/Address/Status.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Overview/Address/index.tsx b/packages/page-staking/src/Overview/Address/index.tsx index dd721ff3e1..89972d13a6 100644 --- a/packages/page-staking/src/Overview/Address/index.tsx +++ b/packages/page-staking/src/Overview/Address/index.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveHeartbeatAuthor } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { SlashingSpans, ValidatorPrefs } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { NominatedBy as NominatedByType, ValidatorInfo } from '../../types'; import type { NominatorValue } from './types'; diff --git a/packages/page-staking/src/Payouts/Stash.tsx b/packages/page-staking/src/Payouts/Stash.tsx index 2a52af37e5..d3882a211b 100644 --- a/packages/page-staking/src/Payouts/Stash.tsx +++ b/packages/page-staking/src/Payouts/Stash.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { PayoutStash } from './types'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-staking/src/Payouts/Validator.tsx b/packages/page-staking/src/Payouts/Validator.tsx index c1b608bd9c..71810fa262 100644 --- a/packages/page-staking/src/Payouts/Validator.tsx +++ b/packages/page-staking/src/Payouts/Validator.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { PayoutValidator } from './types'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Payouts/index.tsx b/packages/page-staking/src/Payouts/index.tsx index 387ee607a9..f6f9ccda41 100644 --- a/packages/page-staking/src/Payouts/index.tsx +++ b/packages/page-staking/src/Payouts/index.tsx @@ -6,7 +6,6 @@ import type { DeriveStakerReward } from '@polkadot/api-derive/types'; import type { StakerState } from '@polkadot/react-hooks/types'; import type { PayoutStash, PayoutValidator } from './types'; -import BN from 'bn.js'; import React, { useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; @@ -14,7 +13,7 @@ import { ApiPromise } from '@polkadot/api'; import { Button, Table, ToggleGroup } from '@polkadot/react-components'; import { useApi, useCall, useOwnEraRewards } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { BN_THREE } from '@polkadot/util'; +import { BN, BN_THREE } from '@polkadot/util'; import ElectionBanner from '../ElectionBanner'; import { useTranslation } from '../translate'; diff --git a/packages/page-staking/src/Payouts/types.ts b/packages/page-staking/src/Payouts/types.ts index 0c2485ca7b..5581f57ef2 100644 --- a/packages/page-staking/src/Payouts/types.ts +++ b/packages/page-staking/src/Payouts/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveStakerReward } from '@polkadot/api-derive/types'; import type { Balance, EraIndex } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export interface PayoutEraValidator { era: EraIndex; diff --git a/packages/page-staking/src/Payouts/useEraBlocks.ts b/packages/page-staking/src/Payouts/useEraBlocks.ts index 9e56a66115..61f36d52f1 100644 --- a/packages/page-staking/src/Payouts/useEraBlocks.ts +++ b/packages/page-staking/src/Payouts/useEraBlocks.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; import type { Forcing } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import { useMemo } from 'react'; diff --git a/packages/page-staking/src/Payouts/util.tsx b/packages/page-staking/src/Payouts/util.tsx index b9b7bf7458..ce349d4f8e 100644 --- a/packages/page-staking/src/Payouts/util.tsx +++ b/packages/page-staking/src/Payouts/util.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-staking/src/Query/ChartPrefs.tsx b/packages/page-staking/src/Query/ChartPrefs.tsx index 91b10afca5..fb359d57e1 100644 --- a/packages/page-staking/src/Query/ChartPrefs.tsx +++ b/packages/page-staking/src/Query/ChartPrefs.tsx @@ -4,12 +4,11 @@ import type { DeriveStakerPrefs } from '@polkadot/api-derive/types'; import type { ChartInfo, LineDataEntry, Props } from './types'; -import BN from 'bn.js'; import React, { useMemo, useRef } from 'react'; import { Chart, Spinner } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { BN_BILLION } from '@polkadot/util'; +import { BN, BN_BILLION } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-staking/src/Query/ChartRewards.tsx b/packages/page-staking/src/Query/ChartRewards.tsx index 55bd7a88cd..767369d790 100644 --- a/packages/page-staking/src/Query/ChartRewards.tsx +++ b/packages/page-staking/src/Query/ChartRewards.tsx @@ -4,12 +4,11 @@ import type { DeriveEraRewards, DeriveOwnSlashes, DeriveStakerPoints } from '@polkadot/api-derive/types'; import type { ChartInfo, LineDataEntry, Props } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { Chart, Spinner } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { formatBalance } from '@polkadot/util'; +import { BN, formatBalance } from '@polkadot/util'; import { useTranslation } from '../translate'; import { balanceToNumber } from './util'; diff --git a/packages/page-staking/src/Query/ChartStake.tsx b/packages/page-staking/src/Query/ChartStake.tsx index b838fd89ca..f103c6051a 100644 --- a/packages/page-staking/src/Query/ChartStake.tsx +++ b/packages/page-staking/src/Query/ChartStake.tsx @@ -4,12 +4,11 @@ import type { DeriveOwnExposure } from '@polkadot/api-derive/types'; import type { ChartInfo, LineDataEntry, Props } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { Chart, Spinner } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; -import { formatBalance } from '@polkadot/util'; +import { BN, formatBalance } from '@polkadot/util'; import { useTranslation } from '../translate'; import { balanceToNumber } from './util'; diff --git a/packages/page-staking/src/Query/types.ts b/packages/page-staking/src/Query/types.ts index ebd1cb0eac..d45c26b62b 100644 --- a/packages/page-staking/src/Query/types.ts +++ b/packages/page-staking/src/Query/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; export interface Props { className?: string; diff --git a/packages/page-staking/src/Query/util.ts b/packages/page-staking/src/Query/util.ts index d4ca0638e8..f6c38ce7cb 100644 --- a/packages/page-staking/src/Query/util.ts +++ b/packages/page-staking/src/Query/util.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import { BN_THOUSAND, BN_ZERO, isBn, isFunction } from '@polkadot/util'; diff --git a/packages/page-staking/src/Slashes/Summary.tsx b/packages/page-staking/src/Slashes/Summary.tsx index 854cc1e7a4..9c04c50276 100644 --- a/packages/page-staking/src/Slashes/Summary.tsx +++ b/packages/page-staking/src/Slashes/Summary.tsx @@ -4,13 +4,12 @@ import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; import type { SlashEra } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import { CardSummary, SummaryBox } from '@polkadot/react-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { FormatBalance } from '@polkadot/react-query'; -import { BN_ONE, formatNumber } from '@polkadot/util'; +import { BN, BN_ONE, formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-staking/src/Slashes/index.tsx b/packages/page-staking/src/Slashes/index.tsx index 41c78ea09b..b5bdd185b3 100644 --- a/packages/page-staking/src/Slashes/index.tsx +++ b/packages/page-staking/src/Slashes/index.tsx @@ -5,13 +5,12 @@ import type { StakerState } from '@polkadot/react-hooks/types'; import type { UnappliedSlash } from '@polkadot/types/interfaces'; import type { Slash, SlashEra } from './types'; -import BN from 'bn.js'; import React, { useMemo, useState } from 'react'; import { getSlashProposalThreshold } from '@polkadot/apps-config'; import { Table, ToggleGroup } from '@polkadot/react-components'; import { useAccounts, useApi, useCollectiveMembers } from '@polkadot/react-hooks'; -import { formatNumber } from '@polkadot/util'; +import { BN, formatNumber } from '@polkadot/util'; import { useTranslation } from '../translate'; import Era from './Era'; diff --git a/packages/page-staking/src/Slashes/types.ts b/packages/page-staking/src/Slashes/types.ts index 7bbfa17925..0962a57752 100644 --- a/packages/page-staking/src/Slashes/types.ts +++ b/packages/page-staking/src/Slashes/types.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { UnappliedSlash } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export interface Slash { era: BN; diff --git a/packages/page-staking/src/Targets/Summary.tsx b/packages/page-staking/src/Targets/Summary.tsx index 9fafe0db5a..d45039628c 100644 --- a/packages/page-staking/src/Targets/Summary.tsx +++ b/packages/page-staking/src/Targets/Summary.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveSessionIndexes } from '@polkadot/api-derive/types'; import type { Option } from '@polkadot/types'; import type { Balance } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/page-staking/src/Targets/Validator.tsx b/packages/page-staking/src/Targets/Validator.tsx index b8979a309d..d6b17e1b24 100644 --- a/packages/page-staking/src/Targets/Validator.tsx +++ b/packages/page-staking/src/Targets/Validator.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { UnappliedSlash } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import type { NominatedBy, ValidatorInfo } from '../types'; import React, { useCallback, useMemo } from 'react'; diff --git a/packages/page-staking/src/Targets/index.tsx b/packages/page-staking/src/Targets/index.tsx index 1a6ae0f571..64c477432b 100644 --- a/packages/page-staking/src/Targets/index.tsx +++ b/packages/page-staking/src/Targets/index.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveHasIdentity, DeriveStakingOverview } from '@polkadot/api-derive/types'; import type { StakerState } from '@polkadot/react-hooks/types'; +import type { BN } from '@polkadot/util'; import type { NominatedBy, SortedTargets, TargetSortBy, ValidatorInfo } from '../types'; import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; diff --git a/packages/page-staking/src/types.ts b/packages/page-staking/src/types.ts index 8db2749c29..6b0a6bc2b1 100644 --- a/packages/page-staking/src/types.ts +++ b/packages/page-staking/src/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Inflation } from '@polkadot/react-hooks/types'; import type { AccountId, Balance, BlockNumber, EraIndex, Exposure, Hash, SessionIndex, ValidatorPrefs, ValidatorPrefsTo196 } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; export type Nominators = Record; diff --git a/packages/page-staking/src/useSortedTargets.ts b/packages/page-staking/src/useSortedTargets.ts index 3310a61c74..2861c0d82b 100644 --- a/packages/page-staking/src/useSortedTargets.ts +++ b/packages/page-staking/src/useSortedTargets.ts @@ -7,11 +7,10 @@ import type { Inflation } from '@polkadot/react-hooks/types'; import type { Option, u32 } from '@polkadot/types'; import type { SortedTargets, TargetSortBy, ValidatorInfo } from './types'; -import BN from 'bn.js'; import { useMemo } from 'react'; import { createNamedHook, useAccounts, useApi, useCall, useCallMulti, useInflation } from '@polkadot/react-hooks'; -import { arrayFlatten, BN_HUNDRED, BN_MAX_INTEGER, BN_ONE, BN_ZERO } from '@polkadot/util'; +import { arrayFlatten, BN, BN_HUNDRED, BN_MAX_INTEGER, BN_ONE, BN_ZERO } from '@polkadot/util'; interface LastEra { activeEra: BN; diff --git a/packages/page-sudo/src/Sudo.tsx b/packages/page-sudo/src/Sudo.tsx index 61fc317136..3ee49ca962 100644 --- a/packages/page-sudo/src/Sudo.tsx +++ b/packages/page-sudo/src/Sudo.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-js authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { BN } from '@polkadot/util'; import React, { useCallback, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-tech-comm/src/Proposals/Propose.tsx b/packages/page-tech-comm/src/Proposals/Propose.tsx index 5518c1afab..291ed1d248 100644 --- a/packages/page-tech-comm/src/Proposals/Propose.tsx +++ b/packages/page-tech-comm/src/Proposals/Propose.tsx @@ -3,11 +3,11 @@ import type { SubmittableExtrinsic } from '@polkadot/api/types'; -import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; import { Button, Extrinsic, InputAddress, InputNumber, Modal, TxButton } from '@polkadot/react-components'; import { useApi, useCollectiveInstance, useModal } from '@polkadot/react-hooks'; +import { BN } from '@polkadot/util'; import { useTranslation } from '../translate'; diff --git a/packages/page-tech-comm/src/Proposals/Voting.tsx b/packages/page-tech-comm/src/Proposals/Voting.tsx index ab67daf08a..9e2adb65db 100644 --- a/packages/page-tech-comm/src/Proposals/Voting.tsx +++ b/packages/page-tech-comm/src/Proposals/Voting.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-tech-comm authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, Hash } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-treasury/src/Overview/ProposalCreate.tsx b/packages/page-treasury/src/Overview/ProposalCreate.tsx index 04ca85d7f9..a5b67ca3ff 100644 --- a/packages/page-treasury/src/Overview/ProposalCreate.tsx +++ b/packages/page-treasury/src/Overview/ProposalCreate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useState } from 'react'; diff --git a/packages/page-treasury/src/Overview/Summary.tsx b/packages/page-treasury/src/Overview/Summary.tsx index 88004367f4..05e1a57f96 100644 --- a/packages/page-treasury/src/Overview/Summary.tsx +++ b/packages/page-treasury/src/Overview/Summary.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/page-treasury/src/Tips/Tip.tsx b/packages/page-treasury/src/Tips/Tip.tsx index 780d095624..67489e5588 100644 --- a/packages/page-treasury/src/Tips/Tip.tsx +++ b/packages/page-treasury/src/Tips/Tip.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, Balance, BlockNumber, OpenTipTo225 } from '@polkadot/types/interfaces'; import type { PalletTipsOpenTip } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-treasury/src/Tips/TipCreate.tsx b/packages/page-treasury/src/Tips/TipCreate.tsx index e1619c3547..4b66e18800 100644 --- a/packages/page-treasury/src/Tips/TipCreate.tsx +++ b/packages/page-treasury/src/Tips/TipCreate.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; diff --git a/packages/page-treasury/src/Tips/TipEndorse.tsx b/packages/page-treasury/src/Tips/TipEndorse.tsx index 12436e1aff..9459c27c2d 100644 --- a/packages/page-treasury/src/Tips/TipEndorse.tsx +++ b/packages/page-treasury/src/Tips/TipEndorse.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useState } from 'react'; diff --git a/packages/page-treasury/src/Tips/Tips.tsx b/packages/page-treasury/src/Tips/Tips.tsx index 5636675616..c4626f490d 100644 --- a/packages/page-treasury/src/Tips/Tips.tsx +++ b/packages/page-treasury/src/Tips/Tips.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Option } from '@polkadot/types'; import type { OpenTipTo225 } from '@polkadot/types/interfaces'; import type { PalletTipsOpenTip } from '@polkadot/types/lookup'; +import type { BN } from '@polkadot/util'; import React, { useMemo, useRef, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/page-treasury/src/Tips/index.tsx b/packages/page-treasury/src/Tips/index.tsx index 990c1fc1a2..f2e71de2a8 100644 --- a/packages/page-treasury/src/Tips/index.tsx +++ b/packages/page-treasury/src/Tips/index.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-treasury authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; +import type { BN } from '@polkadot/util'; import React, { useCallback, useMemo, useState } from 'react'; diff --git a/packages/react-api/package.json b/packages/react-api/package.json index 34ee66c5a7..eb33ee4ccf 100644 --- a/packages/react-api/package.json +++ b/packages/react-api/package.json @@ -14,9 +14,9 @@ "version": "0.100.2-32", "dependencies": { "@babel/runtime": "^7.16.7", - "@polkadot/api": "^7.2.1", - "@polkadot/extension-compat-metamask": "^0.42.5-11", - "@polkadot/extension-dapp": "^0.42.5-11", + "@polkadot/api": "^7.2.2-8", + "@polkadot/extension-compat-metamask": "^0.42.5-16", + "@polkadot/extension-dapp": "^0.42.5-16", "@substrate/connect": "0.4.6", "fflate": "^0.7.2", "rxjs": "^7.5.1" diff --git a/packages/react-api/src/Api.tsx b/packages/react-api/src/Api.tsx index 2bdc793835..4bf0854bcb 100644 --- a/packages/react-api/src/Api.tsx +++ b/packages/react-api/src/Api.tsx @@ -10,8 +10,7 @@ import { Detector } from '@substrate/connect'; import React, { useContext, useEffect, useMemo, useState } from 'react'; import store from 'store'; -import { WsProvider } from '@polkadot/api'; -import { ApiPromise } from '@polkadot/api/promise'; +import { ApiPromise, WsProvider } from '@polkadot/api'; import { deriveMapCache, setDeriveCache } from '@polkadot/api-derive/util'; import { ethereumChains, typesBundle, typesChain } from '@polkadot/apps-config'; import { web3Accounts, web3Enable } from '@polkadot/extension-dapp'; diff --git a/packages/react-api/src/types.ts b/packages/react-api/src/types.ts index 9e2d03e129..2b200152c3 100644 --- a/packages/react-api/src/types.ts +++ b/packages/react-api/src/types.ts @@ -5,7 +5,7 @@ import type { SubmittableExtrinsicFunction } from '@polkadot/api/promise/types'; import type { LinkOption } from '@polkadot/apps-config/settings/types'; import type { InjectedExtension } from '@polkadot/extension-inject/types'; -import { ApiPromise } from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; // helpers for HOC props export type OmitProps = Pick>; diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 5a05ed06b8..3bb8da97f9 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -17,15 +17,15 @@ "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@fortawesome/react-fontawesome": "^0.1.16", - "@polkadot/keyring": "^8.2.2", + "@polkadot/keyring": "^8.2.3-29", "@polkadot/react-api": "^0.100.2-32", - "@polkadot/react-identicon": "^0.88.2-0", - "@polkadot/react-qr": "^0.88.2-0", + "@polkadot/react-identicon": "^0.88.2-4", + "@polkadot/react-qr": "^0.88.2-4", "@polkadot/react-query": "^0.100.2-32", - "@polkadot/ui-keyring": "^0.88.2-0", - "@polkadot/ui-settings": "^0.88.2-0", - "@polkadot/util": "^8.2.2", - "@polkadot/util-crypto": "^8.2.2", + "@polkadot/ui-keyring": "^0.88.2-4", + "@polkadot/ui-settings": "^0.88.2-4", + "@polkadot/util": "^8.2.3-29", + "@polkadot/util-crypto": "^8.2.3-29", "chart.js": "^2.9.4", "codeflask": "^1.4.1", "i18next": "^21.6.5", diff --git a/packages/react-components/src/AddressInfo.tsx b/packages/react-components/src/AddressInfo.tsx index 3874c18c05..e259654201 100644 --- a/packages/react-components/src/AddressInfo.tsx +++ b/packages/react-components/src/AddressInfo.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { TFunction } from 'i18next'; import type { DeriveBalancesAccountData, DeriveBalancesAll, DeriveDemocracyLock, DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { BlockNumber, LockIdentifier, ValidatorPrefsTo145, Voting } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useRef } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/AddressMini.tsx b/packages/react-components/src/AddressMini.tsx index a9ab7b7a28..06dcedd65d 100644 --- a/packages/react-components/src/AddressMini.tsx +++ b/packages/react-components/src/AddressMini.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; import type { KeyringItemType } from '@polkadot/ui-keyring/types'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Balance.tsx b/packages/react-components/src/Balance.tsx index e4fe13764d..9b44a55dfa 100644 --- a/packages/react-components/src/Balance.tsx +++ b/packages/react-components/src/Balance.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/react-components/src/Bonded.tsx b/packages/react-components/src/Bonded.tsx index c32ba2bb5c..c9c6b5804d 100644 --- a/packages/react-components/src/Bonded.tsx +++ b/packages/react-components/src/Bonded.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/react-components/src/Call.tsx b/packages/react-components/src/Call.tsx index 695252ff01..e3549b164b 100644 --- a/packages/react-components/src/Call.tsx +++ b/packages/react-components/src/Call.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ExtrinsicSignature } from '@polkadot/types/interfaces'; import type { Codec, IExtrinsic, IMethod, TypeDef } from '@polkadot/types/types'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/CardSummary.tsx b/packages/react-components/src/CardSummary.tsx index 28a82209db..12b118ac20 100644 --- a/packages/react-components/src/CardSummary.tsx +++ b/packages/react-components/src/CardSummary.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { UInt } from '@polkadot/types'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Chart/Line.tsx b/packages/react-components/src/Chart/Line.tsx index 62a474fe47..b44a123b48 100644 --- a/packages/react-components/src/Chart/Line.tsx +++ b/packages/react-components/src/Chart/Line.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { LineProps } from './types'; import ChartJs from 'chart.js'; diff --git a/packages/react-components/src/Chart/types.ts b/packages/react-components/src/Chart/types.ts index bff216b766..89df323a0c 100644 --- a/packages/react-components/src/Chart/types.ts +++ b/packages/react-components/src/Chart/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; export interface DoughnutValue { colors: string[]; diff --git a/packages/react-components/src/ConvictionDropdown.tsx b/packages/react-components/src/ConvictionDropdown.tsx index 2c94e3815b..3ae194f907 100644 --- a/packages/react-components/src/ConvictionDropdown.tsx +++ b/packages/react-components/src/ConvictionDropdown.tsx @@ -3,12 +3,11 @@ import type { TFunction } from 'i18next'; -import BN from 'bn.js'; import React, { useRef } from 'react'; import { ApiPromise } from '@polkadot/api'; import { useApi, useBlockTime } from '@polkadot/react-hooks'; -import { BN_THOUSAND } from '@polkadot/util'; +import { BN, BN_THOUSAND } from '@polkadot/util'; import Dropdown from './Dropdown'; import { useTranslation } from './translate'; diff --git a/packages/react-components/src/DemocracyLocks.tsx b/packages/react-components/src/DemocracyLocks.tsx index 2a198c0d9a..ffd9a90889 100644 --- a/packages/react-components/src/DemocracyLocks.tsx +++ b/packages/react-components/src/DemocracyLocks.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { TFunction } from 'i18next'; import type { DeriveDemocracyLock } from '@polkadot/api-derive/types'; import type { Balance } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/InputBalance.tsx b/packages/react-components/src/InputBalance.tsx index 59cd7faac4..5a801a80f4 100644 --- a/packages/react-components/src/InputBalance.tsx +++ b/packages/react-components/src/InputBalance.tsx @@ -4,12 +4,11 @@ import type { SiDef } from '@polkadot/util/types'; import type { BitLength } from './types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import styled from 'styled-components'; import { BitLengthOption } from '@polkadot/react-components/constants'; -import { formatBalance, isUndefined } from '@polkadot/util'; +import { BN, formatBalance, isUndefined } from '@polkadot/util'; import InputNumber from './InputNumber'; diff --git a/packages/react-components/src/InputNumber.tsx b/packages/react-components/src/InputNumber.tsx index f5508a91c3..af39605773 100644 --- a/packages/react-components/src/InputNumber.tsx +++ b/packages/react-components/src/InputNumber.tsx @@ -5,12 +5,11 @@ import type { ApiPromise } from '@polkadot/api'; import type { SiDef } from '@polkadot/util/types'; import type { BitLength } from './types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import styled from 'styled-components'; import { useApi } from '@polkadot/react-hooks'; -import { BN_ONE, BN_TEN, BN_TWO, BN_ZERO, formatBalance, isBn, isUndefined } from '@polkadot/util'; +import { BN, BN_ONE, BN_TEN, BN_TWO, BN_ZERO, formatBalance, isBn, isUndefined } from '@polkadot/util'; import { BitLengthOption } from './constants'; import Dropdown from './Dropdown'; diff --git a/packages/react-components/src/LinkExternal.tsx b/packages/react-components/src/LinkExternal.tsx index 7a8549dd3d..67ade3e54f 100644 --- a/packages/react-components/src/LinkExternal.tsx +++ b/packages/react-components/src/LinkExternal.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { LinkTypes } from '@polkadot/apps-config/links/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/ParaLink.tsx b/packages/react-components/src/ParaLink.tsx index 3fa5e807be..02954545d0 100644 --- a/packages/react-components/src/ParaLink.tsx +++ b/packages/react-components/src/ParaLink.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/Progress.tsx b/packages/react-components/src/Progress.tsx index 5069003096..f807c2f152 100644 --- a/packages/react-components/src/Progress.tsx +++ b/packages/react-components/src/Progress.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { UInt } from '@polkadot/types'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/ProposedAction.tsx b/packages/react-components/src/ProposedAction.tsx index 810a4e7726..ea59454e5a 100644 --- a/packages/react-components/src/ProposedAction.tsx +++ b/packages/react-components/src/ProposedAction.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/app-democracy authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Proposal } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-components/src/StakingUnbonding.tsx b/packages/react-components/src/StakingUnbonding.tsx index ebd7342b2b..11b2a0cf0d 100644 --- a/packages/react-components/src/StakingUnbonding.tsx +++ b/packages/react-components/src/StakingUnbonding.tsx @@ -3,13 +3,12 @@ import type { DeriveSessionProgress, DeriveStakingAccount, DeriveUnlocking } from '@polkadot/api-derive/types'; -import BN from 'bn.js'; import React, { useMemo } from 'react'; import styled from 'styled-components'; import { useApi, useCall } from '@polkadot/react-hooks'; import { BlockToTime, FormatBalance } from '@polkadot/react-query'; -import { BN_ONE, BN_ZERO, formatBalance, formatNumber } from '@polkadot/util'; +import { BN, BN_ONE, BN_ZERO, formatBalance, formatNumber } from '@polkadot/util'; import Icon from './Icon'; import Tooltip from './Tooltip'; diff --git a/packages/react-components/src/VoteValue.tsx b/packages/react-components/src/VoteValue.tsx index 932d6631f1..e7e06beb92 100644 --- a/packages/react-components/src/VoteValue.tsx +++ b/packages/react-components/src/VoteValue.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useCallback, useEffect, useState } from 'react'; diff --git a/packages/react-hooks/src/useAvailableSlashes.ts b/packages/react-hooks/src/useAvailableSlashes.ts index db93a62573..6c459276b1 100644 --- a/packages/react-hooks/src/useAvailableSlashes.ts +++ b/packages/react-hooks/src/useAvailableSlashes.ts @@ -6,10 +6,9 @@ import type { Option } from '@polkadot/types'; import type { EraIndex } from '@polkadot/types/interfaces'; import type { PalletStakingUnappliedSlash } from '@polkadot/types/lookup'; -import BN from 'bn.js'; import { useEffect, useState } from 'react'; -import { BN_ONE } from '@polkadot/util'; +import { BN, BN_ONE } from '@polkadot/util'; import { createNamedHook } from './createNamedHook'; import { useApi } from './useApi'; diff --git a/packages/react-hooks/src/useInflation.ts b/packages/react-hooks/src/useInflation.ts index d840145b5b..d8c1fd7182 100644 --- a/packages/react-hooks/src/useInflation.ts +++ b/packages/react-hooks/src/useInflation.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; +import type { BN } from '@polkadot/util'; import type { Inflation } from './types'; import { useEffect, useState } from 'react'; diff --git a/packages/react-hooks/src/useNonZeroBn.ts b/packages/react-hooks/src/useNonZeroBn.ts index 7bd390e2ff..fd3d536088 100644 --- a/packages/react-hooks/src/useNonZeroBn.ts +++ b/packages/react-hooks/src/useNonZeroBn.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import { useMemo } from 'react'; diff --git a/packages/react-hooks/src/useParaApi.ts b/packages/react-hooks/src/useParaApi.ts index 17c8a86f51..343df9e326 100644 --- a/packages/react-hooks/src/useParaApi.ts +++ b/packages/react-hooks/src/useParaApi.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; +import type { BN } from '@polkadot/util'; import { useEffect, useState } from 'react'; diff --git a/packages/react-hooks/src/useParaEndpoints.ts b/packages/react-hooks/src/useParaEndpoints.ts index ac73e1f573..c1d424060d 100644 --- a/packages/react-hooks/src/useParaEndpoints.ts +++ b/packages/react-hooks/src/useParaEndpoints.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { LinkOption } from '@polkadot/apps-config/endpoints/types'; +import type { BN } from '@polkadot/util'; import { useMemo } from 'react'; diff --git a/packages/react-hooks/src/useProxies.ts b/packages/react-hooks/src/useProxies.ts index 1048381bbb..6377c7de51 100644 --- a/packages/react-hooks/src/useProxies.ts +++ b/packages/react-hooks/src/useProxies.ts @@ -1,10 +1,9 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { AccountId } from '@polkadot/types/interfaces'; import { NodeRuntimeProxyType, PalletProxyProxyDefinition } from '@polkadot/types/lookup'; +import { BN } from '@polkadot/util'; import { createNamedHook } from './createNamedHook'; import { useAccounts } from './useAccounts'; diff --git a/packages/react-hooks/src/useTreasury.ts b/packages/react-hooks/src/useTreasury.ts index b3bb93ff7b..18ebbe5973 100644 --- a/packages/react-hooks/src/useTreasury.ts +++ b/packages/react-hooks/src/useTreasury.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Balance } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import { useEffect, useState } from 'react'; diff --git a/packages/react-hooks/src/useVotingStatus.ts b/packages/react-hooks/src/useVotingStatus.ts index 33146481b4..af30d3172d 100644 --- a/packages/react-hooks/src/useVotingStatus.ts +++ b/packages/react-hooks/src/useVotingStatus.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { BlockNumber, Votes } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import { useMemo } from 'react'; diff --git a/packages/react-hooks/src/useWeight.ts b/packages/react-hooks/src/useWeight.ts index bb2e9a49ef..fd1ce413e2 100644 --- a/packages/react-hooks/src/useWeight.ts +++ b/packages/react-hooks/src/useWeight.ts @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-hooks authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Call } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import { useEffect, useState } from 'react'; diff --git a/packages/react-hooks/src/useWeightFee.ts b/packages/react-hooks/src/useWeightFee.ts index d2e78be0a2..109cb088ec 100644 --- a/packages/react-hooks/src/useWeightFee.ts +++ b/packages/react-hooks/src/useWeightFee.ts @@ -4,10 +4,9 @@ import type { ApiPromise } from '@polkadot/api'; import type { WeightToFeeCoefficient } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { useMemo } from 'react'; -import { BN_BILLION, BN_ZERO, bnToBn, isUndefined } from '@polkadot/util'; +import { BN, BN_BILLION, BN_ZERO, bnToBn, isUndefined } from '@polkadot/util'; import { createNamedHook } from './createNamedHook'; import { useApi } from './useApi'; diff --git a/packages/react-params/src/Param/Amount.tsx b/packages/react-params/src/Param/Amount.tsx index 2e194856ed..3bedc983d4 100644 --- a/packages/react-params/src/Param/Amount.tsx +++ b/packages/react-params/src/Param/Amount.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/react-params authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import type { Props } from '../types'; import React, { useCallback, useMemo } from 'react'; diff --git a/packages/react-params/src/Param/Balance.tsx b/packages/react-params/src/Param/Balance.tsx index bb0f8ede85..695593e583 100644 --- a/packages/react-params/src/Param/Balance.tsx +++ b/packages/react-params/src/Param/Balance.tsx @@ -3,10 +3,10 @@ import type { Props } from '../types'; -import BN from 'bn.js'; import React, { useCallback, useState } from 'react'; import { InputBalance } from '@polkadot/react-components'; +import { BN } from '@polkadot/util'; import Bare from './Bare'; diff --git a/packages/react-query/src/BlockToTime.tsx b/packages/react-query/src/BlockToTime.tsx index 3cd7c1310c..b6d4f7b0cf 100644 --- a/packages/react-query/src/BlockToTime.tsx +++ b/packages/react-query/src/BlockToTime.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/react-query/src/Elapsed.tsx b/packages/react-query/src/Elapsed.tsx index 86a8edb664..c98464aedf 100644 --- a/packages/react-query/src/Elapsed.tsx +++ b/packages/react-query/src/Elapsed.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-query/src/FormatBalance.tsx b/packages/react-query/src/FormatBalance.tsx index 768c6467ed..14880505cb 100644 --- a/packages/react-query/src/FormatBalance.tsx +++ b/packages/react-query/src/FormatBalance.tsx @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Compact } from '@polkadot/types'; import type { Registry } from '@polkadot/types/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; import styled from 'styled-components'; diff --git a/packages/react-query/src/Nonce.tsx b/packages/react-query/src/Nonce.tsx index 6fccb38f48..5b1712970e 100644 --- a/packages/react-query/src/Nonce.tsx +++ b/packages/react-query/src/Nonce.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React from 'react'; diff --git a/packages/react-query/src/SessionToTime.tsx b/packages/react-query/src/SessionToTime.tsx index ddc36b716b..2bd4a592c0 100644 --- a/packages/react-query/src/SessionToTime.tsx +++ b/packages/react-query/src/SessionToTime.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { DeriveSessionProgress } from '@polkadot/api-derive/types'; +import type { BN } from '@polkadot/util'; import React, { useMemo } from 'react'; diff --git a/packages/react-query/src/TimeNow.tsx b/packages/react-query/src/TimeNow.tsx index c1ab94be21..2cc4fa438f 100644 --- a/packages/react-query/src/TimeNow.tsx +++ b/packages/react-query/src/TimeNow.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-query authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { Moment } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; diff --git a/packages/react-signer/src/Address.tsx b/packages/react-signer/src/Address.tsx index e9862a352f..530cc01953 100644 --- a/packages/react-signer/src/Address.tsx +++ b/packages/react-signer/src/Address.tsx @@ -1,13 +1,13 @@ // Copyright 2017-2022 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/types'; import type { QueueTx } from '@polkadot/react-components/Status/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, BalanceOf, Call, Multisig } from '@polkadot/types/interfaces'; import type { NodeRuntimeProxyType, PalletProxyProxyDefinition } from '@polkadot/types/lookup'; import type { ITuple } from '@polkadot/types/types'; +import type { BN } from '@polkadot/util'; import type { AddressFlags, AddressProxy } from './types'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; diff --git a/packages/react-signer/src/PaymentInfo.tsx b/packages/react-signer/src/PaymentInfo.tsx index 8f8d7d4ac1..d02955af1a 100644 --- a/packages/react-signer/src/PaymentInfo.tsx +++ b/packages/react-signer/src/PaymentInfo.tsx @@ -1,10 +1,10 @@ // Copyright 2017-2022 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { SubmittableExtrinsic } from '@polkadot/api/promise/types'; import type { DeriveBalancesAll } from '@polkadot/api-derive/types'; import type { RuntimeDispatchInfo } from '@polkadot/types/interfaces'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; import { Trans } from 'react-i18next'; diff --git a/packages/react-signer/src/SignFields.tsx b/packages/react-signer/src/SignFields.tsx index 274cbb8e21..d0965d6236 100644 --- a/packages/react-signer/src/SignFields.tsx +++ b/packages/react-signer/src/SignFields.tsx @@ -3,12 +3,11 @@ import type { SignerOptions } from '@polkadot/api/submittable/types'; -import BN from 'bn.js'; import React, { useCallback, useEffect, useState } from 'react'; import { InputNumber, Modal, Output } from '@polkadot/react-components'; import { useApi } from '@polkadot/react-hooks'; -import { BN_ZERO } from '@polkadot/util'; +import { BN, BN_ZERO } from '@polkadot/util'; import { useTranslation } from './translate'; diff --git a/packages/react-signer/src/Tip.tsx b/packages/react-signer/src/Tip.tsx index 1562966441..94bfec29d0 100644 --- a/packages/react-signer/src/Tip.tsx +++ b/packages/react-signer/src/Tip.tsx @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; +import type { BN } from '@polkadot/util'; import React, { useEffect, useState } from 'react'; diff --git a/packages/react-signer/src/Transaction.tsx b/packages/react-signer/src/Transaction.tsx index f323f7d832..6fdbce1b42 100644 --- a/packages/react-signer/src/Transaction.tsx +++ b/packages/react-signer/src/Transaction.tsx @@ -1,8 +1,8 @@ // Copyright 2017-2022 @polkadot/react-signer authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { QueueTx } from '@polkadot/react-components/Status/types'; +import type { BN } from '@polkadot/util'; import React from 'react'; import styled from 'styled-components'; diff --git a/packages/test-support/package.json b/packages/test-support/package.json index 392c594c9e..23b3c53f7a 100644 --- a/packages/test-support/package.json +++ b/packages/test-support/package.json @@ -17,7 +17,7 @@ "testcontainers": "^8.1.2" }, "devDependencies": { - "@polkadot/types-support": "^7.2.1", + "@polkadot/types-support": "^7.2.2-8", "@testing-library/jest-dom": "^5.16.1", "tsconfig-paths": "^3.12.0" } diff --git a/packages/test-support/scripts/lib/changeBountyStateFunctions.ts b/packages/test-support/scripts/lib/changeBountyStateFunctions.ts index 58ba72acfe..7d57ea1b94 100644 --- a/packages/test-support/scripts/lib/changeBountyStateFunctions.ts +++ b/packages/test-support/scripts/lib/changeBountyStateFunctions.ts @@ -1,9 +1,9 @@ // Copyright 2017-2022 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type BN from 'bn.js'; import type { ApiPromise } from '@polkadot/api'; import type { KeyringPair } from '@polkadot/keyring/types'; +import type { BN } from '@polkadot/util'; import { execute } from '@polkadot/test-support/transaction'; diff --git a/packages/test-support/scripts/lib/constants.ts b/packages/test-support/scripts/lib/constants.ts index d6a2ea01d6..4c6922adaa 100644 --- a/packages/test-support/scripts/lib/constants.ts +++ b/packages/test-support/scripts/lib/constants.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import { BN } from '@polkadot/util'; export const TREASURY_ADDRESS = '13UVJyLnbVp9RBZYFwFGyDvVd1y27Tt8tkntv6Q7JVPhFsTB'; export const FUNDING_TIME = 150000; diff --git a/packages/test-support/scripts/lib/helpers.ts b/packages/test-support/scripts/lib/helpers.ts index 86da4f70c0..c1e9bba7c9 100644 --- a/packages/test-support/scripts/lib/helpers.ts +++ b/packages/test-support/scripts/lib/helpers.ts @@ -1,8 +1,6 @@ // Copyright 2017-2022 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { ApiPromise } from '@polkadot/api'; import { SubmittableExtrinsic } from '@polkadot/api/types'; import { DeriveCollectiveProposal } from '@polkadot/api-derive/types'; @@ -10,6 +8,7 @@ import { KeyringPair } from '@polkadot/keyring/types'; import { charlieSigner, daveSigner, eveSigner, ferdieSigner } from '@polkadot/test-support/keyring'; import { execute } from '@polkadot/test-support/transaction'; import { Hash } from '@polkadot/types/interfaces'; +import { BN } from '@polkadot/util'; import { LENGTH_BOUND, TREASURY_ADDRESS, WEIGHT_BOUND } from './constants'; diff --git a/packages/test-support/scripts/lib/multiFunctions.ts b/packages/test-support/scripts/lib/multiFunctions.ts index 1b335dd2b4..1e59d980f3 100644 --- a/packages/test-support/scripts/lib/multiFunctions.ts +++ b/packages/test-support/scripts/lib/multiFunctions.ts @@ -1,11 +1,10 @@ // Copyright 2017-2022 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { ApiPromise } from '@polkadot/api'; import { KeyringPair } from '@polkadot/keyring/types'; import { execute } from '@polkadot/test-support/transaction'; +import { BN } from '@polkadot/util'; import { waitForBountyState, waitForClaim } from './bountyWaitFunctions'; import { FUNDING_TIME, PAYOUT_TIME } from './constants'; diff --git a/packages/test-support/src/api/createApi.ts b/packages/test-support/src/api/createApi.ts index 7d516d02c8..2299f9be09 100644 --- a/packages/test-support/src/api/createApi.ts +++ b/packages/test-support/src/api/createApi.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiPromise } from '@polkadot/api/promise'; +import { ApiPromise } from '@polkadot/api'; import { WsProvider } from '@polkadot/rpc-provider'; import { SUBSTRATE_PORT } from '@polkadot/test-support/substrate'; diff --git a/packages/test-support/src/creation/stakingInfo/stakingLedger.ts b/packages/test-support/src/creation/stakingInfo/stakingLedger.ts index b3f2a5978a..909a12b1c0 100644 --- a/packages/test-support/src/creation/stakingInfo/stakingLedger.ts +++ b/packages/test-support/src/creation/stakingInfo/stakingLedger.ts @@ -3,9 +3,8 @@ import type { PalletStakingStakingLedger } from '@polkadot/types/lookup'; -import BN from 'bn.js'; - import { TypeRegistry } from '@polkadot/types/create'; +import { BN } from '@polkadot/util'; export function makeStakingLedger (active: BN | number | string): PalletStakingStakingLedger { const reg = new TypeRegistry(); diff --git a/packages/test-support/src/creation/treasury/defaults.ts b/packages/test-support/src/creation/treasury/defaults.ts index 90d891e127..5641c9b848 100644 --- a/packages/test-support/src/creation/treasury/defaults.ts +++ b/packages/test-support/src/creation/treasury/defaults.ts @@ -1,7 +1,7 @@ // Copyright 2017-2022 @polkadot/test-support authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; +import { BN } from '@polkadot/util'; import { balanceOf } from '../balance'; diff --git a/packages/test-support/src/pages/Page.tsx b/packages/test-support/src/pages/Page.tsx index 89c6a9fa56..36433fdb8a 100644 --- a/packages/test-support/src/pages/Page.tsx +++ b/packages/test-support/src/pages/Page.tsx @@ -2,7 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 import { queryByAttribute, render, RenderResult, screen } from '@testing-library/react'; -import BN from 'bn.js'; import React, { Suspense } from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; @@ -18,6 +17,7 @@ import { UseAccountInfo } from '@polkadot/react-hooks/types'; import { mockApiHooks } from '@polkadot/test-support/utils/mockApiHooks'; import { TypeRegistry } from '@polkadot/types/create'; import { keyring } from '@polkadot/ui-keyring'; +import { BN } from '@polkadot/util'; import { alice, bob, charlie, ferdie } from '../keyring'; import { Table } from '../pagesElements'; diff --git a/packages/test-support/src/utils/accountDefaults.ts b/packages/test-support/src/utils/accountDefaults.ts index d8b59c1fad..b94e910c8c 100644 --- a/packages/test-support/src/utils/accountDefaults.ts +++ b/packages/test-support/src/utils/accountDefaults.ts @@ -4,10 +4,9 @@ import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types'; import type { UseAccountInfo } from '@polkadot/react-hooks/types'; -import BN from 'bn.js'; - import { UseAccounts } from '@polkadot/react-hooks/useAccounts'; import { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; +import { BN } from '@polkadot/util'; import { balanceOf } from '../creation/balance'; import { makeStakingLedger } from '../creation/stakingInfo/stakingLedger'; diff --git a/packages/test-support/src/utils/balance.ts b/packages/test-support/src/utils/balance.ts index 8a431711ea..bad41a4a38 100644 --- a/packages/test-support/src/utils/balance.ts +++ b/packages/test-support/src/utils/balance.ts @@ -1,10 +1,8 @@ // Copyright 2017-2022 @polkadot/test-supports authors & contributors // SPDX-License-Identifier: Apache-2.0 -import BN from 'bn.js'; - import { Balance } from '@polkadot/types/interfaces'; -import { formatBalance } from '@polkadot/util'; +import { BN, formatBalance } from '@polkadot/util'; import { balanceOf } from '../creation/balance'; diff --git a/packages/test-support/src/utils/mockApiHooks.ts b/packages/test-support/src/utils/mockApiHooks.ts index 30f193276d..d9a8c7a60d 100644 --- a/packages/test-support/src/utils/mockApiHooks.ts +++ b/packages/test-support/src/utils/mockApiHooks.ts @@ -4,9 +4,8 @@ import type { Registrar } from '@polkadot/react-hooks/types'; import type { ProxyDefinition, RegistrationJudgement, Voting } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; - import { H256, Multisig } from '@polkadot/types/interfaces'; +import { BN } from '@polkadot/util'; class MockApiHooks { public multisigApprovals: [H256, Multisig][] | undefined = []; diff --git a/yarn.lock b/yarn.lock index 9525e4765b..b70727df7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -64,7 +64,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.16.7, @babel/core@npm:^7.7.2": +"@babel/core@npm:^7.1.0, @babel/core@npm:^7.12.3, @babel/core@npm:^7.16.7, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": version: 7.16.7 resolution: "@babel/core@npm:7.16.7" dependencies: @@ -1974,9 +1974,9 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^27.4.6": - version: 27.4.6 - resolution: "@jest/core@npm:27.4.6" +"@jest/core@npm:^27.4.7": + version: 27.4.7 + resolution: "@jest/core@npm:27.4.7" dependencies: "@jest/console": ^27.4.6 "@jest/reporters": ^27.4.6 @@ -1990,7 +1990,7 @@ __metadata: exit: ^0.1.2 graceful-fs: ^4.2.4 jest-changed-files: ^27.4.2 - jest-config: ^27.4.6 + jest-config: ^27.4.7 jest-haste-map: ^27.4.6 jest-message-util: ^27.4.6 jest-regex-util: ^27.4.0 @@ -2011,7 +2011,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 903c2c45e74a276795453a743b6ca8344e3bad8d8b169760286ca4cc828c1d51e903f67971b9e244ebf9b88286a99bccc587a23a28fea23fd80ae846113b3834 + checksum: 24ed123ef1819fa8c6069706760efac9904ee8824b22c346259be2017d820b5e578a4d444339448a576a0158e6fec91d18fdedb201bc97d7390b105d665f3642 languageName: node linkType: hard @@ -2311,14 +2311,14 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:^0.4.5": - version: 0.4.5 - resolution: "@noble/hashes@npm:0.4.5" - checksum: 0de28bda5517989d4893db2f1913ca052d22f549a530965599b36f946753bef1d552d60a4be831723a0d81f9bcca3a5f7c9a1d30d4308d11657f9879ad288d03 +"@noble/hashes@npm:0.5.9": + version: 0.5.9 + resolution: "@noble/hashes@npm:0.5.9" + checksum: 71a8e0d13a47243a66f6b68035b29335e49a2786193c4ecd3f8e967214fdfb3d0d000b1d0e2374ee28e3d7794a484453c632e7fa75275c7cda3771fcb657d946 languageName: node linkType: hard -"@noble/secp256k1@npm:^1.3.4": +"@noble/secp256k1@npm:1.3.4": version: 1.3.4 resolution: "@noble/secp256k1@npm:1.3.4" checksum: af1f1e76387f1a081315550a938b6cee58ea9d844472eadde0a3cb42ad317bd5d824748e7ff96bcf23e45a346bd5a2aed536b450c635f664f3a1dce674ce7648 @@ -2539,90 +2539,90 @@ __metadata: languageName: node linkType: hard -"@polkadot/api-augment@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/api-augment@npm:7.2.1" +"@polkadot/api-augment@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/api-augment@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/api-base": 7.2.1 - "@polkadot/rpc-augment": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/types-augment": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/util": ^8.2.2 - checksum: 103fe6cf69887a27b6287a37f2bfaf11307e7b665204908079d8d4335bf9dfc51c2619642e2a270f07f249d393df9cd5fcc8e4a4089507ab35c74527973224d1 + "@polkadot/api-base": 7.2.2-8 + "@polkadot/rpc-augment": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-augment": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + checksum: a79f69fd405fae47524e194db96bcc09053746e1e7523a0767686b8d304080c0016405ac5df9c225691bff57d211beb618451bdf74fa94d49c6dec19f3d16536 languageName: node linkType: hard -"@polkadot/api-base@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/api-base@npm:7.2.1" +"@polkadot/api-base@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/api-base@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/rpc-core": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/util": ^8.2.2 + "@polkadot/rpc-core": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 rxjs: ^7.5.1 - checksum: 7eddf57f4b39a0eac74fd25c891c5dc5250b39234839c0bd2518ddd9164d8d766dcdffa09646dfd10ce5a7af7ec7798123d05b6c002edde2a668ad47f90b8172 + checksum: d50b7b78f260aafac6ba51716f3d48a5f37b55c05b2ddd45c03d5bc76791bf23d8c616f4d5416ff9d66c66ca54a5173ece3a1e648498066ba221d2f1d6872699 languageName: node linkType: hard -"@polkadot/api-contract@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/api-contract@npm:7.2.1" +"@polkadot/api-contract@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/api-contract@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/api": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/types-create": 7.2.1 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/api": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/types-create": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 rxjs: ^7.5.1 - checksum: 02c45e3f48950c74ce98c53c70ba32ae64450efd77a8f9d7211124bac287dad8a81a2789deb52d95ffd543210147e56bc55775c19c8daf67444f8640af15465e + checksum: 55e47cbb3180e5c47a03fc0cd6e27f25c2742065fcefa0a77927a3a2542468515ff8769b50840aea71296b45c52063f8000990e541772a82a058564adbaa7bdf languageName: node linkType: hard -"@polkadot/api-derive@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/api-derive@npm:7.2.1" +"@polkadot/api-derive@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/api-derive@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/api": 7.2.1 - "@polkadot/api-augment": 7.2.1 - "@polkadot/api-base": 7.2.1 - "@polkadot/rpc-core": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/api": 7.2.2-8 + "@polkadot/api-augment": 7.2.2-8 + "@polkadot/api-base": 7.2.2-8 + "@polkadot/rpc-core": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 rxjs: ^7.5.1 - checksum: cf39d23a63f2c8a2806f401e351be3df4479e5d050931ade61d322dbfc29424e6acd48049d4e852c8ddf3fda531e3f25b77c5e6164637ec9df129efcc50e9ec5 + checksum: 57bef0365c3e13a00401cbed238714401a673ec4aed90a48e935821fe3accbfbb1bd63c7b36544bfea5748fe68cd83f5347f6e257505682600fe5ec2de619004 languageName: node linkType: hard -"@polkadot/api@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/api@npm:7.2.1" +"@polkadot/api@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/api@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/api-augment": 7.2.1 - "@polkadot/api-base": 7.2.1 - "@polkadot/api-derive": 7.2.1 - "@polkadot/keyring": ^8.2.2 - "@polkadot/rpc-augment": 7.2.1 - "@polkadot/rpc-core": 7.2.1 - "@polkadot/rpc-provider": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/types-augment": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/types-create": 7.2.1 - "@polkadot/types-known": 7.2.1 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/api-augment": 7.2.2-8 + "@polkadot/api-base": 7.2.2-8 + "@polkadot/api-derive": 7.2.2-8 + "@polkadot/keyring": ^8.2.3-29 + "@polkadot/rpc-augment": 7.2.2-8 + "@polkadot/rpc-core": 7.2.2-8 + "@polkadot/rpc-provider": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-augment": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/types-create": 7.2.2-8 + "@polkadot/types-known": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 eventemitter3: ^4.0.7 rxjs: ^7.5.1 - checksum: c7905b86747a1bd19acdd9f77e16b2d50e56c4f3eec65a6dc82e6dba6eb27ff149a3d8cee6c1a21dff9556ed1f7fe2fe940ab7de12c09fb9d0d76ee376031d56 + checksum: 8326234a6a1709af39e3f930852a0cc5485186b558bda3e74d8aaf713dd4c9e03a4b00c5287b24eb8274f89783237d1614ad95e27b0ea00fde4941873ebcb685 languageName: node linkType: hard @@ -2631,10 +2631,10 @@ __metadata: resolution: "@polkadot/app-accounts@workspace:packages/page-accounts" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/phishing": ^0.7.25 + "@polkadot/phishing": ^0.7.30 "@polkadot/react-components": ^0.100.2-32 "@polkadot/test-support": 0.100.2-32 - "@polkadot/vanitygen": ^0.48.10 + "@polkadot/vanitygen": ^0.48.11-2 detect-browser: ^5.3.0 file-saver: ^2.0.5 languageName: unknown @@ -2695,7 +2695,7 @@ __metadata: resolution: "@polkadot/app-contracts@workspace:packages/page-contracts" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/api-contract": ^7.2.1 + "@polkadot/api-contract": ^7.2.2-8 languageName: unknown linkType: soft @@ -2894,12 +2894,12 @@ __metadata: "@metaverse-network-sdk/type-definitions": ^0.0.1-6 "@parallel-finance/type-definitions": 1.4.4 "@phala/typedefs": 0.2.30 - "@polkadot/api": ^7.2.1 - "@polkadot/api-derive": ^7.2.1 - "@polkadot/networks": ^8.2.2 - "@polkadot/types": ^7.2.1 - "@polkadot/util": ^8.2.2 - "@polkadot/x-fetch": ^8.2.2 + "@polkadot/api": ^7.2.2-8 + "@polkadot/api-derive": ^7.2.2-8 + "@polkadot/networks": ^8.2.3-29 + "@polkadot/types": ^7.2.2-8 + "@polkadot/util": ^8.2.3-29 + "@polkadot/x-fetch": ^8.2.3-29 "@polymathnetwork/polymesh-types": 0.0.2 "@snowfork/snowbridge-types": 0.2.6 "@sora-substrate/type-definitions": 1.7.4 @@ -2921,7 +2921,7 @@ __metadata: dependencies: "@babel/core": ^7.16.7 "@babel/polyfill": ^7.12.1 - "@polkadot/dev": ^0.65.14 + "@polkadot/dev": ^0.65.21 "@polkadot/react-components": ^0.100.2-32 "@types/react-dom": ^17.0.11 "@types/tmp": ^0.2.3 @@ -2955,7 +2955,7 @@ __metadata: "@babel/runtime": ^7.16.7 "@polkadot/apps-config": ^0.100.2-32 "@polkadot/apps-routing": ^0.100.2-32 - "@polkadot/dev": ^0.65.14 + "@polkadot/dev": ^0.65.21 "@polkadot/react-api": ^0.100.2-32 "@polkadot/react-components": ^0.100.2-32 "@polkadot/react-hooks": ^0.100.2-32 @@ -2992,9 +2992,9 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/dev@npm:^0.65.14": - version: 0.65.14 - resolution: "@polkadot/dev@npm:0.65.14" +"@polkadot/dev@npm:^0.65.21": + version: 0.65.21 + resolution: "@polkadot/dev@npm:0.65.21" dependencies: "@babel/cli": ^7.16.7 "@babel/core": ^7.16.7 @@ -3016,7 +3016,7 @@ __metadata: "@rollup/plugin-commonjs": ^21.0.1 "@rollup/plugin-inject": ^4.0.4 "@rollup/plugin-json": ^4.1.0 - "@rollup/plugin-node-resolve": ^13.1.2 + "@rollup/plugin-node-resolve": ^13.1.3 "@rushstack/eslint-patch": ^1.1.0 "@typescript-eslint/eslint-plugin": 5.9.0 "@typescript-eslint/parser": 5.9.0 @@ -3044,9 +3044,9 @@ __metadata: gh-release: ^6.0.1 glob: ^7.2.0 glob2base: ^0.0.12 - jest: ^27.4.6 - jest-cli: ^27.4.6 - jest-config: ^27.4.6 + jest: ^27.4.7 + jest-cli: ^27.4.7 + jest-config: ^27.4.7 jest-haste-map: ^27.4.6 jest-resolve: ^27.4.6 madge: ^5.0.1 @@ -3080,117 +3080,121 @@ __metadata: polkadot-exec-rollup: scripts/polkadot-exec-rollup.mjs polkadot-exec-tsc: scripts/polkadot-exec-tsc.mjs polkadot-exec-webpack: scripts/polkadot-exec-webpack.mjs - checksum: 1f84b340baf285c26eee908e05e1cfd01887f536ba57fddb319580a2783337f9e3967dc9cbf1e7a18af9e6c660ab97638397d0202ef99321e543af848ff6aa95 + checksum: 895f0b12b49dbac33b801d3edb41c43b5eb0bf841e0b34e995763ab540d475872039a93cb51cada2a621ebec618454cc6f21502ff191c11a4b1ace32abfcbf6f languageName: node linkType: hard -"@polkadot/extension-compat-metamask@npm:^0.42.5-11": - version: 0.42.5-11 - resolution: "@polkadot/extension-compat-metamask@npm:0.42.5-11" +"@polkadot/extension-compat-metamask@npm:^0.42.5-16": + version: 0.42.5-16 + resolution: "@polkadot/extension-compat-metamask@npm:0.42.5-16" dependencies: "@babel/runtime": ^7.16.7 "@metamask/detect-provider": ^1.2.0 - "@polkadot/extension-inject": ^0.42.5-11 - "@polkadot/types": ^7.1.2-1 - "@polkadot/util": ^8.2.2 + "@polkadot/extension-inject": ^0.42.5-16 + "@polkadot/types": ^7.2.2-7 + "@polkadot/util": ^8.2.3-29 web3: ^1.6.1 peerDependencies: "@polkadot/util": "*" - checksum: 3da945c7980e89571ef04adced12edb048bccae0ea787cbe7205db37bdbbc65cd2a458b1f9fa244d309e29e222860761d43af06985b0f68538aa8687f1c1e49c + checksum: 9b8a2d3adb9d53294f07ef69ae6478287d48423a222198deded8f7c0edcef2557073c826badf0ce9653319dbc74d0b469d9a74cb717e088473ca4a6f94fba84e languageName: node linkType: hard -"@polkadot/extension-dapp@npm:^0.42.5-11": - version: 0.42.5-11 - resolution: "@polkadot/extension-dapp@npm:0.42.5-11" +"@polkadot/extension-dapp@npm:^0.42.5-16": + version: 0.42.5-16 + resolution: "@polkadot/extension-dapp@npm:0.42.5-16" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/extension-inject": ^0.42.5-11 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/extension-inject": ^0.42.5-16 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 peerDependencies: "@polkadot/api": "*" "@polkadot/util": "*" "@polkadot/util-crypto": "*" - checksum: b627de4a9ace2b99d589b908dafc4a00f339098f89ba432b1f230bf14b70b7f9900060f4461c461054055ef4fe01ff074614b0877028936fca4fe28ec6dc5a3f + checksum: e0f90ca0f73f5a4c8b2f266ff0e7ab3db1e8cf0769885689807177d7bcdc3c13e0e4c55721c14b62eb2fed9589dda4fe0218b19a9b6cf0614115523686714e98 languageName: node linkType: hard -"@polkadot/extension-inject@npm:^0.42.5-11": - version: 0.42.5-11 - resolution: "@polkadot/extension-inject@npm:0.42.5-11" +"@polkadot/extension-inject@npm:^0.42.5-16": + version: 0.42.5-16 + resolution: "@polkadot/extension-inject@npm:0.42.5-16" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/rpc-provider": ^7.1.2-1 - "@polkadot/types": ^7.1.2-1 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/rpc-provider": ^7.2.2-7 + "@polkadot/types": ^7.2.2-7 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 + "@polkadot/x-global": ^8.2.3-29 peerDependencies: "@polkadot/api": "*" - checksum: 10b954b7280613826aafcaacf22817400dd73c248c2799a4c3ca25edb8ee9fe4332095d064dce82a312fcc0cf61b5e024b32f2710c82d343b8888a8518fcf55b + checksum: ab35e224e6d92c755447784a885a3aff4898c11fe9e13081291b649a24b5e01c0c59441045d80dcc9d582ef5bb6a0709a414b4d55ba209e3a6fd3c0c31e43188 languageName: node linkType: hard -"@polkadot/hw-ledger-transports@npm:8.2.2": - version: 8.2.2 - resolution: "@polkadot/hw-ledger-transports@npm:8.2.2" +"@polkadot/hw-ledger-transports@npm:8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/hw-ledger-transports@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 + "@babel/runtime": ^7.16.7 "@ledgerhq/hw-transport": ^6.20.0 "@ledgerhq/hw-transport-node-hid-singleton": ^6.20.0 "@ledgerhq/hw-transport-webhid": ^6.20.0 "@ledgerhq/hw-transport-webusb": ^6.20.0 + "@polkadot/util": 8.2.3-29 dependenciesMeta: "@ledgerhq/hw-transport-node-hid-singleton": optional: true - checksum: b17cb00b119bb00650900a4759219ddeaf122ab413ad7bcca6d2e4a68e14e34b226541b860a7f97e16e44bd3ce8ebe8dd7d8ae8271aa8b7315287bf9e5595fa4 + checksum: dfd2aa277664ecba7aaa4ec4f48e23200740afc354b8e6d38dcdafef3be6146794b94dff194b295796045cb4e859714c24022dc19c0bd6c7c9a56b2f3782436f languageName: node linkType: hard -"@polkadot/hw-ledger@npm:^8.2.2": - version: 8.2.2 - resolution: "@polkadot/hw-ledger@npm:8.2.2" +"@polkadot/hw-ledger@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/hw-ledger@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/hw-ledger-transports": 8.2.2 - "@polkadot/util": 8.2.2 - "@zondax/ledger-substrate": ^0.23.0 - checksum: fdd704aeed2c85851cbc17720ce9f184845b284ad4889e2ba5e3adc20688cec327066ea52eca70eaf2430f43fee9cbf6cdcdc300275232516ee6648ecee25408 + "@babel/runtime": ^7.16.7 + "@ledgerhq/hw-transport": ^6.20.0 + "@polkadot/hw-ledger-transports": 8.2.3-29 + "@polkadot/util": 8.2.3-29 + "@zondax/ledger-substrate": ^0.24.0 + checksum: 5d23b22efe0e176b9d7f0ce67de11511795894460decb212732246a4135a3e42d042a7584f1493590f7e290857f61f0237e8428811292c9374d5889facb7ecf0 languageName: node linkType: hard -"@polkadot/keyring@npm:^8.2.2": - version: 8.2.2 - resolution: "@polkadot/keyring@npm:8.2.2" +"@polkadot/keyring@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/keyring@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/util": 8.2.2 - "@polkadot/util-crypto": 8.2.2 + "@babel/runtime": ^7.16.7 + "@polkadot/util": 8.2.3-29 + "@polkadot/util-crypto": 8.2.3-29 peerDependencies: - "@polkadot/util": 8.2.2 - "@polkadot/util-crypto": 8.2.2 - checksum: 9ed75d2dbe69adac418c3f4f26932eea381c3a90ff7b55b42a0b73ad2525ae628f5673eb95cbf784aeafcbdbd10c650ee301740391a4cb63b8d5616a479489c8 + "@polkadot/util": 8.2.3-29 + "@polkadot/util-crypto": 8.2.3-29 + checksum: b3a949ee257cf2830892168e665e486e0a18c47fbcc1e7edb2b8559cde058cdfd578f7bb970bb33f3cd95238fec2d2abd10f9ff3bfc0cca8eacad2c0b16dccd9 languageName: node linkType: hard -"@polkadot/networks@npm:^8.2.2": - version: 8.2.2 - resolution: "@polkadot/networks@npm:8.2.2" +"@polkadot/networks@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/networks@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - checksum: 0aa898b80d5effa4099bea93ae5de5ed9abbe87f38b1d0d36a6c55470ea3bd0e84c1941a51fd2960f8063aa3e03ef242d26576eeaa5ab8368d9f9f912bb41dd1 + "@babel/runtime": ^7.16.7 + "@polkadot/util": 8.2.3-29 + checksum: ee25b961dd30255e7325543fb7a26c622647fa2746448d94f03af2691394835179a92e4a6c4b089188624da75715c08e47cdebb6890100762231a653f3e3d462 languageName: node linkType: hard -"@polkadot/phishing@npm:^0.7.11": - version: 0.7.11 - resolution: "@polkadot/phishing@npm:0.7.11" +"@polkadot/phishing@npm:^0.7.30": + version: 0.7.30 + resolution: "@polkadot/phishing@npm:0.7.30" dependencies: "@babel/runtime": ^7.16.7 "@polkadot/util": ^8.2.2 "@polkadot/util-crypto": ^8.2.2 "@polkadot/x-fetch": ^8.2.2 - checksum: 31fde5b988ebe48161b82811f40d9eb7a22eb954fdf9f6385914d9fe98e81ea4ea64c330b51ad100486dc7254d7b1f3e538d27b2cc9f703eb70f74cff09c10f8 + checksum: aa70cf1c49f5a8a7e54c79716d570ee73ef1b1b71509feed66aa5afb1bee72f97c87edc1173dccade31c3fc364b67cb02e689d10e218dfe44f813f543e30c431 languageName: node linkType: hard @@ -3199,9 +3203,9 @@ __metadata: resolution: "@polkadot/react-api@workspace:packages/react-api" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/api": ^7.2.1 - "@polkadot/extension-compat-metamask": ^0.42.5-11 - "@polkadot/extension-dapp": ^0.42.5-11 + "@polkadot/api": ^7.2.2-8 + "@polkadot/extension-compat-metamask": ^0.42.5-16 + "@polkadot/extension-dapp": ^0.42.5-16 "@substrate/connect": 0.4.6 fflate: ^0.7.2 rxjs: ^7.5.1 @@ -3216,15 +3220,15 @@ __metadata: "@fortawesome/fontawesome-svg-core": ^1.2.36 "@fortawesome/free-solid-svg-icons": ^5.15.4 "@fortawesome/react-fontawesome": ^0.1.16 - "@polkadot/keyring": ^8.2.2 + "@polkadot/keyring": ^8.2.3-29 "@polkadot/react-api": ^0.100.2-32 - "@polkadot/react-identicon": ^0.88.2-0 - "@polkadot/react-qr": ^0.88.2-0 + "@polkadot/react-identicon": ^0.88.2-4 + "@polkadot/react-qr": ^0.88.2-4 "@polkadot/react-query": ^0.100.2-32 - "@polkadot/ui-keyring": ^0.88.2-0 - "@polkadot/ui-settings": ^0.88.2-0 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/ui-keyring": ^0.88.2-4 + "@polkadot/ui-settings": ^0.88.2-4 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 "@types/codeflask": ^1.4.3 "@types/owasp-password-strength-test": ^1.3.0 chart.js: ^2.9.4 @@ -3259,16 +3263,16 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-identicon@npm:^0.88.2-0": - version: 0.88.2-0 - resolution: "@polkadot/react-identicon@npm:0.88.2-0" +"@polkadot/react-identicon@npm:^0.88.2-4": + version: 0.88.2-4 + resolution: "@polkadot/react-identicon@npm:0.88.2-4" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/keyring": ^8.2.2 - "@polkadot/ui-settings": 0.88.2-0 - "@polkadot/ui-shared": 0.88.2-0 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/keyring": ^8.2.3-29 + "@polkadot/ui-settings": 0.88.2-4 + "@polkadot/ui-shared": 0.88.2-4 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 color: ^3.2.1 ethereum-blockies-base64: ^1.0.2 jdenticon: 3.1.1 @@ -3282,7 +3286,7 @@ __metadata: react-dom: "*" react-is: "*" styled-components: "*" - checksum: ccd30618eff83bc2f7a2f9bda14da6eb1bb4ceb96674a61ce33b069880d214a6ca255734a966f21458b0ff388a205b6d46fc50d4b21ae1416548f29c407cce53 + checksum: eacb824f64529e0561dcd5fb4dda1a5aa9edc76408e1faa0b97266e413c92f48dd89c957a2bb397e87a42a9a7bff6ecdbf85bac463d2c75c600bd33f789968ae languageName: node linkType: hard @@ -3295,14 +3299,14 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/react-qr@npm:^0.88.2-0": - version: 0.88.2-0 - resolution: "@polkadot/react-qr@npm:0.88.2-0" +"@polkadot/react-qr@npm:^0.88.2-4": + version: 0.88.2-4 + resolution: "@polkadot/react-qr@npm:0.88.2-4" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/ui-settings": 0.88.2-0 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/ui-settings": 0.88.2-4 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 qrcode-generator: ^1.4.4 react-qr-reader: ^2.2.1 styled-components: ^5.3.3 @@ -3312,7 +3316,7 @@ __metadata: react: "*" react-dom: "*" styled-components: "*" - checksum: 406ed0147d10d589dcd7c125d31bbf99bdedc5e623412ce072c3ba5766fb80f7499e60f99418f08b1b154842b82b27e42ac0efd9ae0089ec524673c4f965503f + checksum: 8e9ac6566c8b4d62d3beab1b6568b5c4d543fd6a2723d5bce28e410cfbe205b7f96b2d8b99666b73bc4e95bb4717fb81e3cef058850d35ecd2fe2820bd7edba3 languageName: node linkType: hard @@ -3333,50 +3337,50 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/rpc-augment@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/rpc-augment@npm:7.2.1" +"@polkadot/rpc-augment@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/rpc-augment@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/rpc-core": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/util": ^8.2.2 - checksum: 397ea807b6837439f1322ec10dcf07dc4495f4b1454710c3d3f217c703c41bfcbf6d0c550ec417053079ebb1901208f7a75af2e0347e86ac5dd0055636233c2c + "@polkadot/rpc-core": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + checksum: 04e9ec34d597dc9b4a92992e174138d7c0d1f2a4a906f3dc508c4ca7fe95ed74680ab4e6cd8117b19c209bdb0909b9c46173f045e02e1f061ccf9a365a8324c3 languageName: node linkType: hard -"@polkadot/rpc-core@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/rpc-core@npm:7.2.1" +"@polkadot/rpc-core@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/rpc-core@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/rpc-augment": 7.2.1 - "@polkadot/rpc-provider": 7.2.1 - "@polkadot/types": 7.2.1 - "@polkadot/util": ^8.2.2 + "@polkadot/rpc-augment": 7.2.2-8 + "@polkadot/rpc-provider": 7.2.2-8 + "@polkadot/types": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 rxjs: ^7.5.1 - checksum: 4faa3e2c1668d5bfbbcd7743a820d366d52067bf72063edf9525ef02a16f2ae6ecf280e8051b41821a5196aad05ebfb4fc56b27d6b2ed5209384d0ab520078e3 + checksum: c3c47afe9bbc0e7a406ad3d7c7fe90f3b992641d1b2c985e4468fd6979d39eac50ee2d95b7cb847408afe665d5472e77b6589cc5267caf48fcabb118852ff3dc languageName: node linkType: hard -"@polkadot/rpc-provider@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/rpc-provider@npm:7.2.1" +"@polkadot/rpc-provider@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/rpc-provider@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/keyring": ^8.2.2 - "@polkadot/types": 7.2.1 - "@polkadot/types-support": 7.2.1 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 - "@polkadot/x-fetch": ^8.2.2 - "@polkadot/x-global": ^8.2.2 - "@polkadot/x-ws": ^8.2.2 + "@polkadot/keyring": ^8.2.3-29 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-support": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 + "@polkadot/x-fetch": ^8.2.3-29 + "@polkadot/x-global": ^8.2.3-29 + "@polkadot/x-ws": ^8.2.3-29 eventemitter3: ^4.0.7 mock-socket: ^9.0.8 nock: ^13.2.1 - checksum: b3ee2174ad7d576d1bfac1d768f75ed7a6272b2f212d60c905d36ba51bcc2f67f42b16dd4090b3f7eb9cbd11a4ad0215a83edb9a6241fd1a10204e26e66c5dc7 + checksum: 5e12e0cdbcbe3d4a1c86d77cc29f7dbdefb6bdeafbc8fa8e1e0ee8b006d329ea5595cea41f7997809eb2c3d85e3e3915ffc5f57078ec68dbc9ebb82bc7a03aa7 languageName: node linkType: hard @@ -3384,7 +3388,7 @@ __metadata: version: 0.0.0-use.local resolution: "@polkadot/test-support@workspace:packages/test-support" dependencies: - "@polkadot/types-support": ^7.2.1 + "@polkadot/types-support": ^7.2.2-8 "@testing-library/jest-dom": ^5.16.1 "@testing-library/react": ^12.1.2 testcontainers: ^8.1.2 @@ -3392,89 +3396,89 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/types-augment@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/types-augment@npm:7.2.1" +"@polkadot/types-augment@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/types-augment@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/types": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/util": ^8.2.2 - checksum: fea27b8b52f2b5f729f9b98fcf22cdf79925686461a9466b2924ae0029767805c56d52ebb74c54913625912f088d1fa18c9991cf7951a94c692b231229b2c056 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + checksum: 979d90ec27363b81a6773af0b8e2388d133075d2695b32b9dcc94561cdd944bfebf66ade6846f0ed2229fc7e65500adba90dbd11e9f4ae7687f927d4ad0da5b1 languageName: node linkType: hard -"@polkadot/types-codec@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/types-codec@npm:7.2.1" +"@polkadot/types-codec@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/types-codec@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/util": ^8.2.2 - checksum: 25cdb8a47ccd4d1831d57910c9226dc2af379643e8110f8cdeaa652b825fdcadaad403aad451322f47296a840584e9097097307922a3d4d6f3c881c9a0eaa528 + "@polkadot/util": ^8.2.3-29 + checksum: 51d2fd18256e84c9a384d299cdeea81774aae52015854ef9e3ac4dbe84d30a4b0f32574043c61bbcca20ca8360e9d6e2b7853837d40b5562557f57db9258aab9 languageName: node linkType: hard -"@polkadot/types-create@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/types-create@npm:7.2.1" +"@polkadot/types-create@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/types-create@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/types-codec": 7.2.1 - "@polkadot/util": ^8.2.2 - checksum: ae8d64b845c23a674112fce13e10e0bc512c3a2770eebbc54706bd75d031f19405abc04e8b9fa613ad9b2dcc5e3834b17e3fdd82ac7723d3269f009593a2b0f9 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + checksum: c0665e51b7b22deea008d8dc7b93f04a78b544f4d8102e4f3356a9e65812fc8abaadeed6c483e2660c9f1d8e73314e5b9c41943541a74adcfd592550479afd50 languageName: node linkType: hard -"@polkadot/types-known@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/types-known@npm:7.2.1" +"@polkadot/types-known@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/types-known@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/networks": ^8.2.2 - "@polkadot/types": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/types-create": 7.2.1 - "@polkadot/util": ^8.2.2 - checksum: f3c908e1933e153218649a0e3ba58eb203b57ecd6c36e7cefa06dfabc4191a4ce8ef0a7e3ce56262449220091d8ee73d0e5ee226c22e30da62edb5d0af9b953c + "@polkadot/networks": ^8.2.3-29 + "@polkadot/types": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/types-create": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + checksum: e62f4e2a296b1bd12c39c2e848f4dc22c736c12693ad85996cce781671341e8f9abc0974ea0423ad1fd1fc02d9ce58ee96fc32385877be8fb7bca7f37c4adcda languageName: node linkType: hard -"@polkadot/types-support@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/types-support@npm:7.2.1" +"@polkadot/types-support@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/types-support@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/util": ^8.2.2 - checksum: 66920d3c77680a4391aa885d28d1ec6c24a9442b66714b8361b21e09c9a81c9dfa8b1637e16e7135c5cefb6ddd4b2ad003c9c6ca35a76ae40c75bd630d0d65ba + "@polkadot/util": ^8.2.3-29 + checksum: 25f183317979ef28cf0e59cb9018c4ca9765337b447e22371edfc78ddeb5bac1dcda081f5666eac9d83f8bae4815d0f4ab520287c9e4c846911b0053414e74ed languageName: node linkType: hard -"@polkadot/types@npm:^7.2.1": - version: 7.2.1 - resolution: "@polkadot/types@npm:7.2.1" +"@polkadot/types@npm:^7.2.2-8": + version: 7.2.2-8 + resolution: "@polkadot/types@npm:7.2.2-8" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/keyring": ^8.2.2 - "@polkadot/types-augment": 7.2.1 - "@polkadot/types-codec": 7.2.1 - "@polkadot/types-create": 7.2.1 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/keyring": ^8.2.3-29 + "@polkadot/types-augment": 7.2.2-8 + "@polkadot/types-codec": 7.2.2-8 + "@polkadot/types-create": 7.2.2-8 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 rxjs: ^7.5.1 - checksum: f736cbef11c39bbc6669e8503a22e7ec5082ed5a4baf04ecd774fbf9cc32a7125236c0662e82691501b30d01cbdecd3376f468532e15dd43d46fa4861707de6f + checksum: c06045020c0055bd1284e13c87e5a1e75ca03b68adc790210c5cb3d87a55a6b98775a23463ca06c355313dde7b64033939e3cfc5a21773e0453892f55a3abbb6 languageName: node linkType: hard -"@polkadot/ui-keyring@npm:^0.88.2-0": - version: 0.88.2-0 - resolution: "@polkadot/ui-keyring@npm:0.88.2-0" +"@polkadot/ui-keyring@npm:^0.88.2-4": + version: 0.88.2-4 + resolution: "@polkadot/ui-keyring@npm:0.88.2-4" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/hw-ledger": ^8.2.2 - "@polkadot/keyring": ^8.2.2 - "@polkadot/ui-settings": 0.88.2-0 - "@polkadot/util": ^8.2.2 - "@polkadot/util-crypto": ^8.2.2 + "@polkadot/hw-ledger": ^8.2.3-29 + "@polkadot/keyring": ^8.2.3-29 + "@polkadot/ui-settings": 0.88.2-4 + "@polkadot/util": ^8.2.3-29 + "@polkadot/util-crypto": ^8.2.3-29 mkdirp: ^1.0.4 rxjs: ^7.5.1 store: ^2.0.12 @@ -3482,79 +3486,79 @@ __metadata: "@polkadot/keyring": "*" "@polkadot/ui-settings": "*" "@polkadot/util": "*" - checksum: 7632b988210f374e7ea028faa409a63231b036af6291c5d1b1501d49156735f2c811c8a6c25aa6f829c1dc7c7cf630c51a694000d289c4fec59daa0f300645d6 + checksum: b8be37f28c3b6c36e0265480242c6b698efaa42eaffb1073987e18947f5b2976dfd31049830fc5be55c8056e4aeb5faae52d2c5d07346a6dc4220fc36ed6d5f2 languageName: node linkType: hard -"@polkadot/ui-settings@npm:0.88.2-0, @polkadot/ui-settings@npm:^0.88.2-0": - version: 0.88.2-0 - resolution: "@polkadot/ui-settings@npm:0.88.2-0" +"@polkadot/ui-settings@npm:0.88.2-4, @polkadot/ui-settings@npm:^0.88.2-4": + version: 0.88.2-4 + resolution: "@polkadot/ui-settings@npm:0.88.2-4" dependencies: "@babel/runtime": ^7.16.7 - "@polkadot/networks": ^8.2.2 - "@polkadot/util": ^8.2.2 + "@polkadot/networks": ^8.2.3-29 + "@polkadot/util": ^8.2.3-29 eventemitter3: ^4.0.7 store: ^2.0.12 peerDependencies: "@polkadot/networks": "*" "@polkadot/util": "*" - checksum: 61aa5e782e16807f5fdbbb56baf5885ba29d7e2a2ff5e4850aa969ab80245b6b00d4ee0e7263b602bb4ab8ba699d5eebdb6dcc0f136e3ec57914ce89538126e7 + checksum: 6d9076740b8478c032237b091ea02d10cc9175b2e1629770cf9f0a3a3facfa2410e96f4f920c5e36959589724effb7d07f1c0e94183e41f0346f8d3aa0dd92f8 languageName: node linkType: hard -"@polkadot/ui-shared@npm:0.88.2-0": - version: 0.88.2-0 - resolution: "@polkadot/ui-shared@npm:0.88.2-0" +"@polkadot/ui-shared@npm:0.88.2-4": + version: 0.88.2-4 + resolution: "@polkadot/ui-shared@npm:0.88.2-4" dependencies: "@babel/runtime": ^7.16.7 color: ^3.2.1 peerDependencies: "@polkadot/util": "*" "@polkadot/util-crypto": "*" - checksum: d9cbe819f5d4b038aa14529ce037f591fc44db233086fa3a9fc807163e33fdfcf474bc8bb19b5393c9c3b0313453fcb39f35d500d08aa8c042c93f909a9b2012 + checksum: b110844ddf6f70f252a928d618f0bbd2dba74096d9ebab321ceae09db63a88cd73a1c1dd2758f2fa5d4eb68be7e290d457a1822945091bb90604de89199783f1 languageName: node linkType: hard -"@polkadot/util-crypto@npm:^8.2.2": - version: 8.2.2 - resolution: "@polkadot/util-crypto@npm:8.2.2" +"@polkadot/util-crypto@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/util-crypto@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@noble/hashes": ^0.4.5 - "@noble/secp256k1": ^1.3.4 - "@polkadot/networks": 8.2.2 - "@polkadot/util": 8.2.2 + "@babel/runtime": ^7.16.7 + "@noble/hashes": 0.5.9 + "@noble/secp256k1": 1.3.4 + "@polkadot/networks": 8.2.3-29 + "@polkadot/util": 8.2.3-29 "@polkadot/wasm-crypto": ^4.5.1 - "@polkadot/x-bigint": 8.2.2 - "@polkadot/x-randomvalues": 8.2.2 + "@polkadot/x-bigint": 8.2.3-29 + "@polkadot/x-randomvalues": 8.2.3-29 ed2curve: ^0.3.0 - micro-base: ^0.10.0 + micro-base: ^0.10.2 tweetnacl: ^1.0.3 peerDependencies: - "@polkadot/util": 8.2.2 - checksum: 04b358937570498428cd78f642cf0d8f25e44315dbfb54cfaf2de10806252f20aa8df2eda1d139d58e2efd5b1fb4d5bdc5d5756b1d25017b98fe03d2beeefbc6 + "@polkadot/util": 8.2.3-29 + checksum: e16bc3dd800190eff1a34ef7a637f2fa8340a4a027c6d84332092bbc07f9eee38503fde66a07b0b37b45789163474619dfb01bc4d32a55c54d026f8633613f71 languageName: node linkType: hard -"@polkadot/util@npm:^8.2.2": - version: 8.2.2 - resolution: "@polkadot/util@npm:8.2.2" +"@polkadot/util@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/util@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/x-bigint": 8.2.2 - "@polkadot/x-global": 8.2.2 - "@polkadot/x-textdecoder": 8.2.2 - "@polkadot/x-textencoder": 8.2.2 + "@babel/runtime": ^7.16.7 + "@polkadot/x-bigint": 8.2.3-29 + "@polkadot/x-global": 8.2.3-29 + "@polkadot/x-textdecoder": 8.2.3-29 + "@polkadot/x-textencoder": 8.2.3-29 "@types/bn.js": ^4.11.6 bn.js: ^4.12.0 ip-regex: ^4.3.0 - checksum: c8eb0e6278557735e9785a1a81fed14c05c65a790238470763537f27fb601cbf350a8362ecc36469de08d9d61485ab7409da35fcf5acffb0c6cc88fe0ba929bf + checksum: ad3ccdef21b901435ea761305504c1a136c9cb00b9c6c051fa51db4c9e64670deaa4c2c4811bb9e6ee450e636271bfbd1ee75f7d5105298d8649231557c8f131 languageName: node linkType: hard -"@polkadot/vanitygen@npm:^0.48.10": - version: 0.48.10 - resolution: "@polkadot/vanitygen@npm:0.48.10" +"@polkadot/vanitygen@npm:^0.48.11-2": + version: 0.48.11-2 + resolution: "@polkadot/vanitygen@npm:0.48.11-2" dependencies: "@babel/core": ^7.16.7 "@babel/register": ^7.16.7 @@ -3564,7 +3568,7 @@ __metadata: yargs: ^17.3.1 bin: polkadot-js-vanitygen: index.cjs - checksum: 471bf406b33d77b3131c28766a8477a326404f13f58c864634bfd80b43c85a86e66eca23e0f383473a3f16d51d487aa87b46099e6df83edcba8377aa5e86c9cc + checksum: a183e2bed6cd524207f0821b6bef5d33cfbb363772be7050638bd1b7ff15a21bcec824febe24c1936f2ab611558389364ff52b193914ad815eaaa23bfa47a74f languageName: node linkType: hard @@ -3600,13 +3604,13 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-bigint@npm:8.2.2": - version: 8.2.2 - resolution: "@polkadot/x-bigint@npm:8.2.2" +"@polkadot/x-bigint@npm:8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-bigint@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/x-global": 8.2.2 - checksum: 1fd0d05848d65e6d171be0974a23c552ac14c898798ab7474d473843d4fad79cf3dc77df42673a69220904f51261c256d559d4b515fbfd8edaf8371df6b5644c + "@babel/runtime": ^7.16.7 + "@polkadot/x-global": 8.2.3-29 + checksum: deb492c22595af2164a2ef02f711e882c490fa94c6e961425cdb1042f18ec222d1d6bcd4de02f07a553a4d59118409addabf797065d3426b6f65492f10956e90 languageName: node linkType: hard @@ -3622,7 +3626,19 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-global@npm:8.2.2, @polkadot/x-global@npm:^8.2.2": +"@polkadot/x-fetch@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-fetch@npm:8.2.3-29" + dependencies: + "@babel/runtime": ^7.16.7 + "@polkadot/x-global": 8.2.3-29 + "@types/node-fetch": ^2.5.12 + node-fetch: ^2.6.6 + checksum: 2a1a1f781e5761f39dc9c15223eab694ed7c24e3cfaef43f5056fc4302a2dd992ccbf7ca2edc354df30ee48c8cafa196feb23026ca9299fb5c87186aa96197bb + languageName: node + linkType: hard + +"@polkadot/x-global@npm:8.2.2": version: 8.2.2 resolution: "@polkadot/x-global@npm:8.2.2" dependencies: @@ -3631,45 +3647,54 @@ __metadata: languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:8.2.2": - version: 8.2.2 - resolution: "@polkadot/x-randomvalues@npm:8.2.2" +"@polkadot/x-global@npm:8.2.3-29, @polkadot/x-global@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-global@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/x-global": 8.2.2 - checksum: 18817fe2374b3e0e2bebd2df98d68720df037cbc29363d2e4701f1e894c52ddaabd41d16022cef532860b0ccbb5e6d51f6245b47f5aafc4d0eeb7285736b0309 + "@babel/runtime": ^7.16.7 + checksum: ec0dd030bd8f5c2b72e3a5b7dfd725fd02db7158005f7925128f04bc449e268cf6fc18d9c81f4465b243ee142e5aa2b410fd08fe63a733de360f56e087b5061f languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:8.2.2": - version: 8.2.2 - resolution: "@polkadot/x-textdecoder@npm:8.2.2" +"@polkadot/x-randomvalues@npm:8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-randomvalues@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/x-global": 8.2.2 - checksum: 3e6ba49e71f927c1dacb352ca7d8cb4cc570a95ce51e1c6b9e4e390d454d795a8887d556a44df29359c14193ef0a1424564099acd2fd1ca2ff3561f1729940e3 + "@babel/runtime": ^7.16.7 + "@polkadot/x-global": 8.2.3-29 + checksum: 9d26c7e3e2cdf2372a9ee5853266a50d282b8db547a477b365fbb46ce373d8f44ff50d8c9c1e8b7a2213bff84b0aec2bc33ac6b9bbdff39ae32beffd7976c31f languageName: node linkType: hard -"@polkadot/x-textencoder@npm:8.2.2": - version: 8.2.2 - resolution: "@polkadot/x-textencoder@npm:8.2.2" +"@polkadot/x-textdecoder@npm:8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-textdecoder@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/x-global": 8.2.2 - checksum: 260cfbe56490ffd1966e30e02243b95217085598dddcf2e05bae48ef42621a3bb76ec2d31acde451693889f308b3c8a7a8fd8f7f16a7f16f724dc51d7aeee3c8 + "@babel/runtime": ^7.16.7 + "@polkadot/x-global": 8.2.3-29 + checksum: 42c135e8164e494d50652774fb685a2af1ff1d0baaa9d91726c5368f47c5624e4afadf7bf0190bbcedf702593f0fa4fa4c20944356c7234850fc54a7677e3254 languageName: node linkType: hard -"@polkadot/x-ws@npm:^8.2.2": - version: 8.2.2 - resolution: "@polkadot/x-ws@npm:8.2.2" +"@polkadot/x-textencoder@npm:8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-textencoder@npm:8.2.3-29" dependencies: - "@babel/runtime": ^7.16.5 - "@polkadot/x-global": 8.2.2 + "@babel/runtime": ^7.16.7 + "@polkadot/x-global": 8.2.3-29 + checksum: 820ee3f295873e25897693baaca1d82d11b3f4dc80b0175aa319ba0eb768acfd2e0d2eab7931fb1e54df56d89df84cbed89d545698e8e657f5ee28eeab710a80 + languageName: node + linkType: hard + +"@polkadot/x-ws@npm:^8.2.3-29": + version: 8.2.3-29 + resolution: "@polkadot/x-ws@npm:8.2.3-29" + dependencies: + "@babel/runtime": ^7.16.7 + "@polkadot/x-global": 8.2.3-29 "@types/websocket": ^1.0.4 websocket: ^1.0.34 - checksum: 0f9afac4a8c84b7b1282ad761a168bec2e450c5a39b61de1ee6c745e31ea6c1225f8e60d7c5404c4b6c09a51a68be16c51ed9939138442ff7a0dccd89af8f518 + checksum: ee92642c0bd4edf12a986e2ee4bdbff7571372c9159456913d2afc892d68bc986870ecd89550e25bfdb47b5bb720d81fa2d6727b6a3a3ef0f4c77e4ee584c753 languageName: node linkType: hard @@ -3732,9 +3757,9 @@ __metadata: languageName: node linkType: hard -"@rollup/plugin-node-resolve@npm:^13.1.2": - version: 13.1.2 - resolution: "@rollup/plugin-node-resolve@npm:13.1.2" +"@rollup/plugin-node-resolve@npm:^13.1.3": + version: 13.1.3 + resolution: "@rollup/plugin-node-resolve@npm:13.1.3" dependencies: "@rollup/pluginutils": ^3.1.0 "@types/resolve": 1.17.1 @@ -3744,7 +3769,7 @@ __metadata: resolve: ^1.19.0 peerDependencies: rollup: ^2.42.0 - checksum: b75cd8f8110a3001fa6af76fb0feb0ebfe96d6394383147276106f11d296307719aec58364b92f402723749b74e6de82d002570d3accfaede572ad3b1d8534ba + checksum: c275843aef884ff15ed7edb8a3b8fd072a72d517632098f6e9c25ef2c00f7842559565cc77e16c59eb119b8c4e2d858a8b5a94701ca6f85ae6a4f60a6e31f0ab languageName: node linkType: hard @@ -5255,9 +5280,9 @@ __metadata: languageName: node linkType: hard -"@zondax/ledger-substrate@npm:^0.23.0": - version: 0.23.0 - resolution: "@zondax/ledger-substrate@npm:0.23.0" +"@zondax/ledger-substrate@npm:^0.24.0": + version: 0.24.0 + resolution: "@zondax/ledger-substrate@npm:0.24.0" dependencies: "@babel/runtime": ^7.14.8 "@ledgerhq/hw-transport": ^6.2.0 @@ -5267,7 +5292,7 @@ __metadata: blakejs: ^1.1.1 bs58: ^4.0.1 hash.js: ^1.1.7 - checksum: 1a8b2bbf8642d8820b62076a6ea09277461b15e2ee0f56396c7f52f1f2023cbae2dc5c9b972be42e55a742d9bab02b2ea45ceda066e21ef36c814844c7c554cb + checksum: 9eba1cb55a14204dab7ae444d43c6bf19f8c7aad6b1af24437cfa33d13b70ba58c6d4d5e425daaa4bff2268603ca988f4d21975949b748572889ccb5baf60ecc languageName: node linkType: hard @@ -12826,18 +12851,18 @@ __metadata: languageName: node linkType: hard -"jest-cli@npm:^27.4.6": - version: 27.4.6 - resolution: "jest-cli@npm:27.4.6" +"jest-cli@npm:^27.4.7": + version: 27.4.7 + resolution: "jest-cli@npm:27.4.7" dependencies: - "@jest/core": ^27.4.6 + "@jest/core": ^27.4.7 "@jest/test-result": ^27.4.6 "@jest/types": ^27.4.2 chalk: ^4.0.0 exit: ^0.1.2 graceful-fs: ^4.2.4 import-local: ^3.0.2 - jest-config: ^27.4.6 + jest-config: ^27.4.7 jest-util: ^27.4.2 jest-validate: ^27.4.6 prompts: ^2.0.1 @@ -12849,14 +12874,15 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 924dd24b74f33f79fa8cbc577d4c13aa8645b41d53c4678b6f999dd02d7fe027c397db1898e4b4cda08001efb65dd29ed4492e2818d149098092df8314ed441b + checksum: bf301039f1c14ef3fa2b7699b7b94328faa5549e34cb1573610c894bedd036ad36e31e6af436e11b3aa85e22e409a05d1fef1624bebc2da7ed416ce969b87307 languageName: node linkType: hard -"jest-config@npm:^27.4.6": - version: 27.4.6 - resolution: "jest-config@npm:27.4.6" +"jest-config@npm:^27.4.7": + version: 27.4.7 + resolution: "jest-config@npm:27.4.7" dependencies: + "@babel/core": ^7.8.0 "@jest/test-sequencer": ^27.4.6 "@jest/types": ^27.4.2 babel-jest: ^27.4.6 @@ -12883,7 +12909,7 @@ __metadata: peerDependenciesMeta: ts-node: optional: true - checksum: 90dafbf8bcc01ffab0bc085bd8ca5f9866f6c7a13202c3031ab6a668ed4a9a21e9eb4537ea0cb575765dc3099e70f2f9089bb25a4627b05d2bde50f06bddcc33 + checksum: 23d5bacc483b2674d6efcd6bfc66bcde7c2b428511b50d17a22a2750d85bfc23753f9e41f504411e411e848e34ec61244bdae9da8782df4ada6e284106f71a4d languageName: node linkType: hard @@ -13257,13 +13283,13 @@ __metadata: languageName: node linkType: hard -"jest@npm:^27.4.6": - version: 27.4.6 - resolution: "jest@npm:27.4.6" +"jest@npm:^27.4.7": + version: 27.4.7 + resolution: "jest@npm:27.4.7" dependencies: - "@jest/core": ^27.4.6 + "@jest/core": ^27.4.7 import-local: ^3.0.2 - jest-cli: ^27.4.6 + jest-cli: ^27.4.7 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -13271,7 +13297,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 5b7bf3d1017f96110c6197e301f0e7bf1733ab300034e4f00ef0921e5fbf2e26e167454a7637bdac46df14385b1e1386cd2ad7d9aefe5793c60f775be2043534 + checksum: 28ce948b30c074907393f37553acac4422d0f60190776e62b3403e4c742d33dd6012e3a20748254a43e38b5b4ce52d813b13a3a5be1d43d6d12429bd08ce1a23 languageName: node linkType: hard @@ -14457,10 +14483,10 @@ __metadata: languageName: node linkType: hard -"micro-base@npm:^0.10.0": - version: 0.10.0 - resolution: "micro-base@npm:0.10.0" - checksum: b8892630e8fd9749f9695733a751233ade68f1fde469725d0bb52c0ac36d6ac94f51897a908adde4be4d0e3e65fc0d3ec2cf4c7b3ed6e386c7aab5eb662aa97f +"micro-base@npm:^0.10.2": + version: 0.10.2 + resolution: "micro-base@npm:0.10.2" + checksum: 4fcc9fb80cca021c5157e63d76188e3742a8f1ac5a90b1022a34cd715bf8ab19bbd82b71b908f0cf1cf6983d39533fe1aef4f24f2c0b09ec9d862fdaf5bf26ab languageName: node linkType: hard @@ -16066,7 +16092,7 @@ __metadata: "@babel/runtime": ^7.16.7 "@crustio/crust-pin": ^1.0.0 "@pinata/sdk": ^1.1.23 - "@polkadot/dev": ^0.65.14 + "@polkadot/dev": ^0.65.21 "@types/bn.js": ^4.11.6 "@types/chart.js": ^2.9.35 "@types/file-saver": ^2.0.4