From 7d24f50c386aed72603d6f62ac6763f588ec1c99 Mon Sep 17 00:00:00 2001 From: Jaco Date: Fri, 3 Feb 2023 15:01:45 +0200 Subject: [PATCH] Bump deps (incl. TS) (#8931) * Bump deps (incl. TS) * Adjust ESM packages for Jest * Yet more Jest hacks * Make horrible jest config slightly prettier * Unbump electron * Fix external package deps --- jest.config.cjs | 24 +- package.json | 6 +- packages/apps-config/package.json | 25 +- packages/apps-config/src/api/typesBundle.ts | 220 ++++++++- packages/apps-electron/package.json | 6 +- packages/apps-routing/src/accounts.ts | 2 +- packages/apps-routing/src/addresses.ts | 2 +- packages/apps-routing/src/alliance.ts | 2 +- packages/apps-routing/src/assets.ts | 2 +- packages/apps-routing/src/bounties.ts | 2 +- packages/apps-routing/src/calendar.ts | 2 +- packages/apps-routing/src/claims.ts | 2 +- packages/apps-routing/src/collator.ts | 2 +- packages/apps-routing/src/contracts.ts | 2 +- packages/apps-routing/src/council.ts | 2 +- packages/apps-routing/src/democracy.ts | 2 +- packages/apps-routing/src/explorer.ts | 2 +- packages/apps-routing/src/extrinsics.ts | 2 +- packages/apps-routing/src/fellowship.ts | 2 +- packages/apps-routing/src/files.ts | 2 +- packages/apps-routing/src/gilt.ts | 2 +- packages/apps-routing/src/js.ts | 2 +- packages/apps-routing/src/membership.ts | 2 +- packages/apps-routing/src/nfts.ts | 2 +- packages/apps-routing/src/parachains.ts | 2 +- packages/apps-routing/src/poll.ts | 2 +- packages/apps-routing/src/preimages.ts | 2 +- packages/apps-routing/src/ranked.ts | 2 +- packages/apps-routing/src/referenda.ts | 2 +- packages/apps-routing/src/rpc.ts | 2 +- packages/apps-routing/src/runtime.ts | 2 +- packages/apps-routing/src/scheduler.ts | 2 +- packages/apps-routing/src/settings.ts | 2 +- packages/apps-routing/src/signing.ts | 2 +- packages/apps-routing/src/society.ts | 2 +- packages/apps-routing/src/staking.ts | 2 +- packages/apps-routing/src/staking2.ts | 2 +- packages/apps-routing/src/storage.ts | 2 +- packages/apps-routing/src/sudo.ts | 2 +- packages/apps-routing/src/techcomm.ts | 2 +- packages/apps-routing/src/teleport.ts | 2 +- packages/apps-routing/src/transfer.ts | 2 +- packages/apps-routing/src/treasury.ts | 2 +- packages/apps-routing/src/utilities.ts | 2 +- packages/apps-routing/src/whitelist.ts | 2 +- packages/apps/package.json | 6 +- .../apps/public/locales/en/react-params.json | 1 + packages/apps/src/Menu/index.tsx | 12 +- .../page-accounts/src/Accounts/Account.tsx | 48 +- packages/page-accounts/src/Accounts/index.tsx | 14 +- packages/page-accounts/src/Vanity/index.tsx | 6 +- .../src/modals/CreateEthDerivationPath.tsx | 4 +- .../src/modals/CreateSuriLedger.tsx | 10 +- .../page-accounts/src/modals/Delegate.tsx | 2 +- .../page-accounts/src/modals/IdentityMain.tsx | 12 +- .../page-accounts/src/modals/IdentitySub.tsx | 2 +- .../src/modals/InputValidateAmount.tsx | 2 +- packages/page-accounts/src/modals/Ledger.tsx | 12 +- .../src/modals/MultisigApprove.tsx | 12 +- .../page-accounts/src/modals/Transfer.tsx | 2 +- .../page-addresses/src/Contacts/index.tsx | 2 +- packages/page-alliance/src/Members/Join.tsx | 2 +- .../page-assets/src/Balances/Transfer.tsx | 2 +- packages/page-assets/src/Balances/index.tsx | 6 +- packages/page-assets/src/Overview/Assets.tsx | 12 +- packages/page-bounties/src/Bounties.tsx | 8 +- packages/page-bounties/src/Bounty.tsx | 4 +- .../src/BountyExtraActions/SlashCurator.tsx | 20 +- .../src/BountyExtraActions/index.tsx | 6 +- .../src/BountyInfos/VotingDescriptionInfo.tsx | 10 +- .../src/BountyInfos/VotingSummary.tsx | 4 +- packages/page-bounties/src/VotersColumn.tsx | 4 +- packages/page-claims/src/Claim.tsx | 2 +- packages/page-claims/src/Statement.tsx | 4 +- packages/page-claims/src/Warning.tsx | 4 +- packages/page-contracts/src/Codes/Add.tsx | 6 +- packages/page-contracts/src/Codes/Code.tsx | 2 +- packages/page-contracts/src/Codes/Upload.tsx | 8 +- .../page-contracts/src/Codes/ValidateCode.tsx | 4 +- packages/page-contracts/src/Codes/index.tsx | 4 +- packages/page-contracts/src/Contracts/Add.tsx | 2 +- .../page-contracts/src/Contracts/Call.tsx | 2 +- .../src/Contracts/ContractsTable.tsx | 4 +- .../page-contracts/src/Contracts/Deploy.tsx | 8 +- .../page-contracts/src/Contracts/index.tsx | 6 +- packages/page-contracts/src/index.tsx | 2 +- packages/page-council/src/Motions/index.tsx | 8 +- .../page-council/src/Overview/Candidates.tsx | 4 +- .../page-council/src/Overview/Members.tsx | 2 +- .../src/Overview/SubmitCandidacy.tsx | 2 +- packages/page-council/src/Overview/Vote.tsx | 2 +- .../page-democracy/src/Overview/Externals.tsx | 6 +- .../page-democracy/src/Overview/Proposals.tsx | 6 +- .../src/Overview/Referendums.tsx | 10 +- packages/page-explorer/src/BlockHeaders.tsx | 2 +- .../page-explorer/src/BlockInfo/ByHash.tsx | 8 +- .../src/BlockInfo/Extrinsics.tsx | 4 +- .../src/BlockInfo/Justifications.tsx | 2 +- packages/page-explorer/src/BlockInfo/Logs.tsx | 2 +- packages/page-explorer/src/NodeInfo/Peers.tsx | 6 +- packages/page-explorer/src/SummarySession.tsx | 2 +- packages/page-files/src/CrustFiles.tsx | 40 +- packages/page-gilt/src/Overview/Queues.tsx | 6 +- packages/page-gilt/src/Overview/Summary.tsx | 2 +- packages/page-js/src/Playground.tsx | 8 +- packages/page-nfts/src/AccountItems/index.tsx | 6 +- .../page-nfts/src/Overview/Collection.tsx | 2 +- .../page-nfts/src/Overview/Collections.tsx | 8 +- .../page-parachains/src/Auctions/Auction.tsx | 10 +- .../page-parachains/src/Crowdloan/Funds.tsx | 20 +- .../src/Overview/Parachains.tsx | 18 +- .../src/Parathreads/Parathread.tsx | 2 +- .../page-parachains/src/Parathreads/index.tsx | 10 +- .../src/Proposals/Proposals.tsx | 8 +- .../page-parachains/src/Proposals/Propose.tsx | 2 +- packages/page-poll/src/index.tsx | 34 +- .../page-preimages/src/Preimages/index.tsx | 6 +- packages/page-ranked/src/Members/index.tsx | 2 +- .../page-referenda/src/Referenda/Group.tsx | 2 +- .../src/Referenda/Referendum.tsx | 8 +- .../src/Referenda/Vote/index.tsx | 2 +- packages/page-scheduler/src/DispatchQueue.tsx | 4 +- packages/page-scheduler/src/Scheduler.tsx | 10 +- packages/page-settings/package.json | 2 +- packages/page-settings/src/Developer.tsx | 6 +- packages/page-settings/src/General.tsx | 8 +- .../page-settings/src/Metadata/Extensions.tsx | 2 +- .../src/Metadata/NetworkSpecs.tsx | 2 +- packages/page-society/src/Candidates/Bids.tsx | 8 +- .../src/Candidates/Candidates.tsx | 6 +- .../page-society/src/Overview/Defender.tsx | 2 +- .../src/Overview/DesignKusama.tsx | 2 +- packages/page-society/src/Overview/Member.tsx | 2 +- .../page-society/src/Overview/Members.tsx | 6 +- packages/page-society/src/Suspended/index.tsx | 8 +- .../Actions/Account/InputValidateAmount.tsx | 10 +- .../Account/InputValidationController.tsx | 8 +- .../Actions/Account/SetRewardDestination.tsx | 2 +- .../page-staking/src/Actions/Accounts.tsx | 8 +- packages/page-staking/src/Actions/Pools.tsx | 8 +- .../page-staking/src/Actions/destOptions.tsx | 8 +- packages/page-staking/src/Actions/index.tsx | 8 +- .../src/Actions/partials/Bond.tsx | 2 +- .../src/Actions/partials/Validate.tsx | 4 +- packages/page-staking/src/Bags/index.tsx | 22 +- packages/page-staking/src/Legend.tsx | 20 +- packages/page-staking/src/Payouts/index.tsx | 20 +- packages/page-staking/src/Pools/Pool.tsx | 12 +- packages/page-staking/src/Pools/Pools.tsx | 12 +- packages/page-staking/src/Slashes/Era.tsx | 18 +- packages/page-staking/src/Slashes/index.tsx | 2 +- .../page-staking/src/Targets/Validator.tsx | 6 +- packages/page-staking/src/Targets/index.tsx | 14 +- .../src/Validators/CurrentList.tsx | 14 +- .../page-staking/src/Validators/index.tsx | 8 +- .../page-staking2/src/Validators/index.tsx | 4 +- .../page-tech-comm/src/Overview/Members.tsx | 2 +- .../page-tech-comm/src/Proposals/index.tsx | 10 +- .../page-treasury/src/Overview/Proposal.tsx | 2 +- .../page-treasury/src/Overview/Proposals.tsx | 2 +- packages/page-treasury/src/Tips/Tip.tsx | 2 +- packages/page-treasury/src/Tips/Tips.tsx | 6 +- packages/page-whitelist/src/Hashes/index.tsx | 2 +- packages/react-components/package.json | 4 +- packages/react-components/src/AddressInfo.tsx | 4 +- .../src/IdentityIcon/index.tsx | 4 +- packages/react-components/src/Spinner.tsx | 2 +- packages/react-hooks/package.json | 2 +- packages/react-hooks/src/useIpfsFetch.ts | 2 +- packages/react-params/package.json | 2 +- .../react-params/src/Param/KeyValueArray.tsx | 8 +- packages/react-query/src/Chain.tsx | 2 +- yarn.lock | 446 +++++++++--------- 173 files changed, 966 insertions(+), 720 deletions(-) diff --git a/jest.config.cjs b/jest.config.cjs index 54e8e04df8..c66b2b1be3 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -9,14 +9,31 @@ const findPackages = require('./scripts/findPackages.cjs'); // ... TL;DR We still end up with a massive list here const ESM_PKG = [ // general packages - 'bail', 'character-entities', 'chart.js', 'comma-separated-tokens', 'decode-named-character-reference', 'hast-to-', 'hast-util-', 'hastscript', 'html-void-elements', 'is-plain-obj', 'mdast-', 'micromark', 'multiformats', 'property-information', 'react-markdown', 'rehype-raw', 'remark-parse', 'remark-rehype', 'space-separated-tokens', 'trough', 'uint8arrays', 'unified', 'unist-', 'vfile', 'vfile-', 'web-namespaces', 'zwitch', + 'bail', 'character-entities', 'chart.js', 'comma-separated-tokens', 'decode-named-character-reference', 'decode-uri-component', 'filter-obj', 'hast-to-', 'hast-util-', 'hastscript', 'html-void-elements', 'is-ipfs', 'is-plain-obj', 'mdast-', 'micromark', 'multiformats', 'property-information', 'query-string', 'react-markdown', 'rehype-raw', 'remark-parse', 'remark-rehype', 'space-separated-tokens', 'split-on-first', 'trough', 'uint8arrays', 'unified', 'unist-', 'vfile', 'vfile-', 'web-namespaces', 'zwitch', // type packages '@logion/node-api' ]; +// Jest does not support import maps... more issues +const MAP_ESM = { + 'is-ipfs': '/node_modules/is-ipfs/dist/src/index.js', + 'multiformats/basics': '/node_modules/multiformats/src/basics.js', + 'multiformats': '/node_modules/multiformats/src/index.js', + 'uint8arrays/to-string': '/node_modules/uint8arrays/src/to-string.js' +} + +// file mapping +const MAP_FILE = { + '\\.(css|less)$': 'empty/object', + '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object', + '\\.(md)$': '/jest/mocks/empty.js' +} + module.exports = { ...config, moduleNameMapper: { + ...MAP_ESM, + ...MAP_FILE, ...( findPackages() .filter(({ name }) => !['@polkadot/apps'].includes(name)) @@ -26,10 +43,7 @@ module.exports = { return modules; }, {}) ), - '@polkadot/apps/(.*)$': '/packages/apps/src/$1', - '\\.(css|less)$': 'empty/object', - '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': 'empty/object', - '\\.(md)$': '/jest/mocks/empty.js' + '@polkadot/apps/(.*)$': '/packages/apps/src/$1' }, setupFilesAfterEnv: ['/jest/setupEnv.cjs'], testEnvironment: 'jsdom', diff --git a/package.json b/package.json index 39556d971c..8843745099 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ "@babel/runtime": "^7.20.13", "@crustio/crust-pin": "^1.0.0", "@pinata/sdk": "^1.2.1", - "@polkadot/dev": "^0.68.3", + "@polkadot/dev": "^0.68.4", "@types/chart.js": "^2.9.37", "@types/file-saver": "^2.0.5", "@types/jest": "^29.4.0", @@ -83,7 +83,7 @@ "concurrently": "^7.6.0", "devtron": "^1.4.0", "dnslink-cloudflare": "^3.0.0", - "electron": "^21.3.5", + "electron": "^21.4.1", "electron-builder": "23.6.0", "electron-builder-notarize": "^1.5.1", "i18next-scanner": "^4.1.1", @@ -124,6 +124,6 @@ "@polkadot/x-ws": "^10.3.1", "babel-core": "^7.0.0-bridge.0", "styled-components": "^5.3.1", - "typescript": "^4.9.4" + "typescript": "^4.9.5" } } diff --git a/packages/apps-config/package.json b/packages/apps-config/package.json index 6d2e81513a..9523c51770 100644 --- a/packages/apps-config/package.json +++ b/packages/apps-config/package.json @@ -13,7 +13,7 @@ "version": "0.124.2-20-x", "main": "index.js", "dependencies": { - "@acala-network/type-definitions": "^4.1.8-1", + "@acala-network/type-definitions": "4.1.8-1", "@babel/runtime": "^7.20.13", "@bifrost-finance/type-definitions": "1.7.2", "@crustio/type-definitions": "1.3.0", @@ -23,13 +23,13 @@ "@docknetwork/node-types": "0.15.0", "@edgeware/node-types": "3.6.2-wako", "@equilab/definitions": "1.4.18", - "@frequency-chain/api-augment": "^1.0.0", - "@interlay/interbtc-types": "1.11.0", - "@kiltprotocol/type-definitions": "^0.30.0", + "@frequency-chain/api-augment": "1.2.0-rc1", + "@interlay/interbtc-types": "1.11.1", + "@kiltprotocol/type-definitions": "0.30.0", "@laminar/type-definitions": "0.3.1", - "@logion/node-api": "^0.9.0-3", - "@mangata-finance/types": "^0.17.0", - "@metaverse-network-sdk/type-definitions": "^0.0.1-13", + "@logion/node-api": "0.9.0-3", + "@mangata-finance/types": "0.17.0", + "@metaverse-network-sdk/type-definitions": "0.0.1-13", "@parallel-finance/type-definitions": "1.7.14", "@phala/typedefs": "0.2.33", "@polkadot/api": "^9.13.5", @@ -40,14 +40,13 @@ "@polkadot/x-fetch": "^10.3.1", "@polymathnetwork/polymesh-types": "0.0.2", "@snowfork/snowbridge-types": "0.2.7", - "@sora-substrate/type-definitions": "1.12.4", - "@subsocial/definitions": "^0.7.9", - "@unique-nft/opal-testnet-types": "930.34.0", - "@unique-nft/quartz-mainnet-types": "930.34.0", + "@sora-substrate/type-definitions": "1.14.2", + "@subsocial/definitions": "0.7.11", + "@unique-nft/opal-testnet-types": "936.50.4", + "@unique-nft/quartz-mainnet-types": "936.50.4", "@unique-nft/unique-mainnet-types": "930.33.0", - "@zeitgeistpm/type-defs": "0.10.0", + "@zeitgeistpm/type-defs": "1.0.0", "@zeroio/type-definitions": "0.0.14", - "lodash": "^4.17.21", "moonbeam-types-bundle": "2.0.9", "pontem-types-bundle": "1.0.15", "rxjs": "^7.8.0" diff --git a/packages/apps-config/src/api/typesBundle.ts b/packages/apps-config/src/api/typesBundle.ts index 881241a16c..79338ebcce 100644 --- a/packages/apps-config/src/api/typesBundle.ts +++ b/packages/apps-config/src/api/typesBundle.ts @@ -51482,6 +51482,34 @@ export const typesBundle = { } }, "reward": { + "estimateEscrowRewardRate": { + "description": "Estimate the escrow reward rate for a given account", + "params": [ + { + "name": "account_id", + "type": "AccountId" + }, + { + "name": "amount", + "type": "Option" + }, + { + "name": "lock_time", + "type": "Option" + } + ], + "type": "UnsignedFixedPoint" + }, + "estimateVaultRewardRate": { + "description": "Estimate the vault reward rate a given vault id", + "params": [ + { + "name": "vault_id", + "type": "VaultId" + } + ], + "type": "UnsignedFixedPoint" + }, "computeEscrowReward": { "description": "Get a given user's rewards due", "params": [ @@ -51963,6 +51991,34 @@ export const typesBundle = { } }, "reward": { + "estimateEscrowRewardRate": { + "description": "Estimate the escrow reward rate for a given account", + "params": [ + { + "name": "account_id", + "type": "AccountId" + }, + { + "name": "amount", + "type": "Option" + }, + { + "name": "lock_time", + "type": "Option" + } + ], + "type": "UnsignedFixedPoint" + }, + "estimateVaultRewardRate": { + "description": "Estimate the vault reward rate a given vault id", + "params": [ + { + "name": "vault_id", + "type": "VaultId" + } + ], + "type": "UnsignedFixedPoint" + }, "computeEscrowReward": { "description": "Get a given user's rewards due", "params": [ @@ -52444,6 +52500,34 @@ export const typesBundle = { } }, "reward": { + "estimateEscrowRewardRate": { + "description": "Estimate the escrow reward rate for a given account", + "params": [ + { + "name": "account_id", + "type": "AccountId" + }, + { + "name": "amount", + "type": "Option" + }, + { + "name": "lock_time", + "type": "Option" + } + ], + "type": "UnsignedFixedPoint" + }, + "estimateVaultRewardRate": { + "description": "Estimate the vault reward rate a given vault id", + "params": [ + { + "name": "vault_id", + "type": "VaultId" + } + ], + "type": "UnsignedFixedPoint" + }, "computeEscrowReward": { "description": "Get a given user's rewards due", "params": [ @@ -54063,6 +54147,34 @@ export const typesBundle = { } }, "reward": { + "estimateEscrowRewardRate": { + "description": "Estimate the escrow reward rate for a given account", + "params": [ + { + "name": "account_id", + "type": "AccountId" + }, + { + "name": "amount", + "type": "Option" + }, + { + "name": "lock_time", + "type": "Option" + } + ], + "type": "UnsignedFixedPoint" + }, + "estimateVaultRewardRate": { + "description": "Estimate the vault reward rate a given vault id", + "params": [ + { + "name": "vault_id", + "type": "VaultId" + } + ], + "type": "UnsignedFixedPoint" + }, "computeEscrowReward": { "description": "Get a given user's rewards due", "params": [ @@ -65722,6 +65834,29 @@ export const typesBundle = { } ], "type": "Option" + }, + "allowanceForAll": { + "description": "Tells whether the given `owner` approves the `operator`.", + "params": [ + { + "name": "collection", + "type": "u32" + }, + { + "name": "owner", + "type": "PalletEvmAccountBasicCrossAccountIdRepr" + }, + { + "name": "operator", + "type": "PalletEvmAccountBasicCrossAccountIdRepr" + }, + { + "name": "at", + "type": "Hash", + "isOptional": true + } + ], + "type": "Option" } } } @@ -69028,6 +69163,29 @@ export const typesBundle = { } ], "type": "Option" + }, + "allowanceForAll": { + "description": "Tells whether the given `owner` approves the `operator`.", + "params": [ + { + "name": "collection", + "type": "u32" + }, + { + "name": "owner", + "type": "PalletEvmAccountBasicCrossAccountIdRepr" + }, + { + "name": "operator", + "type": "PalletEvmAccountBasicCrossAccountIdRepr" + }, + { + "name": "at", + "type": "Hash", + "isOptional": true + } + ], + "type": "Option" } } } @@ -70985,7 +71143,8 @@ export const typesBundle = { "DAI", "ETH", "XSTUSD", - "XST" + "XST", + "TBCD" ] }, "RewardInfo": { @@ -72629,7 +72788,8 @@ export const typesBundle = { "DAI", "ETH", "XSTUSD", - "XST" + "XST", + "TBCD" ] }, "RewardInfo": { @@ -75402,6 +75562,34 @@ export const typesBundle = { } }, "reward": { + "estimateEscrowRewardRate": { + "description": "Estimate the escrow reward rate for a given account", + "params": [ + { + "name": "account_id", + "type": "AccountId" + }, + { + "name": "amount", + "type": "Option" + }, + { + "name": "lock_time", + "type": "Option" + } + ], + "type": "UnsignedFixedPoint" + }, + "estimateVaultRewardRate": { + "description": "Estimate the vault reward rate a given vault id", + "params": [ + { + "name": "vault_id", + "type": "VaultId" + } + ], + "type": "UnsignedFixedPoint" + }, "computeEscrowReward": { "description": "Get a given user's rewards due", "params": [ @@ -75883,6 +76071,34 @@ export const typesBundle = { } }, "reward": { + "estimateEscrowRewardRate": { + "description": "Estimate the escrow reward rate for a given account", + "params": [ + { + "name": "account_id", + "type": "AccountId" + }, + { + "name": "amount", + "type": "Option" + }, + { + "name": "lock_time", + "type": "Option" + } + ], + "type": "UnsignedFixedPoint" + }, + "estimateVaultRewardRate": { + "description": "Estimate the vault reward rate a given vault id", + "params": [ + { + "name": "vault_id", + "type": "VaultId" + } + ], + "type": "UnsignedFixedPoint" + }, "computeEscrowReward": { "description": "Get a given user's rewards due", "params": [ diff --git a/packages/apps-electron/package.json b/packages/apps-electron/package.json index 2eea7b5e81..4c4692c9e0 100644 --- a/packages/apps-electron/package.json +++ b/packages/apps-electron/package.json @@ -14,15 +14,15 @@ "dependencies": { "@babel/core": "^7.20.12", "@babel/polyfill": "^7.12.1", - "@polkadot/dev": "^0.68.3", + "@polkadot/dev": "^0.68.4", "@polkadot/react-components": "^0.124.2-20-x", - "electron-log": "^4.4.8", + "electron-log": "^5.0.0-beta.16", "electron-updater": "^5.3.0" }, "devDependencies": { "@types/react-dom": "^18.0.10", "@types/tmp": "^0.2.3", - "babel-loader": "^8.3.0", + "babel-loader": "^9.1.2", "copy-webpack-plugin": "^11.0.0", "html-webpack-plugin": "^5.5.0", "react": "^18.2.0", diff --git a/packages/apps-routing/src/accounts.ts b/packages/apps-routing/src/accounts.ts index 871d0e7aeb..0c3cdf6e33 100644 --- a/packages/apps-routing/src/accounts.ts +++ b/packages/apps-routing/src/accounts.ts @@ -15,7 +15,7 @@ export default function create (t: TFunction): Route { group: 'accounts', icon: 'users', name: 'accounts', - text: t('nav.accounts', 'Accounts', { ns: 'apps-routing' }), + text: t('nav.accounts', 'Accounts', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/addresses.ts b/packages/apps-routing/src/addresses.ts index 9e08fe8715..769e07d792 100644 --- a/packages/apps-routing/src/addresses.ts +++ b/packages/apps-routing/src/addresses.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'accounts', icon: 'address-card', name: 'addresses', - text: t('nav.addresses', 'Address book', { ns: 'apps-routing' }) + text: t('nav.addresses', 'Address book', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/alliance.ts b/packages/apps-routing/src/alliance.ts index e9d7917aad..49e47df0e9 100644 --- a/packages/apps-routing/src/alliance.ts +++ b/packages/apps-routing/src/alliance.ts @@ -17,7 +17,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'people-group', name: 'alliance', - text: t('nav.alliance', 'Alliance', { ns: 'apps-routing' }), + text: t('nav.alliance', 'Alliance', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/assets.ts b/packages/apps-routing/src/assets.ts index 7b6257178b..b532071e00 100644 --- a/packages/apps-routing/src/assets.ts +++ b/packages/apps-routing/src/assets.ts @@ -18,6 +18,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'shopping-basket', name: 'assets', - text: t('nav.assets', 'Assets', { ns: 'apps-routing' }) + text: t('nav.assets', 'Assets', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/bounties.ts b/packages/apps-routing/src/bounties.ts index 0cbf52231e..9978d92805 100644 --- a/packages/apps-routing/src/bounties.ts +++ b/packages/apps-routing/src/bounties.ts @@ -17,7 +17,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'coins', name: 'bounties', - text: t('nav.bounties', 'Bounties', { ns: 'apps-routing' }), + text: t('nav.bounties', 'Bounties', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/calendar.ts b/packages/apps-routing/src/calendar.ts index 1ecfce6b63..fff7c6f017 100644 --- a/packages/apps-routing/src/calendar.ts +++ b/packages/apps-routing/src/calendar.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'calendar-alt', name: 'calendar', - text: t('nav.calendar', 'Event calendar', { ns: 'apps-routing' }) + text: t('nav.calendar', 'Event calendar', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/claims.ts b/packages/apps-routing/src/claims.ts index 1b12463dfc..554b94e7b9 100644 --- a/packages/apps-routing/src/claims.ts +++ b/packages/apps-routing/src/claims.ts @@ -18,7 +18,7 @@ export default function create (t: TFunction): Route { group: 'accounts', icon: 'star', name: 'claims', - text: t('nav.claims', 'Claim Tokens', { ns: 'apps-routing' }), + text: t('nav.claims', 'Claim Tokens', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/collator.ts b/packages/apps-routing/src/collator.ts index 6a71cc1343..59032316e6 100644 --- a/packages/apps-routing/src/collator.ts +++ b/packages/apps-routing/src/collator.ts @@ -17,6 +17,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'timeline', name: 'collators', - text: t('nav.collator', 'Collators', { ns: 'apps-routing' }) + text: t('nav.collator', 'Collators', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/contracts.ts b/packages/apps-routing/src/contracts.ts index 229e6b4579..4914f89d58 100644 --- a/packages/apps-routing/src/contracts.ts +++ b/packages/apps-routing/src/contracts.ts @@ -32,6 +32,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'compress', name: 'contracts', - text: t('nav.contracts', 'Contracts', { ns: 'apps-routing' }) + text: t('nav.contracts', 'Contracts', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/council.ts b/packages/apps-routing/src/council.ts index f9557b819a..e21385e662 100644 --- a/packages/apps-routing/src/council.ts +++ b/packages/apps-routing/src/council.ts @@ -18,7 +18,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'building', name: 'council', - text: t('nav.council', 'Council', { ns: 'apps-routing' }), + text: t('nav.council', 'Council', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/democracy.ts b/packages/apps-routing/src/democracy.ts index 12307fafad..77b1df4dc0 100644 --- a/packages/apps-routing/src/democracy.ts +++ b/packages/apps-routing/src/democracy.ts @@ -32,7 +32,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'calendar-check', name: 'democracy', - text: t('nav.democracy', 'Democracy', { ns: 'apps-routing' }), + text: t('nav.democracy', 'Democracy', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/explorer.ts b/packages/apps-routing/src/explorer.ts index 7bc79b6442..72052689c6 100644 --- a/packages/apps-routing/src/explorer.ts +++ b/packages/apps-routing/src/explorer.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'braille', name: 'explorer', - text: t('nav.explorer', 'Explorer', { ns: 'apps-routing' }) + text: t('nav.explorer', 'Explorer', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/extrinsics.ts b/packages/apps-routing/src/extrinsics.ts index 77875fa3bd..9cee811add 100644 --- a/packages/apps-routing/src/extrinsics.ts +++ b/packages/apps-routing/src/extrinsics.ts @@ -16,6 +16,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'envelope-open-text', name: 'extrinsics', - text: t('nav.extrinsics', 'Extrinsics', { ns: 'apps-routing' }) + text: t('nav.extrinsics', 'Extrinsics', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/fellowship.ts b/packages/apps-routing/src/fellowship.ts index 3726949341..7f9d15af19 100644 --- a/packages/apps-routing/src/fellowship.ts +++ b/packages/apps-routing/src/fellowship.ts @@ -20,7 +20,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'people-arrows', name: 'fellowship', - text: t('nav.fellowship', 'Fellowship', { ns: 'apps-routing' }), + text: t('nav.fellowship', 'Fellowship', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/files.ts b/packages/apps-routing/src/files.ts index 62d62c39db..ad2d2b6299 100644 --- a/packages/apps-routing/src/files.ts +++ b/packages/apps-routing/src/files.ts @@ -16,6 +16,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'file', name: 'files', - text: t('nav.files', 'Files (IPFS)', { ns: 'apps-routing' }) + text: t('nav.files', 'Files (IPFS)', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/gilt.ts b/packages/apps-routing/src/gilt.ts index a5f803d0ed..859cce1be5 100644 --- a/packages/apps-routing/src/gilt.ts +++ b/packages/apps-routing/src/gilt.ts @@ -18,6 +18,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'leaf', name: 'gilt', - text: t('nav.gilt', 'Gilt', { ns: 'apps-routing' }) + text: t('nav.gilt', 'Gilt', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/js.ts b/packages/apps-routing/src/js.ts index 0b73aabbc2..ef02c303b5 100644 --- a/packages/apps-routing/src/js.ts +++ b/packages/apps-routing/src/js.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'code', name: 'js', - text: t('nav.js', 'JavaScript', { ns: 'apps-routing' }) + text: t('nav.js', 'JavaScript', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/membership.ts b/packages/apps-routing/src/membership.ts index 7bba296f8f..1e3356c5ca 100644 --- a/packages/apps-routing/src/membership.ts +++ b/packages/apps-routing/src/membership.ts @@ -18,7 +18,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'people-carry', name: 'membership', - text: t('nav.membership', 'Membership', { ns: 'apps-routing' }), + text: t('nav.membership', 'Membership', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/nfts.ts b/packages/apps-routing/src/nfts.ts index db1db8ea5c..2d7b4d8a90 100644 --- a/packages/apps-routing/src/nfts.ts +++ b/packages/apps-routing/src/nfts.ts @@ -17,6 +17,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'shopping-cart', name: 'nfts', - text: t('nav.nfts', 'NFTs', { ns: 'apps-routing' }) + text: t('nav.nfts', 'NFTs', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/parachains.ts b/packages/apps-routing/src/parachains.ts index 1118b48822..5dad7ec663 100644 --- a/packages/apps-routing/src/parachains.ts +++ b/packages/apps-routing/src/parachains.ts @@ -18,6 +18,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'link', name: 'parachains', - text: t('nav.parachains', 'Parachains', { ns: 'apps-routing' }) + text: t('nav.parachains', 'Parachains', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/poll.ts b/packages/apps-routing/src/poll.ts index 88c6832fcb..c6acd58c3f 100644 --- a/packages/apps-routing/src/poll.ts +++ b/packages/apps-routing/src/poll.ts @@ -18,6 +18,6 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'podcast', name: 'poll', - text: t('nav.poll', 'Token poll', { ns: 'apps-routing' }) + text: t('nav.poll', 'Token poll', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/preimages.ts b/packages/apps-routing/src/preimages.ts index e2c1002a75..5daaa38f66 100644 --- a/packages/apps-routing/src/preimages.ts +++ b/packages/apps-routing/src/preimages.ts @@ -18,6 +18,6 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'panorama', name: 'preimages', - text: t('nav.preimages', 'Preimages', { ns: 'apps-routing' }) + text: t('nav.preimages', 'Preimages', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/ranked.ts b/packages/apps-routing/src/ranked.ts index ffa7c99d34..3006e256cb 100644 --- a/packages/apps-routing/src/ranked.ts +++ b/packages/apps-routing/src/ranked.ts @@ -19,7 +19,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'people-arrows', name: 'ranked', - text: t('nav.ranked', 'Ranked collective', { ns: 'apps-routing' }), + text: t('nav.ranked', 'Ranked collective', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/referenda.ts b/packages/apps-routing/src/referenda.ts index b491adb0b0..86a2cda61a 100644 --- a/packages/apps-routing/src/referenda.ts +++ b/packages/apps-routing/src/referenda.ts @@ -19,7 +19,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'person-booth', name: 'referenda', - text: t('nav.referenda', 'Referenda', { ns: 'apps-routing' }), + text: t('nav.referenda', 'Referenda', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/rpc.ts b/packages/apps-routing/src/rpc.ts index 7b1af6647b..8dd6783ba8 100644 --- a/packages/apps-routing/src/rpc.ts +++ b/packages/apps-routing/src/rpc.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'network-wired', name: 'rpc', - text: t('nav.rpc', 'RPC calls', { ns: 'apps-routing' }) + text: t('nav.rpc', 'RPC calls', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/runtime.ts b/packages/apps-routing/src/runtime.ts index 9128aefacd..a2a1a84aaa 100644 --- a/packages/apps-routing/src/runtime.ts +++ b/packages/apps-routing/src/runtime.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'arrows-to-circle', name: 'runtime', - text: t('nav.runtime', 'Runtime calls', { ns: 'apps-routing' }) + text: t('nav.runtime', 'Runtime calls', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/scheduler.ts b/packages/apps-routing/src/scheduler.ts index e371102202..9dd3fb502d 100644 --- a/packages/apps-routing/src/scheduler.ts +++ b/packages/apps-routing/src/scheduler.ts @@ -17,6 +17,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'clock', name: 'scheduler', - text: t('nav.scheduler', 'Scheduler', { ns: 'apps-routing' }) + text: t('nav.scheduler', 'Scheduler', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/settings.ts b/packages/apps-routing/src/settings.ts index b360d5981e..0bb6616fef 100644 --- a/packages/apps-routing/src/settings.ts +++ b/packages/apps-routing/src/settings.ts @@ -13,7 +13,7 @@ export default function create (t: TFunction): Route { group: 'settings', icon: 'cogs', name: 'settings', - text: t('nav.settings', 'Settings', { ns: 'apps-routing' }), + text: t('nav.settings', 'Settings', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/signing.ts b/packages/apps-routing/src/signing.ts index 27f4a7b526..675afb69bb 100644 --- a/packages/apps-routing/src/signing.ts +++ b/packages/apps-routing/src/signing.ts @@ -16,6 +16,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'signature', name: 'signing', - text: t('nav.signing', 'Sign and verify', { ns: 'apps-routing' }) + text: t('nav.signing', 'Sign and verify', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/society.ts b/packages/apps-routing/src/society.ts index dbcd9f834d..3f42f4eb59 100644 --- a/packages/apps-routing/src/society.ts +++ b/packages/apps-routing/src/society.ts @@ -18,7 +18,7 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'hand-spock', name: 'society', - text: t('nav.society', 'Society', { ns: 'apps-routing' }), + text: t('nav.society', 'Society', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/staking.ts b/packages/apps-routing/src/staking.ts index 463076dd55..dbb79034a2 100644 --- a/packages/apps-routing/src/staking.ts +++ b/packages/apps-routing/src/staking.ts @@ -51,6 +51,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'certificate', name: 'staking', - text: t('nav.staking', 'Staking', { ns: 'apps-routing' }) + text: t('nav.staking', 'Staking', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/staking2.ts b/packages/apps-routing/src/staking2.ts index 4946b520b3..532534a52c 100644 --- a/packages/apps-routing/src/staking2.ts +++ b/packages/apps-routing/src/staking2.ts @@ -53,6 +53,6 @@ export default function create (t: TFunction): Route { group: 'network', icon: 'certificate', name: 'test-staking', - text: t('nav.staking', 'Staking', { ns: 'apps-routing' }) + text: t('nav.staking', 'Staking', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/storage.ts b/packages/apps-routing/src/storage.ts index a29dbb3035..b4c9944968 100644 --- a/packages/apps-routing/src/storage.ts +++ b/packages/apps-routing/src/storage.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'database', name: 'chainstate', - text: t('nav.storage', 'Chain state', { ns: 'apps-routing' }) + text: t('nav.storage', 'Chain state', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/sudo.ts b/packages/apps-routing/src/sudo.ts index eb10c17c35..e61817520b 100644 --- a/packages/apps-routing/src/sudo.ts +++ b/packages/apps-routing/src/sudo.ts @@ -19,6 +19,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'unlock', name: 'sudo', - text: t('nav.sudo', 'Sudo', { ns: 'apps-routing' }) + text: t('nav.sudo', 'Sudo', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/techcomm.ts b/packages/apps-routing/src/techcomm.ts index da782d8efe..b8e2fb926d 100644 --- a/packages/apps-routing/src/techcomm.ts +++ b/packages/apps-routing/src/techcomm.ts @@ -19,7 +19,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'microchip', name: 'techcomm', - text: t('nav.tech-comm', 'Tech. comm.', { ns: 'apps-routing' }), + text: t('nav.tech-comm', 'Tech. comm.', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/teleport.ts b/packages/apps-routing/src/teleport.ts index b8c6308cdc..67dcc2cafe 100644 --- a/packages/apps-routing/src/teleport.ts +++ b/packages/apps-routing/src/teleport.ts @@ -28,6 +28,6 @@ export default function create (t: TFunction): Route { group: 'accounts', icon: 'share-square', name: 'teleport', - text: t('nav.teleport', 'Teleport', { ns: 'apps-routing' }) + text: t('nav.teleport', 'Teleport', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/transfer.ts b/packages/apps-routing/src/transfer.ts index 5ee5eebd10..4f7e4b0b0d 100644 --- a/packages/apps-routing/src/transfer.ts +++ b/packages/apps-routing/src/transfer.ts @@ -20,6 +20,6 @@ export default function create (t: TFunction): Route { group: 'accounts', icon: 'paper-plane', name: 'transfer', - text: t('nav.transfer', 'Transfer', { ns: 'apps-routing' }) + text: t('nav.transfer', 'Transfer', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/treasury.ts b/packages/apps-routing/src/treasury.ts index fb25898820..734e89509f 100644 --- a/packages/apps-routing/src/treasury.ts +++ b/packages/apps-routing/src/treasury.ts @@ -17,7 +17,7 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'gem', name: 'treasury', - text: t('nav.treasury', 'Treasury', { ns: 'apps-routing' }), + text: t('nav.treasury', 'Treasury', { ns: 'apps-routing' }), useCounter }; } diff --git a/packages/apps-routing/src/utilities.ts b/packages/apps-routing/src/utilities.ts index 780be0c2c7..e30243af1f 100644 --- a/packages/apps-routing/src/utilities.ts +++ b/packages/apps-routing/src/utilities.ts @@ -15,6 +15,6 @@ export default function create (t: TFunction): Route { group: 'developer', icon: 'wrench', name: 'utilities', - text: t('nav.utilities', 'Utilities', { ns: 'apps-routing' }) + text: t('nav.utilities', 'Utilities', { ns: 'apps-routing' }) }; } diff --git a/packages/apps-routing/src/whitelist.ts b/packages/apps-routing/src/whitelist.ts index 7cb0b2f2f9..e01d00547d 100644 --- a/packages/apps-routing/src/whitelist.ts +++ b/packages/apps-routing/src/whitelist.ts @@ -18,6 +18,6 @@ export default function create (t: TFunction): Route { group: 'governance', icon: 'list-check', name: 'whitelist', - text: t('nav.whitelist', 'Whitelist', { ns: 'apps-routing' }) + text: t('nav.whitelist', 'Whitelist', { ns: 'apps-routing' }) }; } diff --git a/packages/apps/package.json b/packages/apps/package.json index abdcf2dc6f..f00d11a02b 100644 --- a/packages/apps/package.json +++ b/packages/apps/package.json @@ -18,7 +18,7 @@ "@babel/runtime": "^7.20.13", "@polkadot/apps-config": "^0.124.2-20-x", "@polkadot/apps-routing": "^0.124.2-20-x", - "@polkadot/dev": "^0.68.3", + "@polkadot/dev": "^0.68.4", "@polkadot/react-api": "^0.124.2-20-x", "@polkadot/react-components": "^0.124.2-20-x", "@polkadot/react-hooks": "^0.124.2-20-x", @@ -26,12 +26,12 @@ "@polkadot/react-query": "^0.124.2-20-x", "@polkadot/react-signer": "^0.124.2-20-x", "punycode": "^2.3.0", - "query-string": "^7.1.3" + "query-string": "^8.1.0" }, "devDependencies": { "@types/punycode": "^2.1.0", "assert": "^2.0.0", - "babel-loader": "^8.3.0", + "babel-loader": "^9.1.2", "buffer": "^6.0.3", "copy-webpack-plugin": "^11.0.0", "crypto-browserify": "^3.12.0", diff --git a/packages/apps/public/locales/en/react-params.json b/packages/apps/public/locales/en/react-params.json index 7ae4ea127d..b4cd945852 100644 --- a/packages/apps/public/locales/en/react-params.json +++ b/packages/apps/public/locales/en/react-params.json @@ -16,6 +16,7 @@ "Yes": "Yes", "aye: bool": "aye: bool", "call hash / {{section}}.{{method}}": "call hash / {{section}}.{{method}}", + "click to select or drag and drop JSON key/value (hex-encoded) file": "click to select or drag and drop JSON key/value (hex-encoded) file", "conviction: Conviction": "conviction: Conviction", "details": "details", "file upload": "file upload", diff --git a/packages/apps/src/Menu/index.tsx b/packages/apps/src/Menu/index.tsx index 67fb48a1e8..36c1870a36 100644 --- a/packages/apps/src/Menu/index.tsx +++ b/packages/apps/src/Menu/index.tsx @@ -99,12 +99,12 @@ function Menu ({ className = '' }: Props): React.ReactElement { const routeRef = useRef(createRoutes(t)); const groupRef = useRef({ - accounts: t('Accounts'), - developer: t('Developer'), - files: t('Files'), - governance: t('Governance'), - network: t('Network'), - settings: t('Settings') + accounts: t('Accounts'), + developer: t('Developer'), + files: t('Files'), + governance: t('Governance'), + network: t('Network'), + settings: t('Settings') }); const hasSudo = useMemo( diff --git a/packages/page-accounts/src/Accounts/Account.tsx b/packages/page-accounts/src/Accounts/Account.tsx index 730bab3515..5003ced46f 100644 --- a/packages/page-accounts/src/Accounts/Account.tsx +++ b/packages/page-accounts/src/Accounts/Account.tsx @@ -307,7 +307,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Set on-chain identity')} onClick={toggleIdentityMain} /> ), @@ -315,7 +315,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Set on-chain sub-identities')} onClick={toggleIdentitySub} /> ), @@ -323,7 +323,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Clear expired democracy locks')} onClick={_clearDemocracyLocks} /> ), @@ -331,7 +331,7 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Clear expired referenda locks')} onClick={_clearReferendaLocks} /> ), @@ -339,17 +339,17 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Unlock vested amount')} onClick={_vestingVest} /> ) - ], t('Identity')), + ], t('Identity')), createMenuGroup('deriveGroup', [ !(isEthereum || isExternal || isHardware || isInjected || isMultisig || api.isEthereum) && ( ('Derive account via derivation path')} onClick={toggleDerive} /> ), @@ -357,17 +357,17 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Show address on hardware device')} onClick={_showOnHardware} /> ) - ], t('Derive')), + ], t('Derive')), createMenuGroup('backupGroup', [ !(isExternal || isHardware || isInjected || isMultisig || isDevelopment) && ( ('Create a backup file for this account')} onClick={toggleBackup} /> ), @@ -383,56 +383,56 @@ function Account ({ account: { address, meta }, className = '', delegation, filt ('Forget this account')} onClick={toggleForget} /> ) - ], t('Backup')), + ], t('Backup')), isFunction(api.api.tx.recovery?.createRecovery) && createMenuGroup('reoveryGroup', [ !recoveryInfo && ( ('Make recoverable')} onClick={toggleRecoverSetup} /> ), ('Initiate recovery for another')} onClick={toggleRecoverAccount} /> - ], t('Recovery')), + ], t('Recovery')), isFunction(api.api.tx.multisig?.asMulti) && isMultisig && createMenuGroup('multisigGroup', [ ('Multisig approvals')} onClick={toggleMultisig} /> - ], t('Multisig')), + ], t('Multisig')), isFunction(api.api.query.democracy?.votingOf) && delegation?.accountDelegated && createMenuGroup('undelegateGroup', [ ('Change democracy delegation')} onClick={toggleDelegate} />, ('Undelegate')} onClick={toggleUndelegate} /> - ], t('Undelegate')), + ], t('Undelegate')), createMenuGroup('delegateGroup', [ isFunction(api.api.query.democracy?.votingOf) && !delegation?.accountDelegated && ( ('Delegate democracy votes')} onClick={toggleDelegate} /> ), @@ -441,13 +441,13 @@ function Account ({ account: { address, meta }, className = '', delegation, filt icon='sitemap' key='proxy-overview' label={proxy?.[0].length - ? t('Manage proxies') - : t('Add proxy') + ? t('Manage proxies') + : t('Add proxy') } onClick={toggleProxyOverview} /> ) - ], t('Delegate')), + ], t('Delegate')), isEditable && !api.isDevelopment && createMenuGroup('genesisGroup', [ void)?][]> => { const ret: Record void)?][]> = { - accounts: [[<>{t('accounts')}
{t('all locally stored accounts')}
]], - hardware: [[<>{t('hardware')}
{t('accounts managed via hardware devices')}
]], - injected: [[<>{t('extension')}
{t('accounts available via browser extensions')}
]], - multisig: [[<>{t('multisig')}
{t('on-chain multisig accounts')}
]], - proxied: [[<>{t('proxied')}
{t('on-chain proxied accounts')}
]], - qr: [[<>{t('via qr')}
{t('accounts available via mobile devices')}
]], - testing: [[<>{t('development')}
{t('accounts derived via development seeds')}
]] + accounts: [[<>{t('accounts')}
{t('all locally stored accounts')}
]], + hardware: [[<>{t('hardware')}
{t('accounts managed via hardware devices')}
]], + injected: [[<>{t('extension')}
{t('accounts available via browser extensions')}
]], + multisig: [[<>{t('multisig')}
{t('on-chain multisig accounts')}
]], + proxied: [[<>{t('proxied')}
{t('on-chain proxied accounts')}
]], + qr: [[<>{t('via qr')}
{t('accounts available via mobile devices')}
]], + testing: [[<>{t('development')}
{t('accounts derived via development seeds')}
]] }; Object.values(ret).forEach((a): void => { diff --git a/packages/page-accounts/src/Vanity/index.tsx b/packages/page-accounts/src/Vanity/index.tsx index 6b4a94fb47..15d0d2e5ac 100644 --- a/packages/page-accounts/src/Vanity/index.tsx +++ b/packages/page-accounts/src/Vanity/index.tsx @@ -172,15 +172,15 @@ function VanityApp ({ className = '', onStatusChange }: Props): React.ReactEleme const header = useMemo<[React.ReactNode?, string?, number?][]>( () => [ - [t('matches'), 'start', 2], - [t('Evaluated {{count}} keys in {{elapsed}}s ({{avg}} keys/s)', { + [t('matches'), 'start', 2], + [t('Evaluated {{count}} keys in {{elapsed}}s ({{avg}} keys/s)', { replace: { avg: (keyCount / (elapsed / 1000)).toFixed(3), count: keyCount, elapsed: (elapsed / 1000).toFixed(2) } }), 'start --digits'], - [t('secret'), 'start'], + [t('secret'), 'start'], [] ], [elapsed, keyCount, t] diff --git a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx index ee6213461f..8de78f7a31 100644 --- a/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx +++ b/packages/page-accounts/src/modals/CreateEthDerivationPath.tsx @@ -32,7 +32,7 @@ function CreateEthDerivationPath ({ className, derivePath, deriveValidation, onC .fill(0) .map((_, i) => ({ key: i, - text: t('Address index {{index}}', { + text: t('Address index {{index}}', { replace: { index: i } }), value: i @@ -82,7 +82,7 @@ function CreateEthDerivationPath ({ className, derivePath, deriveValidation, onC ) : ( ('address index')} onChange={setAddIndex} options={addressList} value={addIndex} diff --git a/packages/page-accounts/src/modals/CreateSuriLedger.tsx b/packages/page-accounts/src/modals/CreateSuriLedger.tsx index 5eb5959acd..4c3aaafd39 100644 --- a/packages/page-accounts/src/modals/CreateSuriLedger.tsx +++ b/packages/page-accounts/src/modals/CreateSuriLedger.tsx @@ -29,12 +29,12 @@ function CreateSuriLedger ({ className, onChange, seedType }: Props): React.Reac }))); const accOps = useRef(AVAIL_INDEXES.map((value) => ({ - text: t('Account type {{index}}', { replace: { index: value } }), + text: t('Account type {{index}}', { replace: { index: value } }), value }))); const addOps = useRef(AVAIL_INDEXES.map((value) => ({ - text: t('Address index {{index}}', { replace: { index: value } }), + text: t('Address index {{index}}', { replace: { index: value } }), value }))); @@ -53,19 +53,19 @@ function CreateSuriLedger ({ className, onChange, seedType }: Props): React.Reac ? ( <> ('Ledger app type (originated from)')} onChange={setChainType} options={netOpts.current} value={chainType} /> ('account type')} onChange={setAccIndex} options={accOps.current} value={accIndex} /> ('address index')} onChange={setAddIndex} options={addOps.current} value={addIndex} diff --git a/packages/page-accounts/src/modals/Delegate.tsx b/packages/page-accounts/src/modals/Delegate.tsx index 55a24a220d..8099dda522 100644 --- a/packages/page-accounts/src/modals/Delegate.tsx +++ b/packages/page-accounts/src/modals/Delegate.tsx @@ -73,7 +73,7 @@ function Delegate ({ onClose, previousAmount, previousConviction, previousDelega value={delegatedAccount} /> - + ('The amount to allocate and the conviction that will be applied to all votes made on a referendum.')}> ('display name')} maxLength={32} onChange={setValDisplay} - placeholder={t('My On-Chain Name')} + placeholder={t('My On-Chain Name')} value={valDisplay} /> ('Full Legal Name')} value={hasLegal ? valLegal : ''} /> ('somebody@example.com')} value={hasEmail ? valEmail : ''} /> ('https://example.com')} value={hasWeb ? valWeb : ''} /> } onChange={setValTwitter} - placeholder={t('@YourTwitterName')} + placeholder={t('@YourTwitterName')} value={hasTwitter ? valTwitter : ''} /> ('@yourname:matrix.org')} value={hasRiot ? valRiot : ''} /> {!infos.length - ?
{t('No sub identities set.')}
+ ?
{t('No sub identities set.')}
: infos.map(([address, name], index) => ('The maximum amount you can delegate is the amount of funds available on the delegating account.'); } setResult((state): AmountValidateState => { diff --git a/packages/page-accounts/src/modals/Ledger.tsx b/packages/page-accounts/src/modals/Ledger.tsx index 4f0e117aa3..0f6aa3dbc8 100644 --- a/packages/page-accounts/src/modals/Ledger.tsx +++ b/packages/page-accounts/src/modals/Ledger.tsx @@ -48,12 +48,12 @@ function LedgerModal ({ className, onClose }: Props): React.ReactElement const [isBusy, setIsBusy] = useState(false); const accOps = useRef(AVAIL_INDEXES.map((value): Option => ({ - text: t('Account type {{index}}', { replace: { index: value } }), + text: t('Account type {{index}}', { replace: { index: value } }), value }))); const addOps = useRef(AVAIL_INDEXES.map((value): Option => ({ - text: t('Address index {{index}}', { replace: { index: value } }), + text: t('Address index {{index}}', { replace: { index: value } }), value }))); @@ -98,17 +98,17 @@ function LedgerModal ({ className, onClose }: Props): React.ReactElement value={name} />
- + ('The account type that you wish to create. This is the top-level derivation.')}> ('account type')} onChange={setAccIndex} options={accOps.current} value={accIndex} /> - + ('The address index on the account that you wish to add. This is the second-level derivation.')}> ('address index')} onChange={setAddIndex} options={addOps.current} value={addIndex} diff --git a/packages/page-accounts/src/modals/MultisigApprove.tsx b/packages/page-accounts/src/modals/MultisigApprove.tsx index 6a0943df6b..91cecf810e 100644 --- a/packages/page-accounts/src/modals/MultisigApprove.tsx +++ b/packages/page-accounts/src/modals/MultisigApprove.tsx @@ -170,7 +170,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: size='large' > - + ('The call hash from the list of available and unapproved calls.')}> ('pending hashes {{count}}', { replace: { count: hashes.length } @@ -210,7 +210,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: )} - + ('The operation type to apply. For approvals both non-final and final approvals are supported.')}> ('approval type')} onChange={setType} @@ -220,7 +220,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: {whoFilter.length !== 0 && ( <> - + ('For approvals outstanding approvers will be shown, for hashes that should be cancelled the first approver is required.')}> ('signatory')} @@ -230,7 +230,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: {type === 'aye' && isMultiCall && ( <> {isCallOverride && ( - + ('The call data for this transaction matching the hash. Once sent, the multisig will be executed against this.')}> {callData && callInfo ? ( ('call data for final approval')} onChange={setCallHex} /> )} @@ -257,7 +257,7 @@ function MultisigApprove ({ className = '', onClose, ongoing, threshold, who }: )} )} - + ('Swap to a non-executing approval type, with subsequent calls providing the actual call data.')}> - + ('With the keep-alive option set, the account is protected against removal due to low balances.')}> {isFunction(api.tx.balances?.transferKeepAlive) && ( ([ - [t('contacts'), 'start', 4] + [t('contacts'), 'start', 4] ]); useEffect((): void => { diff --git a/packages/page-alliance/src/Members/Join.tsx b/packages/page-alliance/src/Members/Join.tsx index 9f150b1715..7e0a9f87f7 100644 --- a/packages/page-alliance/src/Members/Join.tsx +++ b/packages/page-alliance/src/Members/Join.tsx @@ -52,7 +52,7 @@ function Join ({ className, members, onClose, unscrupulous: { accounts } }: Prop type='account' /> - + ('The bond will be reserved for the duration of your alliance membership.')}> - + ('With the keep-alive option set, the account is protected against removal due to low balances.')}> const balances = useBalances(info?.id); const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([ - [t('accounts'), 'start'], - [t('frozen'), 'start'], - [t('sufficient'), 'start'], + [t('accounts'), 'start'], + [t('frozen'), 'start'], + [t('sufficient'), 'start'], [], [] ]); diff --git a/packages/page-assets/src/Overview/Assets.tsx b/packages/page-assets/src/Overview/Assets.tsx index 5e1c2d4a0e..7e5ba407df 100644 --- a/packages/page-assets/src/Overview/Assets.tsx +++ b/packages/page-assets/src/Overview/Assets.tsx @@ -19,12 +19,12 @@ function Assets ({ className, infos }: Props): React.ReactElement { const { t } = useTranslation(); const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([ - [t('assets'), 'start', 2], - [t('owner'), 'address media--1000'], - [t('admin'), 'address media--1300'], - [t('issuer'), 'address media--1600'], - [t('freezer'), 'address media--1900'], - [t('supply')], + [t('assets'), 'start', 2], + [t('owner'), 'address media--1000'], + [t('admin'), 'address media--1300'], + [t('issuer'), 'address media--1600'], + [t('freezer'), 'address media--1900'], + [t('supply')], [] ]); diff --git a/packages/page-bounties/src/Bounties.tsx b/packages/page-bounties/src/Bounties.tsx index c7aaa6e524..6fbc0520e6 100644 --- a/packages/page-bounties/src/Bounties.tsx +++ b/packages/page-bounties/src/Bounties.tsx @@ -28,10 +28,10 @@ function Bounties ({ className }: Props): React.ReactElement { ); const headerRef = useRef<([React.ReactNode?, string?, number?] | false)[]>([ - [t('bounties'), 'start', 3], - [t('value')], - [t('curator'), 'start'], - [t('next action'), 'start', 3] + [t('bounties'), 'start', 3], + [t('value')], + [t('curator'), 'start'], + [t('next action'), 'start', 3] ]); return ( diff --git a/packages/page-bounties/src/Bounty.tsx b/packages/page-bounties/src/Bounty.tsx index 9d059693e3..c185d1a9d7 100644 --- a/packages/page-bounties/src/Bounty.tsx +++ b/packages/page-bounties/src/Bounty.tsx @@ -148,11 +148,11 @@ function Bounty ({ bestNumber, bounty, className = '', description, index, propo
-
{t('Proposer')}
+
{t('Proposer')}
-
{t('Bond')}
+
{t('Bond')}
{curator && ( diff --git a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx index 4ab3c16823..c8612aabab 100644 --- a/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx +++ b/packages/page-bounties/src/BountyExtraActions/SlashCurator.tsx @@ -55,29 +55,29 @@ function SlashCurator ({ action, curatorId, description, index, toggleOpen }: Pr const actionProperties = useMemo>(() => ({ SlashCuratorAction: { filter: allAccounts, - header: t('This action will Slash the Curator.'), + header: t('This action will Slash the Curator.'), params: [index], - proposingAccountTip: t('The account that will create the transaction.'), + proposingAccountTip: t('The account that will create the transaction.'), tip: t("Curator's deposit will be slashed and curator will be unassigned. Bounty will return to the Funded state."), - title: t('Slash curator'), + title: t('Slash curator'), tx: unassignCurator }, SlashCuratorMotion: { filter: members, - header: t('This action will create a Council motion to slash the Curator.'), + header: t('This action will create a Council motion to slash the Curator.'), params: [threshold, unassignCuratorProposal, unassignCuratorProposal?.length], - proposingAccountTip: t('The council member that will create the motion, submission equates to an "aye" vote.'), + proposingAccountTip: t('The council member that will create the motion, submission equates to an "aye" vote.'), tip: t("If the motion is approved, Curator's deposit will be slashed and Curator will be unassigned. Bounty will return to the Funded state."), - title: t('Slash curator'), + title: t('Slash curator'), tx: councilMod && api.tx[councilMod].propose }, UnassignCurator: { filter: members, - header: t('This action will create a Council motion to unassign the Curator.'), + header: t('This action will create a Council motion to unassign the Curator.'), params: [threshold, unassignCuratorProposal, unassignCuratorProposal?.length], - proposingAccountTip: t('The council member that will create the motion, submission equates to an "aye" vote.'), - tip: t('If the motion is approved, the current Curator will be unassigned and the Bounty will return to the Funded state.'), - title: t('Unassign curator'), + proposingAccountTip: t('The council member that will create the motion, submission equates to an "aye" vote.'), + tip: t('If the motion is approved, the current Curator will be unassigned and the Bounty will return to the Funded state.'), + title: t('Unassign curator'), tx: councilMod && api.tx[councilMod].propose } }), [t, index, unassignCurator, api, allAccounts, councilMod, members, threshold, unassignCuratorProposal]); diff --git a/packages/page-bounties/src/BountyExtraActions/index.tsx b/packages/page-bounties/src/BountyExtraActions/index.tsx index ee29c8abb7..d4f3ced615 100644 --- a/packages/page-bounties/src/BountyExtraActions/index.tsx +++ b/packages/page-bounties/src/BountyExtraActions/index.tsx @@ -45,9 +45,9 @@ function Index ({ bestNumber, className, description, index, proposals, status } const availableSlashActions = determineUnassignCuratorAction(roles, status, blocksUntilUpdate); const slashCuratorActionNames = useRef>({ - SlashCuratorAction: t('Slash curator'), - SlashCuratorMotion: t('Slash curator (Council)'), - UnassignCurator: t('Unassign curator') + SlashCuratorAction: t('Slash curator'), + SlashCuratorMotion: t('Slash curator (Council)'), + UnassignCurator: t('Unassign curator') }); const existingCloseBountyProposal = useMemo( diff --git a/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx b/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx index 3d206152f1..c8b58c1b91 100644 --- a/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingDescriptionInfo.tsx @@ -22,11 +22,11 @@ function VotingDescriptionInfo ({ className, proposal, status }: Props): React.R const bestProposalName = proposalNameToDisplay(proposal, status); const { t } = useTranslation(); const votingDescriptions = useRef>({ - approveBounty: t('Bounty approval under voting'), - closeBounty: t('Bounty rejection under voting'), - proposeCurator: t('Curator proposal under voting'), - slashCurator: t('Curator slash under voting'), - unassignCurator: t('Unassign curator under voting') + approveBounty: t('Bounty approval under voting'), + closeBounty: t('Bounty rejection under voting'), + proposeCurator: t('Curator proposal under voting'), + slashCurator: t('Curator slash under voting'), + unassignCurator: t('Unassign curator under voting') }); return ( diff --git a/packages/page-bounties/src/BountyInfos/VotingSummary.tsx b/packages/page-bounties/src/BountyInfos/VotingSummary.tsx index 2ad7e977d2..f659ab2839 100644 --- a/packages/page-bounties/src/BountyInfos/VotingSummary.tsx +++ b/packages/page-bounties/src/BountyInfos/VotingSummary.tsx @@ -34,8 +34,8 @@ function VotingSummary ({ className, proposal, status }: Props): JSX.Element { className={className} data-testid='voting-summary' > -
{t('Aye')} {ayes}/{threshold}
-
{t('Nay')} {nays}/{nayThreshold}
+
{t('Aye')} {ayes}/{threshold}
+
{t('Nay')} {nays}/{nayThreshold}
- {option === 'ayes' && t('Aye: {{count}}', { replace: { count: votes ? votes.length : 0 } })} - {option === 'nays' && t('Nay: {{count}}', { replace: { count: votes ? votes.length : 0 } })} + {option === 'ayes' && t('Aye: {{count}}', { replace: { count: votes ? votes.length : 0 } })} + {option === 'nays' && t('Nay: {{count}}', { replace: { count: votes ? votes.length : 0 } })}
{voters} diff --git a/packages/page-claims/src/Claim.tsx b/packages/page-claims/src/Claim.tsx index 22430c7a94..5147b0cf12 100644 --- a/packages/page-claims/src/Claim.tsx +++ b/packages/page-claims/src/Claim.tsx @@ -96,7 +96,7 @@ function Claim ({ accountId, className = '', ethereumAddress, ethereumSignature, ('Claim')} onSuccess={onSuccess} {...constructTx(api, systemChain, accountId, ethereumSignature, statementKind, isOldClaimProcess)} /> diff --git a/packages/page-claims/src/Statement.tsx b/packages/page-claims/src/Statement.tsx index cac06464fc..eb8863963f 100644 --- a/packages/page-claims/src/Statement.tsx +++ b/packages/page-claims/src/Statement.tsx @@ -27,7 +27,7 @@ function StatementFullText ({ statementUrl, systemChain }: { statementUrl?: stri : null; default: - return

{t('Warning: we did not find any attest statement for {{chain}}', { replace: { chain: systemChain } })}

; + return

{t('Warning: we did not find any attest statement for {{chain}}', { replace: { chain: systemChain } })}

; } } @@ -41,7 +41,7 @@ function Statement ({ className, kind, systemChain }: Props): React.ReactElement return ( - {t('Please read these terms and conditions carefully. By submitting this statement, you are deemed to have accepted these Terms and Conditions. If you do not agree to these terms, please refrain from accessing or proceeding. You can also find them at:')} + {t('Please read these terms and conditions carefully. By submitting this statement, you are deemed to have accepted these Terms and Conditions. If you do not agree to these terms, please refrain from accessing or proceeding. You can also find them at:')} | null { { needsAttest.length > 1 - ? t('You need to sign an attestation for the following accounts:') - : t('You need to sign an attestation for the following account:') + ? t('You need to sign an attestation for the following accounts:') + : t('You need to sign an attestation for the following account:') }{ needsAttest.map((address) => ( ('Add an existing code hash')} onClose={onClose} > 0 && !isCodeHashValid} - label={t('code hash')} + label={t('code hash')} onChange={setCodeHash} value={codeHash} /> @@ -74,7 +74,7 @@ function Add ({ onClose }: Props): React.ReactElement {