Use .js imports in src (#5526)
* Use .js imports in src * Adjust * Fix imports * Bump dev * Adjust with .js imports for typegen * Adjust * Adjust * Remove target override
This commit is contained in:
@@ -7,17 +7,17 @@ import type { SubmittableExtrinsic } from '@polkadot/api-base/types';
|
||||
import type { Bytes, Option, StorageKey } from '@polkadot/types';
|
||||
import type { Bounty, BountyIndex, Proposal, ProposalIndex } from '@polkadot/types/interfaces';
|
||||
import type { Codec, InterfaceTypes } from '@polkadot/types/types';
|
||||
import type { DeriveApi, DeriveCollectiveProposal } from '../types';
|
||||
import type { DeriveApi, DeriveCollectiveProposal } from '../types.js';
|
||||
|
||||
import { firstValueFrom, of } from 'rxjs';
|
||||
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
|
||||
import { BountyFactory } from '../test/bountyFactory';
|
||||
import { BytesFactory } from '../test/bytesFactory';
|
||||
import { createApiWithAugmentations } from '../test/helpers';
|
||||
import { ProposalFactory } from '../test/proposalFactory';
|
||||
import { bounties } from '.';
|
||||
import { BountyFactory } from '../test/bountyFactory.js';
|
||||
import { BytesFactory } from '../test/bytesFactory.js';
|
||||
import { createApiWithAugmentations } from '../test/helpers.js';
|
||||
import { ProposalFactory } from '../test/proposalFactory.js';
|
||||
import { bounties } from './index.js';
|
||||
|
||||
const DEFAULT_PROPOSER = '5C4hrfjw9DjXZTzV3MwzrrAr9P1MJhSrvWGWqi1eSuyUpnhM';
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import type { Observable } from 'rxjs';
|
||||
import type { Bytes, Option } from '@polkadot/types';
|
||||
import type { BountyIndex } from '@polkadot/types/interfaces';
|
||||
import type { PalletBountiesBounty } from '@polkadot/types/lookup';
|
||||
import type { DeriveApi, DeriveBounties, DeriveCollectiveProposal } from '../types';
|
||||
import type { DeriveApi, DeriveBounties, DeriveCollectiveProposal } from '../types.js';
|
||||
|
||||
import { combineLatest, map, of, switchMap } from 'rxjs';
|
||||
|
||||
import { memo } from '../util';
|
||||
import { filterBountiesProposals } from './helpers/filterBountyProposals';
|
||||
import { memo } from '../util/index.js';
|
||||
import { filterBountiesProposals } from './helpers/filterBountyProposals.js';
|
||||
|
||||
type Result = [Option<PalletBountiesBounty>[], Option<Bytes>[], BountyIndex[], DeriveCollectiveProposal[]];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DeriveApi, DeriveCollectiveProposal } from '../../types';
|
||||
import type { DeriveApi, DeriveCollectiveProposal } from '../../types.js';
|
||||
|
||||
export function filterBountiesProposals (api: DeriveApi, allProposals: DeriveCollectiveProposal[]): DeriveCollectiveProposal[] {
|
||||
const bountyTxBase = api.tx.bounties ? api.tx.bounties : api.tx.treasury;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2017-2023 @polkadot/api-derive authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './bounties';
|
||||
export * from './bounties.js';
|
||||
|
||||
Reference in New Issue
Block a user