-
Notifications
You must be signed in to change notification settings - Fork 451
Closed
Description
Change this interface https://github.com/polkadot-js/extension/blob/master/packages/extension-inject/src/types.ts#L27-L30 to cater for non-ss58 accounts.
Basically add a getAll(), marking get as deprecated. With getAll, return [<sr25519 | ed25519 | ethereum | ...>, InjectedAcocunt][]
Since the type can be derived anyway from on-chain data, this is non-exposing. Then the logic would be -
- when
getis called, only return the ss58-accounts, i.e. don't break userspace - when
getAllis called, return, well, everything with type
Needed for -
- Change loadInjected to handle ethereum addresses ui#413
- Add metamask extension web3 #566
- Support ethereum accounts #560
The alternative would be the following -
- add a
type?: KeyringTypeto the AccountInjected - add a flag to
get(withType?: boolean)which will populate the type (if not supplied, same non-eth filter as above)
This is probably preferable since it has less working-with-data changes on the users of the interface, however they still need to opt-in.
Tbaut
Metadata
Metadata
Assignees
Labels
No labels