Skip to content

Commit

Permalink
chore: discontinue upstream @polkadot packages (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbulat authored Oct 29, 2024
2 parents c257eab + 0053bfb commit eb407e2
Show file tree
Hide file tree
Showing 7 changed files with 198 additions and 9 deletions.
2 changes: 2 additions & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"@polkadot-cloud/icons": "1.0.0",
"@polkadot/api": "^12.0.2",
"@polkadot/rpc-provider": "12.0.2",
"@polkadot/util": "^13.2.2",
"@polkadot/util-crypto": "^13.2.2",
"@tanstack/react-query": "^5.53.3",
"@w3ux/extension-assets": "^0.4.0",
"@w3ux/hooks": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/contexts/ChainSpaceEnv/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import type { ApiIndexLabel } from 'contexts/ApiIndexer/types';
import type { MetadataVersion } from 'model/Metadata/types';
import type { ApiPromise } from '@polkadot/api';
import { PalletScraper } from 'model/Scraper/Pallet';
import { xxhashAsHex } from '@w3ux/utils/util-crypto';
import { xxhashAsHex } from '@polkadot/util-crypto';
import { u16 } from 'scale-ts';
import type { AnyJson } from '@w3ux/types';
import { getApiInstanceOwnerAndIndex } from './Utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/hooks/useBuildPayload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { AnyJson } from '@w3ux/types';
import type { UseBuildPayloadProps } from './types';
import { useImportedAccounts } from 'contexts/ImportedAccounts';
import type { ApiPromise } from '@polkadot/api';
import { objectSpread, u8aToHex } from '@w3ux/utils/util';
import { objectSpread, u8aToHex } from '@polkadot/util';

export const useBuildPayload = ({
api,
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/library/QRCode/Display.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2024 @polkadot-cloud/polkadot-developer-console authors & contributors
// SPDX-License-Identifier: AGPL-3.0

import { objectSpread } from '@w3ux/utils/util';
import { xxhashAsHex } from '@w3ux/utils/util-crypto';
import { objectSpread } from '@polkadot/util';
import { xxhashAsHex } from '@polkadot/util-crypto';
import type { ReactElement } from 'react';
import { memo, useEffect, useMemo, useRef, useState } from 'react';
import { DisplayWrapper } from './Wrappers.js';
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/library/QRCode/util.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2024 @polkadot-cloud/polkadot-developer-console authors & contributors
// SPDX-License-Identifier: AGPL-3.0

import { isString, u8aConcat, u8aToU8a } from '@w3ux/utils/util';
import { decodeAddress } from '@w3ux/utils/util-crypto';
import { isString, u8aConcat, u8aToU8a } from '@polkadot/util';
import { decodeAddress } from '@polkadot/util-crypto';
import { CRYPTO_SR25519, FRAME_SIZE, SUBSTRATE_ID } from './constants.js';

const MULTIPART = new Uint8Array([0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { capitalizeFirstLetter, removeHexPrefix } from '@w3ux/utils';
import { EncodedWrapper } from '../Wrappers';
import type { EncodedDetailsProps } from './types';
import { xxhashAsHex } from '@w3ux/utils/util-crypto';
import { xxhashAsHex } from '@polkadot/util-crypto';
import { ButtonIcon } from 'library/Buttons/ButtonIcon';

export const EncodedDetails = ({
Expand Down
191 changes: 189 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,8 @@ __metadata:
"@polkadot-cloud/icons": "npm:1.0.0"
"@polkadot/api": "npm:^12.0.2"
"@polkadot/rpc-provider": "npm:12.0.2"
"@polkadot/util": "npm:^13.2.2"
"@polkadot/util-crypto": "npm:^13.2.2"
"@tanstack/react-query": "npm:^5.53.3"
"@w3ux/extension-assets": "npm:^0.4.0"
"@w3ux/hooks": "npm:^1.1.1"
Expand Down Expand Up @@ -2326,6 +2328,17 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/networks@npm:13.2.2":
version: 13.2.2
resolution: "@polkadot/networks@npm:13.2.2"
dependencies:
"@polkadot/util": "npm:13.2.2"
"@substrate/ss58-registry": "npm:^1.51.0"
tslib: "npm:^2.8.0"
checksum: 10c0/aeac8733a3f1f0ed2872603b7925441e1016097b5da850f49f860a8e300d10555e73450e2952023de560718b49026937919490749f4075c9b3c4ea78464e027f
languageName: node
linkType: hard

"@polkadot/rpc-augment@npm:10.13.1":
version: 10.13.1
resolution: "@polkadot/rpc-augment@npm:10.13.1"
Expand Down Expand Up @@ -2700,6 +2713,26 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/util-crypto@npm:^13.2.2":
version: 13.2.2
resolution: "@polkadot/util-crypto@npm:13.2.2"
dependencies:
"@noble/curves": "npm:^1.3.0"
"@noble/hashes": "npm:^1.3.3"
"@polkadot/networks": "npm:13.2.2"
"@polkadot/util": "npm:13.2.2"
"@polkadot/wasm-crypto": "npm:^7.4.1"
"@polkadot/wasm-util": "npm:^7.4.1"
"@polkadot/x-bigint": "npm:13.2.2"
"@polkadot/x-randomvalues": "npm:13.2.2"
"@scure/base": "npm:^1.1.7"
tslib: "npm:^2.8.0"
peerDependencies:
"@polkadot/util": 13.2.2
checksum: 10c0/5843cfc599a7d8d6c76921cba679909f3e730d363c62d82cc5755ed67dadcc36ff0cc0fce6017d31041f5f7a62b05311b02aa922ac38608ee5dd04705e19d056
languageName: node
linkType: hard

"@polkadot/util@npm:12.6.2, @polkadot/util@npm:^12.6.2":
version: 12.6.2
resolution: "@polkadot/util@npm:12.6.2"
Expand Down Expand Up @@ -2730,6 +2763,21 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/util@npm:13.2.2, @polkadot/util@npm:^13.2.2":
version: 13.2.2
resolution: "@polkadot/util@npm:13.2.2"
dependencies:
"@polkadot/x-bigint": "npm:13.2.2"
"@polkadot/x-global": "npm:13.2.2"
"@polkadot/x-textdecoder": "npm:13.2.2"
"@polkadot/x-textencoder": "npm:13.2.2"
"@types/bn.js": "npm:^5.1.6"
bn.js: "npm:^5.2.1"
tslib: "npm:^2.8.0"
checksum: 10c0/a63fb46907a77fb99ace488fa61d9005c700ff6504322a3b98a2fca434bbef3a5aa6dd6c52d4b806b71e2f4a3def6f6ecb2548644be0546b8667efc3da4118cd
languageName: node
linkType: hard

"@polkadot/wasm-bridge@npm:7.3.2":
version: 7.3.2
resolution: "@polkadot/wasm-bridge@npm:7.3.2"
Expand All @@ -2743,6 +2791,19 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/wasm-bridge@npm:7.4.1":
version: 7.4.1
resolution: "@polkadot/wasm-bridge@npm:7.4.1"
dependencies:
"@polkadot/wasm-util": "npm:7.4.1"
tslib: "npm:^2.7.0"
peerDependencies:
"@polkadot/util": "*"
"@polkadot/x-randomvalues": "*"
checksum: 10c0/8123c2d72ed24f6900185eb982f228789414c1458c8a291e17a9bd70cd36616f0e04fb40cb01e90d27223eb2ce81391af36f6e5b741cb6d9a83850bb5b9e038e
languageName: node
linkType: hard

"@polkadot/wasm-crypto-asmjs@npm:7.3.2":
version: 7.3.2
resolution: "@polkadot/wasm-crypto-asmjs@npm:7.3.2"
Expand All @@ -2754,6 +2815,17 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/wasm-crypto-asmjs@npm:7.4.1":
version: 7.4.1
resolution: "@polkadot/wasm-crypto-asmjs@npm:7.4.1"
dependencies:
tslib: "npm:^2.7.0"
peerDependencies:
"@polkadot/util": "*"
checksum: 10c0/7b19748b2ccdc2d964c137ae5eabdf022d7860c05981270c82392898ac6641d5602a2c2ea1059ef8f8929dd361a75fdb25bfaa7961f3dfcf497f987145c6850a
languageName: node
linkType: hard

"@polkadot/wasm-crypto-init@npm:7.3.2":
version: 7.3.2
resolution: "@polkadot/wasm-crypto-init@npm:7.3.2"
Expand All @@ -2770,6 +2842,22 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/wasm-crypto-init@npm:7.4.1":
version: 7.4.1
resolution: "@polkadot/wasm-crypto-init@npm:7.4.1"
dependencies:
"@polkadot/wasm-bridge": "npm:7.4.1"
"@polkadot/wasm-crypto-asmjs": "npm:7.4.1"
"@polkadot/wasm-crypto-wasm": "npm:7.4.1"
"@polkadot/wasm-util": "npm:7.4.1"
tslib: "npm:^2.7.0"
peerDependencies:
"@polkadot/util": "*"
"@polkadot/x-randomvalues": "*"
checksum: 10c0/fdcb96b4ba318680837d728b3c60c0bbbe326c9b8c15d70394cfbfdee06c95f8311b6fe13e4c862472faef4a2a9ccb218519fb15ad2f67d15b4cbb1b7c3eecba
languageName: node
linkType: hard

"@polkadot/wasm-crypto-wasm@npm:7.3.2":
version: 7.3.2
resolution: "@polkadot/wasm-crypto-wasm@npm:7.3.2"
Expand All @@ -2782,6 +2870,18 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/wasm-crypto-wasm@npm:7.4.1":
version: 7.4.1
resolution: "@polkadot/wasm-crypto-wasm@npm:7.4.1"
dependencies:
"@polkadot/wasm-util": "npm:7.4.1"
tslib: "npm:^2.7.0"
peerDependencies:
"@polkadot/util": "*"
checksum: 10c0/2673a567cea785f7b9ec5b8371e05a53064651a9c64ac0fc45d7d5c8a080810cb1bd0f1950e2789d2c8895bcca35e9dc84b8a7b77c59b9b2d30beed8a964d043
languageName: node
linkType: hard

"@polkadot/wasm-crypto@npm:^7.3.2":
version: 7.3.2
resolution: "@polkadot/wasm-crypto@npm:7.3.2"
Expand All @@ -2799,6 +2899,23 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/wasm-crypto@npm:^7.4.1":
version: 7.4.1
resolution: "@polkadot/wasm-crypto@npm:7.4.1"
dependencies:
"@polkadot/wasm-bridge": "npm:7.4.1"
"@polkadot/wasm-crypto-asmjs": "npm:7.4.1"
"@polkadot/wasm-crypto-init": "npm:7.4.1"
"@polkadot/wasm-crypto-wasm": "npm:7.4.1"
"@polkadot/wasm-util": "npm:7.4.1"
tslib: "npm:^2.7.0"
peerDependencies:
"@polkadot/util": "*"
"@polkadot/x-randomvalues": "*"
checksum: 10c0/b896f88ebf6b6864263b9042a14b6e5ef7371e47e56c6f1c297472f6d24b40645ee4e9abed5d32bfd95de4797811cb109c44da6064dd2509db3ce05a53fe2d72
languageName: node
linkType: hard

"@polkadot/wasm-util@npm:7.3.2, @polkadot/wasm-util@npm:^7.3.2":
version: 7.3.2
resolution: "@polkadot/wasm-util@npm:7.3.2"
Expand All @@ -2810,6 +2927,17 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/wasm-util@npm:7.4.1, @polkadot/wasm-util@npm:^7.4.1":
version: 7.4.1
resolution: "@polkadot/wasm-util@npm:7.4.1"
dependencies:
tslib: "npm:^2.7.0"
peerDependencies:
"@polkadot/util": "*"
checksum: 10c0/4e7042f854350a7e0c978d816abc3a8e37adcd6e8a5a35a4893928e79ecc0950fc4073993ad813ad8edd2c5fa6f603a5395018d19c44b8a338f52974747c3a9c
languageName: node
linkType: hard

"@polkadot/x-bigint@npm:12.6.2, @polkadot/x-bigint@npm:^12.6.2":
version: 12.6.2
resolution: "@polkadot/x-bigint@npm:12.6.2"
Expand All @@ -2830,6 +2958,16 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/x-bigint@npm:13.2.2":
version: 13.2.2
resolution: "@polkadot/x-bigint@npm:13.2.2"
dependencies:
"@polkadot/x-global": "npm:13.2.2"
tslib: "npm:^2.8.0"
checksum: 10c0/5e793b1870c18e631965500693751bf49e7e4fdd0028f93a380fbdeb78d9faaadfb1742af6a52e1faf7943c2fa35bbb2fe1988a43c42a11a87260195311932e9
languageName: node
linkType: hard

"@polkadot/x-fetch@npm:^12.6.2":
version: 12.6.2
resolution: "@polkadot/x-fetch@npm:12.6.2"
Expand Down Expand Up @@ -2870,6 +3008,15 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/x-global@npm:13.2.2":
version: 13.2.2
resolution: "@polkadot/x-global@npm:13.2.2"
dependencies:
tslib: "npm:^2.8.0"
checksum: 10c0/8129a33319be3f48e7cd540324e97f6108799ef2aeb026157bfd313fbf22146f3a2ebefd1d8dfa1fbc57987d2157a3169a33b5cbb4f26f9abf49765bbb1874fe
languageName: node
linkType: hard

"@polkadot/x-randomvalues@npm:12.6.2":
version: 12.6.2
resolution: "@polkadot/x-randomvalues@npm:12.6.2"
Expand All @@ -2896,6 +3043,19 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/x-randomvalues@npm:13.2.2":
version: 13.2.2
resolution: "@polkadot/x-randomvalues@npm:13.2.2"
dependencies:
"@polkadot/x-global": "npm:13.2.2"
tslib: "npm:^2.8.0"
peerDependencies:
"@polkadot/util": 13.2.2
"@polkadot/wasm-util": "*"
checksum: 10c0/383636261de6c2986302a8bd65e610826dba1e72cb15623af10c513c003f4eabd235396abc5e7e3dc3799d026204f7dc2a752945f0eef020029a005c6716715d
languageName: node
linkType: hard

"@polkadot/x-textdecoder@npm:12.6.2":
version: 12.6.2
resolution: "@polkadot/x-textdecoder@npm:12.6.2"
Expand All @@ -2916,6 +3076,16 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/x-textdecoder@npm:13.2.2":
version: 13.2.2
resolution: "@polkadot/x-textdecoder@npm:13.2.2"
dependencies:
"@polkadot/x-global": "npm:13.2.2"
tslib: "npm:^2.8.0"
checksum: 10c0/4f0fbfb6a575b0c77831fd4602d36f84367fc20247882a1bd7ff1f327c38a9c8c17f6ad151930ee0a4687698e4411960546b7b54772bd4de7d215edc9dbdf192
languageName: node
linkType: hard

"@polkadot/x-textencoder@npm:12.6.2":
version: 12.6.2
resolution: "@polkadot/x-textencoder@npm:12.6.2"
Expand All @@ -2936,6 +3106,16 @@ __metadata:
languageName: node
linkType: hard

"@polkadot/x-textencoder@npm:13.2.2":
version: 13.2.2
resolution: "@polkadot/x-textencoder@npm:13.2.2"
dependencies:
"@polkadot/x-global": "npm:13.2.2"
tslib: "npm:^2.8.0"
checksum: 10c0/ce3e6b2b2fb4a5225629f4cbbeba3d71cd38f35f4b4c26e5a0725b23b91c8a085f94da73d22b4b338a6a4f6d3336c49122cdf69b761a32d528ac1d93862fa396
languageName: node
linkType: hard

"@polkadot/x-ws@npm:^12.6.2":
version: 12.6.2
resolution: "@polkadot/x-ws@npm:12.6.2"
Expand Down Expand Up @@ -3481,7 +3661,7 @@ __metadata:
languageName: node
linkType: hard

"@substrate/ss58-registry@npm:^1.44.0, @substrate/ss58-registry@npm:^1.50.0":
"@substrate/ss58-registry@npm:^1.44.0, @substrate/ss58-registry@npm:^1.50.0, @substrate/ss58-registry@npm:^1.51.0":
version: 1.51.0
resolution: "@substrate/ss58-registry@npm:1.51.0"
checksum: 10c0/f568ea2a5011ee1c288e577d23dd48a6ba0dc0db3611f268b1c35f41636b8ec39ae09fe0184f88d411e331b60d924e90054be736b1ff624cdcb9b742c94a9bf6
Expand Down Expand Up @@ -3674,7 +3854,7 @@ __metadata:
languageName: node
linkType: hard

"@types/bn.js@npm:^5.1.5":
"@types/bn.js@npm:^5.1.5, @types/bn.js@npm:^5.1.6":
version: 5.1.6
resolution: "@types/bn.js@npm:5.1.6"
dependencies:
Expand Down Expand Up @@ -11063,6 +11243,13 @@ __metadata:
languageName: node
linkType: hard

"tslib@npm:^2.8.0":
version: 2.8.0
resolution: "tslib@npm:2.8.0"
checksum: 10c0/31e4d14dc1355e9b89e4d3c893a18abb7f90b6886b089c2da91224d0a7752c79f3ddc41bc1aa0a588ac895bd97bb99c5bc2bfdb2f86de849f31caeb3ba79bbe5
languageName: node
linkType: hard

"tsup@npm:^8.0.2":
version: 8.3.0
resolution: "tsup@npm:8.3.0"
Expand Down

0 comments on commit eb407e2

Please sign in to comment.