Summary
account.get_legacy_accounts currently returns the derived legacy public key and also exposes lite_username as the account display name without checking IdentityDisclosure.
Proposed fix
Keep returning the legacy public key for compatibility, but set name: None unless identity_disclosure_authorization() returns Authorized. If the disclosure check fails due to storage/platform error, return HostFailure.
Tests
Add coverage for denied/not-determined hiding lite_username, authorized preserving it, and platform/storage errors surfacing as HostFailure.
Summary
account.get_legacy_accountscurrently returns the derived legacy public key and also exposeslite_usernameas the account display name without checkingIdentityDisclosure.Proposed fix
Keep returning the legacy public key for compatibility, but set
name: Noneunlessidentity_disclosure_authorization()returnsAuthorized. If the disclosure check fails due to storage/platform error, returnHostFailure.Tests
Add coverage for denied/not-determined hiding
lite_username, authorized preserving it, and platform/storage errors surfacing asHostFailure.