fix: allow anonymous proxy and account dropdown behaviour (#11450)

This commit is contained in:
Arjun Porwal 2025-04-02 17:11:18 +05:30 committed by GitHub
parent bafa926a92
commit d9ee47c09d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 9 deletions

View File

@ -124,7 +124,7 @@ function NewProxy ({ index, onChangeAccount, onChangeType, onRemove, proxiedAcco
isError={!accountId}
label={t('proxy account')}
onChange={_onChangeAccount}
type='account'
type='allPlus'
value={accountId}
/>
{accountId && accountId.eq(proxiedAccount) && (

View File

@ -314,15 +314,25 @@ class InputAddress extends React.PureComponent<Props, State> {
const accountId = transformToAccountId(query);
if (accountId) {
const item = keyring.saveRecent(
accountId.toString()
).option;
const account = keyring.getAccount(accountId);
matches.push({
key: item.key,
name: item.name,
value: item.value || undefined
});
if (account) {
matches.push({
key: account.address,
name: account.meta.name,
value: account.address
});
} else {
const item = keyring.saveRecent(
accountId.toString()
).option;
matches.push({
key: item.key,
name: item.name,
value: item.value || undefined
});
}
}
}