-
-
Notifications
You must be signed in to change notification settings - Fork 246
refactor: MultichainAccountService
, MultichainAccountWallet
, MultichainAccountGroup
performance and DevX improvements
#6654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…to wallets and groups
…tead of getAccountByAddress which iterates through the whole of internal accounts in the AccountsController
accountsList, | ||
); | ||
// we cast here because we know that the accounts are BIP-44 compatible | ||
return internalAccounts as Bip44Account<KeyringAccount>[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although the getAccounts
's return type is (InternalAccount | undefined)[]
, we're sure to get back all the accounts we want since the accounts list will never be stale.
…accountAdded and accountRemoved handling, it is dead code
|
||
readonly #wallets: Map< | ||
MultichainAccountWalletId, | ||
MultichainAccountWallet<Bip44Account<KeyringAccount>> | ||
>; | ||
|
||
readonly #accountIdToContext: Map< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to get rid of this mapping since it was only being used for handling the accountRemoved
and accountAdded
events, removing this gets rid of a large loop in the init function as well. If there's a particular need for this data at the client level, we can always add this back in.
Explanation
References
Checklist