Bump API & common (#6797)

* Bump API & common

* BN imports

* Root imports

* Bump
This commit is contained in:
Jaco 2022-01-07 16:37:36 +01:00 committed by GitHub
parent 2eea385777
commit 5174f5ffbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
216 changed files with 617 additions and 647 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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"

View File

@ -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",

View File

@ -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"
},

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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');

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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', () => {

View File

@ -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)));

View File

@ -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();

View File

@ -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';

View File

@ -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());

View File

@ -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';

View File

@ -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());

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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"
}
}

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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;

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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);

View File

@ -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';

View File

@ -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';

Some files were not shown because too many files have changed in this diff Show More