fix: remove the Asset Hub migration notice, and the strings left by other removals

Upstream shows an Asset Hub migration notice ahead of everything else on first
open. It is about balances moving from the Polkadot Relay Chain to Asset Hub,
and neither chain exists here — but it is worse than irrelevant, because it told
every user of this extension that their balances had been migrated somewhere and
warned them in red capitals not to teleport to a chain it cannot reach. A wallet
that opens by describing something that did not happen to money the user does
hold is not a cosmetic problem.

Gone with it: the component, the route gate, the `asset_hub_migration_read`
flag and its nine translation strings.

Also regenerates the translation file from source, which dropped 52 more strings
and added none. The scanner adds keys it finds but never prunes ones it does not,
so every UI removal so far has left its text behind — the Ledger path (#5) and
the Parity Signer QR flow account for most of it, along with camera and
network-selection strings from paths that no longer exist. Verified the survivors
rather than assuming: nothing dropped appears as a `t()` call anywhere under
`packages/extension-ui/src`, which is the whole of what the scanner reads.

Refs #2

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
This commit is contained in:
2026-09-15 18:02:45 +03:00
parent b32b24348f
commit 8e767c0332
3 changed files with 85 additions and 229 deletions

View File

@@ -1,81 +0,0 @@
// Copyright 2019-2026 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import React, { useCallback, useContext } from 'react';
import { ActionContext, Box, Button, ButtonArea, List } from '../components/index.js';
import { useTranslation } from '../hooks/index.js';
import { Header } from '../partials/index.js';
import { styled } from '../styled.js';
interface Props {
className?: string;
}
function AssetHubMigration ({ className }: Props): React.ReactElement<Props> {
const { t } = useTranslation();
const onAction = useContext(ActionContext);
const _onClick = useCallback(
(): void => {
window.localStorage.setItem('asset_hub_migration_read', 'ok');
onAction();
},
[onAction]
);
return (
<>
<Header text={t('Asset Hub Migration Notice')} />
<div className={className}>
<p>{t('The Asset Hub migration has been completed. Please note the following important changes:')}</p>
<Box>
<List>
<li>{t('All balances have been migrated from the Relay Chain to Asset Hub')}</li>
<li>{t('All on-chain functionality has been moved to Asset Hub')}</li>
<li>{t('Asset Hub now holds user balances and provides general functionality')}</li>
</List>
</Box>
<p className='warning'>{t('Do not teleport balances to the Relay Chain unless:')}</p>
<Box>
<List>
<li>{t('You are opening HRMP channels, or')}</li>
<li>{t('You are starting a Parachain')}</li>
</List>
</Box>
<p>{t('For all other operations, your balances are already on Asset Hub.')}</p>
</div>
<ButtonArea>
<Button onClick={_onClick}>{t('I Understand')}</Button>
</ButtonArea>
</>
);
}
export default styled(AssetHubMigration)<Props>`
p {
color: var(--subTextColor);
margin-bottom: 4px;
margin-top: 0;
line-height: 1.4;
}
p.warning {
color: var(--errorColor);
font-weight: 600;
font-size: 1.1em;
margin-top: 6px;
margin-bottom: 2px;
text-transform: uppercase;
line-height: 1.3;
}
article {
margin: 0.4rem 24px;
padding: 8px 20px;
}
ul {
margin: 0;
}
`;

View File

@@ -26,7 +26,6 @@ import Derive from './Derive/index.js';
import ImportSeed from './ImportSeed/index.js';
import Metadata from './Metadata/index.js';
import Signing from './Signing/index.js';
import AssetHubMigration from './AssetHubMigration.js';
import Export from './Export.js';
import ExportAll from './ExportAll.js';
import Forget from './Forget.js';
@@ -78,14 +77,12 @@ export default function Popup (): React.ReactElement {
const [metaRequests, setMetaRequests] = useState<null | MetadataRequest[]>(null);
const [signRequests, setSignRequests] = useState<null | SigningRequest[]>(null);
const [isWelcomeDone, setWelcomeDone] = useState(false);
const [isMigrationDone, setMigrationDone] = useState(false);
const [settingsCtx, setSettingsCtx] = useState<SettingsStruct>(startSettings);
const history = useHistory();
const _onAction = useCallback(
(to?: string): void => {
setWelcomeDone(window.localStorage.getItem('welcome_read') === 'ok');
setMigrationDone(window.localStorage.getItem('asset_hub_migration_read') === 'ok');
if (!to) {
return;
@@ -134,17 +131,20 @@ export default function Popup (): React.ReactElement {
return <ErrorBoundary trigger={trigger}>{component}</ErrorBoundary>;
}
// Upstream shows an Asset Hub migration notice here before anything else.
// Removed: it is about balances moving from the Polkadot Relay Chain to Asset
// Hub, and neither exists on Quantus. It is not merely irrelevant — it told
// every user, on first open, that their balances had been migrated somewhere
// and warned them not to teleport to a chain this extension cannot reach.
const Root = !isWelcomeDone
? wrapWithErrorBoundary(<Welcome />, 'welcome')
: !isMigrationDone
? wrapWithErrorBoundary(<AssetHubMigration />, 'asset-hub-migration')
: authRequests?.length
? wrapWithErrorBoundary(<Authorize />, 'authorize')
: metaRequests?.length
? wrapWithErrorBoundary(<Metadata />, 'metadata')
: signRequests?.length
? wrapWithErrorBoundary(<Signing />, 'signing')
: wrapWithErrorBoundary(<Accounts />, 'accounts');
: authRequests?.length
? wrapWithErrorBoundary(<Authorize />, 'authorize')
: metaRequests?.length
? wrapWithErrorBoundary(<Metadata />, 'metadata')
: signRequests?.length
? wrapWithErrorBoundary(<Signing />, 'signing')
: wrapWithErrorBoundary(<Accounts />, 'accounts');
return (
<Loading>{accounts && authRequests && metaRequests && signRequests && (

View File

@@ -1,21 +1,40 @@
{
"Copied": "",
"<unknown>": "",
"hardware wallet account": "",
"external account": "",
"copy address": "",
"account visibility": "",
"An error occurred": "",
"Something went wrong with the query and rendering of this component. {{message}}": "",
"Back to home": "",
"click to select or drag and drop the file here": "",
"{{name}} ({{size}} bytes)": "",
"Warning: Caps lock is on": "",
"... loading ...": "",
"Generated 12-word mnemonic seed:": "",
"Copy to clipboard": "",
"Back": "",
"Create new account (root or derived)": "",
"Allow use on any chain": "",
"It looks like this request is coming from an suspicious origin. Please verify the source carefully.": "",
"Select all": "",
"Search by name or network...": "",
"Create new account": "",
"Derive from an account": "",
"Export all accounts": "",
"Import account from pre-existing seed": "",
"Restore account from backup JSON file": "",
"Attach external QR-signer account": "",
"External QR accounts and Access": "",
"Allow Camera Access": "",
"Track an address": "",
"Dark": "",
"Light": "",
"Display address format for": "",
"Read balances from": "",
"Custom": "",
"or a node of your own": "",
"Language": "",
"Notifications": "",
"External accounts and Access": "",
"Allow QR Camera Access": "",
"Manage Website Access": "",
"Open extension in new window": "",
"Account name is too short": "",
"A descriptive name for your account": "",
@@ -27,40 +46,61 @@
"Derive New Account": "",
"Export Account": "",
"Forget Account": "",
"Visible (always inject)": "",
"Add Account": "",
"You currently don't have any accounts. Create your first account to get started.": "",
"Accounts": "",
"Authorize": "",
"Only approve this request if you trust the application. Approving gives the application access to the addresses of your accounts.": "",
"Yes, allow this application access": "",
"Add the account with the generated seed": "",
"Accounts connected to {{url}}": "",
"Connect {{total}} account(s)": "",
"example.com": "",
"No website request yet!": "",
"{{total}} accounts": "",
"all accounts": "",
"no accounts": "",
"Account connection request": "",
"Previous": "",
"Next": "",
"Understood": "",
"Reject": "",
"Don't ask again": "",
"Create an account": "",
"Network": "",
"Add the account with the generated seed": "",
"Please write down your wallet's mnemonic seed and keep it in a safe place. The mnemonic can be used to restore your wallet. Keep it carefully to not lose your assets.": "",
"I have saved my mnemonic seed safely.": "",
"Next step": "",
"Derivation Path": "",
"Derivation Path (unlock to edit)": "",
"Derivation Path": "",
"//hard/soft": "",
"//hard": "",
"Add new account": "",
"Create derived account": "",
"Derive new account from existing": "",
"`///password` not supported for derivation": "",
"Soft derivation is only allowed for sr25519 accounts": "",
"Invalid derivation path": "",
"Choose Parent Account:": "",
"enter the password for the account you want to derive from": "",
"Wrong password": "",
"Create a derived account": "",
"Create account from new seed": "",
"Export account": "",
"You are exporting your account. Keep it safe and don't share it with anyone.": "",
"password for this account": "",
"I want to export this account": "",
"Cancel": "",
"All account": "",
"password for encrypting all accounts": "",
"I want to export all my accounts": "",
"Forget account": "",
"You are about to remove the account. This means that you will not be able to access it via this extension anymore. If you wish to recover it, you would need to use the seed.": "",
"I want to forget this account": "",
"Scan Address Qr": "",
"Add the account with identified address": "",
"Import account": "",
"existing 12 or 24-word mnemonic seed": "",
"Add the account with the supplied seed": "",
"Invalid mnemonic seed or derivation path": "",
"Invalid mnemonic seed": "",
"existing 12 or 24-word mnemonic seed": "",
"Mnemonic needs to contain 12, 15, 18, 21, 24 words": "",
"advanced": "",
"account index, e.g. //1 (leave empty for the first account)": "",
"Each Quantus account derives from your recovery phrase on its own. To add a second account, enter the same phrase with //1, a third with //2, and so on.": "",
"Metadata": "",
"from": "",
"chain": "",
@@ -68,29 +108,39 @@
"decimals": "",
"symbol": "",
"upgrade": "",
"This approval will add the metadata to your extension instance, allowing future requests to be decoded using this metadata.": "",
"Yes, do this metadata update": "",
"Reject": "",
"Phishing detected": "",
"You have been redirected because the Polkadot{.js} extension believes that this website could compromise the security of your accounts and your tokens.": "",
"Restore from JSON": "",
"backup file": "",
"Invalid Json file": "",
"Password for this file": "",
"Unable to decode using the supplied passphrase": "",
"Restore": "",
"bytes": "",
"method data": "",
"method": "",
"info": "",
"immortal": "",
"mortal, valid from {{birth}} to {{death}}": "",
"genesis": "",
"version": "",
"nonce": "",
"tip": "",
"Sign the transaction": "",
"Sign the message": "",
"assetId": "",
"lifetime": "",
"Transaction": "",
"Sign message": "",
"Scan signature via camera": "",
"Don't ask me again for the next {{expiration}} minutes": "",
"Sign the transaction": "",
"Sign the message": "",
"This account is tracked only — the extension holds no key for it and cannot sign.": "",
"Remember my password for the next {{expiration}} minutes": "",
"Extend the period without password by {{expiration}} minutes": "",
"Password for this account": "",
"This is not a valid address": "",
"Paste the address you want to track": "",
"This account has no key in the extension, so it cannot sign. You will see its balance and can use it as a recipient.": "",
"Add the address": "",
"Welcome": "",
"Before we start, just a couple of notes regarding use:": "",
"We do not send any clicks, pageviews or events to a central server": "",
@@ -98,118 +148,5 @@
"We don't collect keys, addresses or any information - your information never leaves this machine": "",
"... we are not in the information collection business (even anonymized).": "",
"Understood, let me continue": "",
"An error occured": "",
"Something went wrong with the query and rendering of this component. {{message}}": "",
"Back to home": "",
"external account": "",
"Phishing detected": "",
"Remember my password for the next {{expiration}} minutes": "",
"Extend the period without password by {{expiration}} minutes": "",
"You have been redirected because the Polkadot{.js} extension believes that this website could compromise the security of your accounts.": "",
"The redirection could also happen on an outright malicious website or on a legitimate websites that has been compromised and flagged.": "",
"This redirection is based on a list of websites accessible at https://github.com/polkadot-js/phishing. Note that this is a community-driven, curated list. \n It might be incomplete or inaccurate.": "",
"copy address": "",
"account visibility": "",
"Wrong password": "",
"Incorrect derivation path": "",
"lifetime": "",
"Warning: Caps lock is on": "",
"Invalid Json file": "",
"Unable to decode using the supplied passphrase": "",
"Manage Website Access": "",
"example.com": "",
"No website request yet!": "",
"allowed": "",
"denied": "",
"Derive from an account": "",
"Dark": "",
"Light": "",
"Invalid mnemonic seed or derivation path": "",
"Invalid mnemonic seed": "",
"Mnemonic needs to contain 12, 15, 18, 21, 24 words": "",
"advanced": "",
"derivation path": "",
"Next": "",
"//hard": "",
"`///password` not supported for derivation": "",
"Soft derivation is only allowed for sr25519 accounts": "",
"Invalid derivation path": "",
"hardware wallet account": "",
"Camera access must be first enabled in the settings": "",
"Ledger devices can only be connected with Chrome browser": "",
"Attach ledger account": "",
"Connect Ledger device": "",
"External accounts and Access": "",
"Allow QR Camera Access": "",
"Add Account": "",
"Account type {{index}}": "",
"Address index {{index}}": "",
"Import Ledger Account": "",
"Network": "",
"account type": "",
"address index": "",
"Refresh": "",
"Import Account": "",
"Sign on Ledger": "",
"Allow use on any chain": "",
"Select network": "",
"You have been redirected because the Polkadot{.js} extension believes that this website could compromise the security of your accounts and your tokens.": "",
"Export all accounts": "",
"All account": "",
"password for encrypting all accounts": "",
"I want to export all my accounts": "",
"Notifications": "",
"Search by name or network...": "",
"Select all": "",
"Accounts connected to {{url}}": "",
"Connect {{total}} account(s)": "",
"{{total}} accounts": "",
"Account connection request": "",
"Understood": "",
"Ask again later": "",
"no accounts": "",
"all accounts": "",
"Message signing is not supported for hardware wallets.": "",
"\"Allow use on any network\" is not supported to show a QR code. You must associate this account with a network.": "",
"An error occurred": "",
"Is your ledger locked?": "",
"App \"{{network}}\" does not seem to be open": "",
"Ledger error: {{errorMessage}}": "",
"assetId": "",
"This approval will add the metadata to your extension instance, allowing future requests to be decoded using this metadata. It will also allow the use of Ledger's Generic Polkadot App.": "",
"No metadata found for this chain. You must upload the metadata to the extension in order to use Ledger.": "",
"This network is not available, please report an issue to update the known chains": "",
"Ledger App": "",
"Don't ask again": "",
"Previous": "",
"ED25519 Account": "",
"Ethereum Account": "",
"It looks like this request is coming from an suspicious origin. Please verify the source carefully.": "",
"Password is not strong enough": "",
"Password must be at least {{length}} characters long": "",
"Asset Hub Migration Notice": "",
"The Asset Hub migration has been completed. Please note the following important changes:": "",
"All balances have been migrated from the Relay Chain to Asset Hub": "",
"All on-chain functionality has been moved to Asset Hub": "",
"Asset Hub now holds user balances and provides general functionality": "",
"⚠️ Do not teleport balances to the Relay Chain unless:": "",
"You are opening HRMP channels, or": "",
"You are starting a Parachain": "",
"For all other operations, your balances are already on Asset Hub.": "",
"I Understand": "",
"Do not teleport balances to the Relay Chain unless:": "",
"Address mismatch: derived {{derived}}, expected {{expected}}. Check that the correct Ledger device is connected and the correct app is selected.": "",
"Possible cause: the Ledger App setting differs from the app originally used to derive this account.": "",
"This approval will add the metadata to your extension instance, allowing future requests to be decoded using this metadata.": "",
"Track an address": "",
"This account is tracked only — the extension holds no key for it and cannot sign.": "",
"This is not a valid address": "",
"Paste the address you want to track": "",
"This account has no key in the extension, so it cannot sign. You will see its balance and can use it as a recipient.": "",
"Add the address": "",
"account index, e.g. //1 (leave empty for the first account)": "",
"Each Quantus account derives from your recovery phrase on its own. To add a second account, enter the same phrase with //1, a third with //2, and so on.": "",
"Read balances from": "",
"Custom": "",
"or a node of your own": ""
"Password must be at least {{length}} characters long": ""
}