mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-23 15:25:50 +00:00
Rebrand: polkadot → pezkuwi build fixes
- Fixed TypeScript type assertion issues - Updated imports from api-augment/substrate to api-augment/bizinikiwi - Fixed imgConvert.mjs header and imports - Added @ts-expect-error for runtime-converted types - Fixed all @polkadot copyright headers to @pezkuwi
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { WsProvider } from '@polkadot/rpc-provider';
|
||||
import { ApiPromise } from '@pezkuwi/api';
|
||||
import { WsProvider } from '@pezkuwi/rpc-provider';
|
||||
|
||||
import { SUBSTRATE_PORT } from '../substrate/index.js';
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { ApiPromise, WsProvider } from '@polkadot/api';
|
||||
import { Metadata, TypeRegistry } from '@polkadot/types';
|
||||
import metaStatic from '@polkadot/types-support/metadata/static-substrate';
|
||||
import { ApiPromise, WsProvider } from '@pezkuwi/api';
|
||||
import { Metadata, TypeRegistry } from '@pezkuwi/types';
|
||||
import metaStatic from '@pezkuwi/types-support/metadata/static-substrate';
|
||||
|
||||
export function createAugmentedApi (): ApiPromise {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@polkadot/api-augment/substrate';
|
||||
import '@pezkuwi/api-augment/bizinikiwi';
|
||||
|
||||
export * from './createApi.js';
|
||||
export * from './createAugmentedApi.js';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types';
|
||||
import type { UseAccountInfo } from '@polkadot/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types';
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@pezkuwi/api-derive/types';
|
||||
import type { UseAccountInfo } from '@pezkuwi/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@pezkuwi/ui-keyring/types';
|
||||
import type { AccountOverrides, Override } from '../types.js';
|
||||
|
||||
export const anAccount = (): AccountOverrides => ({});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { TypeRegistry, u128 as U128 } from '@polkadot/types';
|
||||
import { TypeRegistry, u128 as U128 } from '@pezkuwi/types';
|
||||
|
||||
export function balanceOf (number: number | string): U128 {
|
||||
// FIXME - ref: https://github.com/polkadot-js/apps/pull/11051
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { BountyIndex } from '@polkadot/types/interfaces';
|
||||
import type { PalletBountiesBounty, PalletBountiesBountyStatus } from '@polkadot/types/lookup';
|
||||
import type { Registry } from '@polkadot/types/types';
|
||||
import type { ApiPromise } from '@pezkuwi/api';
|
||||
import type { BountyIndex } from '@pezkuwi/types/interfaces';
|
||||
import type { PezpalletBountiesBounty, PezpalletBountiesBountyStatus } from '@pezkuwi/types/lookup';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { balanceOf } from './balance.js';
|
||||
|
||||
@@ -20,27 +20,27 @@ export class BountyFactory {
|
||||
public aBountyIndex = (index = 0): BountyIndex =>
|
||||
this.#registry.createType('BountyIndex', index);
|
||||
|
||||
public defaultBounty = (): PalletBountiesBounty =>
|
||||
this.#registry.createType<PalletBountiesBounty>('Bounty');
|
||||
public defaultBounty = (): PezpalletBountiesBounty =>
|
||||
this.#registry.createType<PezpalletBountiesBounty>('Bounty');
|
||||
|
||||
public aBountyStatus = (status: string): PalletBountiesBountyStatus =>
|
||||
this.#registry.createType('PalletBountiesBountyStatus', status);
|
||||
public aBountyStatus = (status: string): PezpalletBountiesBountyStatus =>
|
||||
this.#registry.createType('PezpalletBountiesBountyStatus', status);
|
||||
|
||||
public bountyStatusWith = ({ curator = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', status = 'Active', updateDue = 100000 } = {}): PalletBountiesBountyStatus => {
|
||||
public bountyStatusWith = ({ curator = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY', status = 'Active', updateDue = 100000 } = {}): PezpalletBountiesBountyStatus => {
|
||||
if (status === 'Active') {
|
||||
return this.#registry.createType('PalletBountiesBountyStatus', { active: { curator, updateDue }, status });
|
||||
return this.#registry.createType('PezpalletBountiesBountyStatus', { active: { curator, updateDue }, status });
|
||||
}
|
||||
|
||||
if (status === 'CuratorProposed') {
|
||||
return this.#registry.createType('PalletBountiesBountyStatus', { curatorProposed: { curator }, status });
|
||||
return this.#registry.createType('PezpalletBountiesBountyStatus', { curatorProposed: { curator }, status });
|
||||
}
|
||||
|
||||
throw new Error('Unsupported status');
|
||||
};
|
||||
|
||||
public bountyWith = ({ status = 'Proposed', value = 1 } = {}): PalletBountiesBounty =>
|
||||
public bountyWith = ({ status = 'Proposed', value = 1 } = {}): PezpalletBountiesBounty =>
|
||||
this.aBounty({ status: this.aBountyStatus(status), value: balanceOf(value) });
|
||||
|
||||
public aBounty = ({ fee = balanceOf(10), status = this.aBountyStatus('Proposed'), value = balanceOf(500) }: Partial<PalletBountiesBounty> = {}): PalletBountiesBounty =>
|
||||
this.#registry.createType<PalletBountiesBounty>('Bounty', { fee, status, value });
|
||||
public aBounty = ({ fee = balanceOf(10), status = this.aBountyStatus('Proposed'), value = balanceOf(500) }: Partial<PezpalletBountiesBounty> = {}): PezpalletBountiesBounty =>
|
||||
this.#registry.createType<PezpalletBountiesBounty>('Bounty', { fee, status, value });
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types';
|
||||
import type { UseAccountInfo } from '@polkadot/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types';
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@pezkuwi/api-derive/types';
|
||||
import type { UseAccountInfo } from '@pezkuwi/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@pezkuwi/ui-keyring/types';
|
||||
import type { AccountOverrides as ContactOverrides, Override } from '../types.js';
|
||||
|
||||
export const aContact = (): ContactOverrides => ({});
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Hash } from '@polkadot/types/interfaces';
|
||||
import type { Hash } from '@pezkuwi/types/interfaces';
|
||||
|
||||
import { POLKADOT_GENESIS } from '@polkadot/apps-config';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { POLKADOT_GENESIS } from '@pezkuwi/apps-config';
|
||||
import { TypeRegistry } from '@pezkuwi/types/create';
|
||||
|
||||
export function aGenesisHash (): Hash {
|
||||
return new TypeRegistry().createType('Hash', POLKADOT_GENESIS);
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2025 @polkadot/app-bounties authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/app-bounties authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PalletStakingStakingLedger } from '@polkadot/types/lookup';
|
||||
import type { PezpalletStakingStakingLedger } from '@pezkuwi/types/lookup';
|
||||
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { BN } from '@polkadot/util';
|
||||
import { TypeRegistry } from '@pezkuwi/types/create';
|
||||
import { BN } from '@pezkuwi/util';
|
||||
|
||||
export function makeStakingLedger (active: BN | number | string): PalletStakingStakingLedger {
|
||||
export function makeStakingLedger (active: BN | number | string): PezpalletStakingStakingLedger {
|
||||
const reg = new TypeRegistry();
|
||||
|
||||
// Constructing the whole StakingLedger structure is hard,
|
||||
@@ -16,5 +16,5 @@ export function makeStakingLedger (active: BN | number | string): PalletStakingS
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
return {
|
||||
active: reg.createType('Compact<Balance>', reg.createType('Balance', new BN(active)))
|
||||
} as PalletStakingStakingLedger;
|
||||
} as PezpalletStakingStakingLedger;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@polkadot/api';
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/types';
|
||||
import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types';
|
||||
import type { ApiPromise } from '@pezkuwi/api';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/types';
|
||||
import type { DeriveCollectiveProposal } from '@pezkuwi/api-derive/types';
|
||||
|
||||
import { BN_ONE, BN_ZERO } from '@polkadot/util';
|
||||
import { BN_ONE, BN_ZERO } from '@pezkuwi/util';
|
||||
|
||||
import { alice, bob } from '../keyring/addresses.js';
|
||||
import { balanceOf } from './balance.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { extractTime } from '@polkadot/util';
|
||||
import { extractTime } from '@pezkuwi/util';
|
||||
|
||||
import { defaultTreasury } from '../creation/treasury.js';
|
||||
import { defaultMembers } from '../keyring/addresses.js';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringJson, KeyringStore } from '@polkadot/ui-keyring/types';
|
||||
import type { KeyringJson, KeyringStore } from '@pezkuwi/ui-keyring/types';
|
||||
|
||||
type AccountsMap = Record<string, KeyringJson>;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export const alice = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './addresses.js';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { KeyringPair } from '@polkadot/keyring/types';
|
||||
import type { KeyringPair } from '@pezkuwi/keyring/types';
|
||||
|
||||
import { Keyring } from '@polkadot/keyring';
|
||||
import { Keyring } from '@pezkuwi/keyring';
|
||||
|
||||
export function aliceSigner (): KeyringPair {
|
||||
const keyring = new Keyring({ type: 'sr25519' });
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Registrar } from '@polkadot/react-hooks/types';
|
||||
import type { Registrar } from '@pezkuwi/react-hooks/types';
|
||||
|
||||
import { statics } from '@polkadot/react-api';
|
||||
import { statics } from '@pezkuwi/react-api';
|
||||
|
||||
import { bob, charlie, ferdie } from '../keyring/index.js';
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* global jest, fail */
|
||||
|
||||
import type { RenderResult } from '@testing-library/react';
|
||||
import type { ApiProps } from '@polkadot/react-api/types';
|
||||
import type { PartialQueueTxExtrinsic, QueueProps, QueueTxExtrinsicAdd } from '@polkadot/react-components/Status/types';
|
||||
import type { UseAccountInfo } from '@polkadot/react-hooks/types';
|
||||
import type { ApiProps } from '@pezkuwi/react-api/types';
|
||||
import type { PartialQueueTxExtrinsic, QueueProps, QueueTxExtrinsicAdd } from '@pezkuwi/react-components/Status/types';
|
||||
import type { UseAccountInfo } from '@pezkuwi/react-hooks/types';
|
||||
import type { AccountOverrides } from '../utils/accountDefaults.js';
|
||||
|
||||
import { queryByAttribute, render, screen } from '@testing-library/react';
|
||||
@@ -14,13 +14,13 @@ import React, { Suspense } from 'react';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
|
||||
import { POLKADOT_GENESIS } from '@polkadot/apps-config';
|
||||
import { AccountSidebar, lightTheme } from '@polkadot/react-components';
|
||||
import { ApiCtx } from '@polkadot/react-hooks/ctx/Api';
|
||||
import { QueueCtx } from '@polkadot/react-hooks/ctx/Queue';
|
||||
import { TypeRegistry } from '@polkadot/types/create';
|
||||
import { keyring } from '@polkadot/ui-keyring';
|
||||
import { BN } from '@polkadot/util';
|
||||
import { POLKADOT_GENESIS } from '@pezkuwi/apps-config';
|
||||
import { AccountSidebar, lightTheme } from '@pezkuwi/react-components';
|
||||
import { ApiCtx } from '@pezkuwi/react-hooks/ctx/Api';
|
||||
import { QueueCtx } from '@pezkuwi/react-hooks/ctx/Queue';
|
||||
import { TypeRegistry } from '@pezkuwi/types/create';
|
||||
import { keyring } from '@pezkuwi/ui-keyring';
|
||||
import { BN } from '@pezkuwi/util';
|
||||
|
||||
import { alice, bob, charlie, ferdie } from '../keyring/index.js';
|
||||
import { Table } from '../pagesElements/index.js';
|
||||
@@ -32,13 +32,13 @@ let queueExtrinsic: (value: PartialQueueTxExtrinsic) => void;
|
||||
class NotYetRendered extends Error {
|
||||
}
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useAccounts', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useAccounts', () => ({
|
||||
useAccounts: () => mockAccountHooks.useAccounts
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useAccountInfo', () => {
|
||||
jest.mock('@pezkuwi/react-hooks/useAccountInfo', () => {
|
||||
// eslint-disable-next-line func-call-spacing
|
||||
const actual = jest.requireActual<{useAccountInfo: (address: string) => UseAccountInfo}>('@polkadot/react-hooks/useAccountInfo');
|
||||
const actual = jest.requireActual<UseAccountInfo>('@pezkuwi/react-hooks/useAccountInfo');
|
||||
|
||||
return ({
|
||||
useAccountInfo: (address: string) => {
|
||||
@@ -63,51 +63,51 @@ jest.mock('@polkadot/react-hooks/useAccountInfo', () => {
|
||||
});
|
||||
});
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useNextTick', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useNextTick', () => ({
|
||||
useNextTick: () => true
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useBalancesAll', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useBalancesAll', () => ({
|
||||
useBalancesAll: (address: string) => mockAccountHooks.accountsMap[address].balance
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useStakingInfo', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useStakingInfo', () => ({
|
||||
useStakingInfo: (address: string) => mockAccountHooks.accountsMap[address].staking
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useBestNumber', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useBestNumber', () => ({
|
||||
useBestNumber: () => 1
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useSubidentities', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useSubidentities', () => ({
|
||||
useSubidentities: () => mockApiHooks.subs
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/app-accounts/Accounts/useMultisigApprovals', () => ({
|
||||
jest.mock('@pezkuwi/app-accounts/Accounts/useMultisigApprovals', () => ({
|
||||
__esModule: true,
|
||||
default: () => mockApiHooks.multisigApprovals
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useDelegations', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useDelegations', () => ({
|
||||
useDelegations: () => mockApiHooks.delegations
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useProxies', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useProxies', () => ({
|
||||
useProxies: () => mockApiHooks.proxies
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useSubidentities', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useSubidentities', () => ({
|
||||
useSubidentities: () => mockApiHooks.subs
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useRegistrars', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useRegistrars', () => ({
|
||||
useRegistrars: () => ({
|
||||
isRegistrar: false,
|
||||
registrars: mockApiHooks.registrars
|
||||
})
|
||||
}));
|
||||
|
||||
jest.mock('@polkadot/react-hooks/useTheme', () => ({
|
||||
jest.mock('@pezkuwi/react-hooks/useTheme', () => ({
|
||||
useTheme: () => ({
|
||||
theme: 'light',
|
||||
themeClassName: 'theme--light'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* global fail */
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* global expect */
|
||||
|
||||
import type { Balance } from '@polkadot/types/interfaces';
|
||||
import type { Balance } from '@pezkuwi/types/interfaces';
|
||||
|
||||
import { fireEvent, screen, within } from '@testing-library/react';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* global expect */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* global expect */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './JudgementTag.js';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type React from 'react';
|
||||
|
||||
import { useApi } from '@polkadot/react-hooks';
|
||||
import { useApi } from '@pezkuwi/react-hooks';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-redundant-type-constituents
|
||||
export const WaitForApi = ({ children }: { children: React.ReactNode }): PropsWithChildren<any> | null => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './apiInTests.js';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export const SUBSTRATE_PORT = Number.parseInt(process.env.TEST_SUBSTRATE_PORT || '30333');
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './constants.js';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SubmittableExtrinsic } from '@polkadot/api/types';
|
||||
import type { KeyringPair } from '@polkadot/keyring/types';
|
||||
import type { EventRecord, ExtrinsicStatus } from '@polkadot/types/interfaces';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/types';
|
||||
import type { KeyringPair } from '@pezkuwi/keyring/types';
|
||||
import type { EventRecord, ExtrinsicStatus } from '@pezkuwi/types/interfaces';
|
||||
|
||||
import { waitFor } from '../utils/waitFor.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './execute.js';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types';
|
||||
import type { UseAccountInfo } from '@polkadot/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types';
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@pezkuwi/api-derive/types';
|
||||
import type { UseAccountInfo } from '@pezkuwi/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@pezkuwi/ui-keyring/types';
|
||||
|
||||
export type Override<T> = {
|
||||
[P in keyof T]?: T[P];
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@polkadot/api-derive/types';
|
||||
import type { Accounts } from '@polkadot/react-hooks/ctx/types';
|
||||
import type { UseAccountInfo } from '@polkadot/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types';
|
||||
import type { DeriveBalancesAll, DeriveStakingAccount } from '@pezkuwi/api-derive/types';
|
||||
import type { Accounts } from '@pezkuwi/react-hooks/ctx/types';
|
||||
import type { UseAccountInfo } from '@pezkuwi/react-hooks/types';
|
||||
import type { KeyringJson$Meta } from '@pezkuwi/ui-keyring/types';
|
||||
|
||||
import { BN } from '@polkadot/util';
|
||||
import { BN } from '@pezkuwi/util';
|
||||
|
||||
import { balanceOf } from '../creation/balance.js';
|
||||
import { makeStakingLedger } from '../creation/staking.js';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Balance } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Balance } from '@pezkuwi/types/interfaces';
|
||||
import type { BN } from '@pezkuwi/util';
|
||||
|
||||
import { formatBalance } from '@polkadot/util';
|
||||
import { formatBalance } from '@pezkuwi/util';
|
||||
|
||||
import { balanceOf } from '../creation/balance.js';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './accountDefaults.js';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Registrar } from '@polkadot/react-hooks/types';
|
||||
import type { H256, Multisig, ProxyDefinition, RegistrationJudgement, Voting } from '@polkadot/types/interfaces';
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { Registrar } from '@pezkuwi/react-hooks/types';
|
||||
import type { H256, Multisig, ProxyDefinition, RegistrationJudgement, Voting } from '@pezkuwi/types/interfaces';
|
||||
import type { BN } from '@pezkuwi/util';
|
||||
|
||||
class MockApiHooks {
|
||||
public multisigApprovals: [H256, Multisig][] | undefined = [];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-supports authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-supports authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* global expect */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2025 @polkadot/test-support authors & contributors
|
||||
// Copyright 2017-2025 @pezkuwi/test-support authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { WaitOptions } from '../types.js';
|
||||
|
||||
Reference in New Issue
Block a user