Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade polkadot-js deps #11191

Merged
merged 3 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,34 +91,34 @@
"source-map-explorer": "^2.5.3"
},
"resolutions": {
"@polkadot/api": "^14.3.1",
"@polkadot/api-augment": "^14.3.1",
"@polkadot/api-base": "^14.3.1",
"@polkadot/api-contract": "^14.3.1",
"@polkadot/api-derive": "^14.3.1",
"@polkadot/hw-ledger": "^13.2.3",
"@polkadot/keyring": "^13.2.3",
"@polkadot/networks": "^13.2.3",
"@polkadot/phishing": "^0.24.3",
"@polkadot/rpc-augment": "^14.3.1",
"@polkadot/rpc-core": "^14.3.1",
"@polkadot/rpc-provider": "^14.3.1",
"@polkadot/types": "^14.3.1",
"@polkadot/types-augment": "^14.3.1",
"@polkadot/types-codec": "^14.3.1",
"@polkadot/types-create": "^14.3.1",
"@polkadot/types-known": "^14.3.1",
"@polkadot/types-support": "^14.3.1",
"@polkadot/util": "^13.2.3",
"@polkadot/util-crypto": "^13.2.3",
"@polkadot/api": "^15.2.1",
"@polkadot/api-augment": "^15.2.1",
"@polkadot/api-base": "^15.2.1",
"@polkadot/api-contract": "^15.2.1",
"@polkadot/api-derive": "^15.2.1",
"@polkadot/hw-ledger": "^13.3.1",
"@polkadot/keyring": "^13.3.1",
"@polkadot/networks": "^13.3.1",
"@polkadot/phishing": "^0.25.1",
"@polkadot/rpc-augment": "^15.2.1",
"@polkadot/rpc-core": "^15.2.1",
"@polkadot/rpc-provider": "^15.2.1",
"@polkadot/types": "^15.2.1",
"@polkadot/types-augment": "^15.2.1",
"@polkadot/types-codec": "^15.2.1",
"@polkadot/types-create": "^15.2.1",
"@polkadot/types-known": "^15.2.1",
"@polkadot/types-support": "^15.2.1",
"@polkadot/util": "^13.3.1",
"@polkadot/util-crypto": "^13.3.1",
"@polkadot/wasm-crypto": "^7.4.1",
"@polkadot/x-bigint": "^13.2.3",
"@polkadot/x-fetch": "^13.2.3",
"@polkadot/x-global": "^13.2.3",
"@polkadot/x-randomvalues": "^13.2.3",
"@polkadot/x-textdecoder": "^13.2.3",
"@polkadot/x-textencoder": "^13.2.3",
"@polkadot/x-ws": "^13.2.3",
"@polkadot/x-bigint": "^13.3.1",
"@polkadot/x-fetch": "^13.3.1",
"@polkadot/x-global": "^13.3.1",
"@polkadot/x-randomvalues": "^13.3.1",
"@polkadot/x-textdecoder": "^13.3.1",
"@polkadot/x-textencoder": "^13.3.1",
"@polkadot/x-ws": "^13.3.1",
"typescript": "^5.5.4"
}
}
20 changes: 10 additions & 10 deletions packages/apps-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
"@peaqnetwork/type-definitions": "0.0.4",
"@pendulum-chain/type-definitions": "0.3.8",
"@phala/typedefs": "0.2.33",
"@polkadot/api": "^14.3.1",
"@polkadot/api-derive": "^14.3.1",
"@polkadot/networks": "^13.2.3",
"@polkadot/react-identicon": "^3.11.3",
"@polkadot/types": "^14.3.1",
"@polkadot/types-codec": "^14.3.1",
"@polkadot/util": "^13.2.3",
"@polkadot/util-crypto": "^13.2.3",
"@polkadot/api": "^15.2.1",
"@polkadot/api-derive": "^15.2.1",
"@polkadot/networks": "^13.3.1",
"@polkadot/react-identicon": "^3.12.1",
"@polkadot/types": "^15.2.1",
"@polkadot/types-codec": "^15.2.1",
"@polkadot/util": "^13.3.1",
"@polkadot/util-crypto": "^13.3.1",
"@polkadot/wasm-util": "^7.4.1",
"@polkadot/x-fetch": "^13.2.3",
"@polkadot/x-ws": "^13.2.3",
"@polkadot/x-fetch": "^13.3.1",
"@polkadot/x-ws": "^13.3.1",
"@polymeshassociation/polymesh-types": "5.7.0",
"@snowfork/snowbridge-types": "0.2.7",
"@sora-substrate/type-definitions": "1.27.7",
Expand Down
8 changes: 4 additions & 4 deletions packages/page-accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"type": "module",
"version": "0.146.2-30-x",
"dependencies": {
"@polkadot/hw-ledger": "^13.2.3",
"@polkadot/phishing": "^0.24.3",
"@polkadot/hw-ledger": "^13.3.1",
"@polkadot/phishing": "^0.25.1",
"@polkadot/react-components": "^0.146.2-30-x",
"@polkadot/react-hooks": "^0.146.2-30-x",
"@polkadot/util": "^13.2.3",
"@polkadot/vanitygen": "^0.60.3",
"@polkadot/util": "^13.3.1",
"@polkadot/vanitygen": "^0.62.1",
"detect-browser": "^5.3.0",
"file-saver": "^2.0.5"
},
Expand Down
29 changes: 19 additions & 10 deletions packages/page-bounties/src/Bounties.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { ApiPromise } from '@polkadot/api';
import type { SubmittableExtrinsic } from '@polkadot/api/types';
import type { DeriveCollectiveProposal } from '@polkadot/api-derive/types';
import type { BountyIndex, BountyStatus } from '@polkadot/types/interfaces';
import type { PalletBountiesBounty } from '@polkadot/types/lookup';
import type { PalletBountiesBounty, PalletBountiesBountyStatus } from '@polkadot/types/lookup';

import { fireEvent } from '@testing-library/react';

Expand Down Expand Up @@ -347,7 +347,8 @@ describe('Bounties', () => {

describe('Reject curator modal', () => {
it('creates extrinsic', async () => {
const bounty = aBounty({ status: bountyStatusWith({ curator: bob, status: 'CuratorProposed' }) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
const bounty = aBounty({ status: bountyStatusWith({ curator: bob, status: 'CuratorProposed' }) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);

Expand All @@ -358,7 +359,8 @@ describe('Bounties', () => {
});

it('shows options for all roles', async () => {
const bounty = aBounty({ status: bountyStatusWith({ curator: bob, status: 'Active' }) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
const bounty = aBounty({ status: bountyStatusWith({ curator: bob, status: 'Active' }) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);

Expand All @@ -372,7 +374,8 @@ describe('Bounties', () => {
it('creates extrinsic', async () => {
const bounty = aBounty({
fee: balanceOf(20),
status: bountyStatusWith({ curator: bob, status: 'CuratorProposed' })
// FIXME: https://github.com/polkadot-js/apps/issues/11192
status: bountyStatusWith({ curator: bob, status: 'CuratorProposed' }) as unknown as PalletBountiesBountyStatus
});

bountiesPage.renderOne(bounty);
Expand All @@ -390,7 +393,8 @@ describe('Bounties', () => {

describe('extend bounty expiry action modal', () => {
it('queues extend bounty expiry extrinsic on submit', async () => {
const bounty = aBounty({ status: bountyStatusWith({ curator: alice }) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
const bounty = aBounty({ status: bountyStatusWith({ curator: alice }) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);
await bountiesPage.openExtendExpiry();
Expand All @@ -405,7 +409,8 @@ describe('Bounties', () => {

describe('give up curator modal', () => {
it('gives up on the Curator role of an Active bounty', async () => {
const bounty = aBounty({ status: bountyStatusWith({ curator: alice }) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
const bounty = aBounty({ status: bountyStatusWith({ curator: alice }) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);
await bountiesPage.openGiveUpCuratorsRole();
Expand Down Expand Up @@ -434,7 +439,8 @@ describe('Bounties', () => {

describe('award beneficiary action modal', () => {
it('awards the beneficiary', async () => {
const bounty = aBounty({ status: bountyStatusWith({ curator: alice }) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
const bounty = aBounty({ status: bountyStatusWith({ curator: alice }) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);

Expand All @@ -454,7 +460,8 @@ describe('Bounties', () => {
curator: alice,
status: 'Active',
updateDue: defaultBountyUpdatePeriod.muln(BLOCKS_PERCENTAGE_LEFT_TO_SHOW_WARNING).divn(100).toNumber() - 1
}) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
}) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);

Expand All @@ -467,7 +474,8 @@ describe('Bounties', () => {
curator: alice,
status: 'Active',
updateDue: mockBountyHooks.bountyApi.bestNumber?.toNumber()
}) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
}) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);

Expand Down Expand Up @@ -503,7 +511,8 @@ describe('Bounties', () => {
curator: alice,
status: 'Active',
updateDue: defaultBountyUpdatePeriod.muln(BLOCKS_PERCENTAGE_LEFT_TO_SHOW_WARNING).divn(100).toNumber() + 1
}) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
}) as unknown as PalletBountiesBountyStatus });

bountiesPage.renderOne(bounty);
await bountiesPage.rendered();
Expand Down
7 changes: 6 additions & 1 deletion packages/page-bounties/src/Bounties.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright 2017-2025 @polkadot/app-bounties authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type { Bounty as BountyType } from '@polkadot/types/interfaces';

import React, { useMemo, useRef } from 'react';

import { Button, styled, Table } from '@polkadot/react-components';
Expand Down Expand Up @@ -46,7 +48,10 @@ function Bounties ({ className }: Props): React.ReactElement {
{sorted && bestNumber && sorted.map(({ bounty, description, index, proposals }) => (
<Bounty
bestNumber={bestNumber}
bounty={bounty}
// TODO: The bounty type here is now expected as PalletBountiesBounty type in the latest substrate release.
// This will require forward and backwards compatibility with the older Bounty type and the newer lookup type.
// ref: https://github.com/polkadot-js/apps/issues/11192
bounty={bounty as unknown as BountyType}
description={description}
index={index}
key={index.toNumber()}
Expand Down
2 changes: 1 addition & 1 deletion packages/page-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"type": "module",
"version": "0.146.2-30-x",
"dependencies": {
"@polkadot/api-contract": "14.3.1",
"@polkadot/api-contract": "15.2.1",
"eventemitter3": "^5.0.1"
},
"peerDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/react-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"path": false
},
"dependencies": {
"@polkadot/api": "^14.3.1",
"@polkadot/extension-compat-metamask": "^0.56.2",
"@polkadot/extension-dapp": "^0.56.2",
"@polkadot/rpc-provider": "^14.3.1",
"@polkadot/api": "^15.2.1",
"@polkadot/extension-compat-metamask": "^0.58.1",
"@polkadot/extension-dapp": "^0.58.1",
"@polkadot/rpc-provider": "^15.2.1",
"fflate": "^0.8.1",
"rxjs": "^7.8.1"
},
Expand Down
14 changes: 7 additions & 7 deletions packages/react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"@fortawesome/fontawesome-svg-core": "^6.5.1",
"@fortawesome/free-solid-svg-icons": "^6.5.1",
"@fortawesome/react-fontawesome": "^0.2.0",
"@polkadot/keyring": "^13.2.3",
"@polkadot/keyring": "^13.3.1",
"@polkadot/react-api": "^0.146.2-30-x",
"@polkadot/react-identicon": "^3.11.3",
"@polkadot/react-qr": "^3.11.3",
"@polkadot/react-identicon": "^3.12.1",
"@polkadot/react-qr": "^3.12.1",
"@polkadot/react-query": "^0.146.2-30-x",
"@polkadot/ui-keyring": "^3.11.3",
"@polkadot/ui-settings": "^3.11.3",
"@polkadot/util": "^13.2.3",
"@polkadot/util-crypto": "^13.2.3",
"@polkadot/ui-keyring": "^3.12.1",
"@polkadot/ui-settings": "^3.12.1",
"@polkadot/util": "^13.3.1",
"@polkadot/util-crypto": "^13.3.1",
"chart.js": "^4.4.1",
"chartjs-plugin-annotation": "^3.0.1",
"chartjs-plugin-crosshair": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"type": "module",
"version": "0.146.2-30-x",
"dependencies": {
"@polkadot/hw-ledger": "^13.2.3",
"@polkadot/hw-ledger-transports": "^13.2.3",
"@polkadot/hw-ledger": "^13.3.1",
"@polkadot/hw-ledger-transports": "^13.3.1",
"is-ipfs": "^8.0.1"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-signer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": "0.146.2-30-x",
"dependencies": {
"@polkadot-api/merkleize-metadata": "^1.1.9",
"@polkadot/hw-ledger": "^13.2.3",
"@polkadot/hw-ledger": "^13.3.1",
"@polkadot/react-components": "^0.146.2-30-x"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"testcontainers": "^10.4.0"
},
"devDependencies": {
"@polkadot/types-support": "14.3.1",
"@polkadot/types-support": "15.2.1",
"@testing-library/jest-dom": "^5.17.0",
"tsconfig-paths": "^4.2.0"
},
Expand Down
8 changes: 5 additions & 3 deletions packages/test-support/src/creation/bounties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import type { ApiPromise } from '@polkadot/api';
import type { BountyIndex, BountyStatus } from '@polkadot/types/interfaces';
import type { PalletBountiesBounty } from '@polkadot/types/lookup';
import type { PalletBountiesBounty, PalletBountiesBountyStatus } from '@polkadot/types/lookup';
import type { Registry } from '@polkadot/types/types';

import { balanceOf } from './balance.js';
Expand Down Expand Up @@ -39,8 +39,10 @@ export class BountyFactory {
};

public bountyWith = ({ status = 'Proposed', value = 1 } = {}): PalletBountiesBounty =>
this.aBounty({ status: this.aBountyStatus(status), value: balanceOf(value) });
// FIXME: https://github.com/polkadot-js/apps/issues/11192
this.aBounty({ status: this.aBountyStatus(status) as unknown as PalletBountiesBountyStatus, value: balanceOf(value) });

public aBounty = ({ fee = balanceOf(10), status = this.aBountyStatus('Proposed'), value = balanceOf(500) }: Partial<PalletBountiesBounty> = {}): PalletBountiesBounty =>
// FIXME: https://github.com/polkadot-js/apps/issues/11192
public aBounty = ({ fee = balanceOf(10), status = this.aBountyStatus('Proposed') as unknown as PalletBountiesBountyStatus, value = balanceOf(500) }: Partial<PalletBountiesBounty> = {}): PalletBountiesBounty =>
this.#registry.createType<PalletBountiesBounty>('Bounty', { fee, status, value });
}
Loading
Loading