Skip to content

Commit

Permalink
fix(accounts-controller): export * in index (#5224)
Browse files Browse the repository at this point in the history
## Explanation

Each exports were done manually, which is quite error-prone IMO.

Looks like some other controllers already uses `export * from ...`, so I
believe this will make our `export`s a bit more future-proof.

Also, if any functions/constants should not be part of the public API,
we could use another folder like `details` or `internal` and put those
files there.

## References

N/A

## Changelog

### `@metamask/accounts-controller`

- **CHANGED**: Properly exports everything

## Checklist

- [ ] I've updated the test suite for new or updated code as appropriate
- [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [ ] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
- [ ] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
  • Loading branch information
ccharly authored Jan 31, 2025
1 parent 846253a commit 7598f7c
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions packages/accounts-controller/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,2 @@
export type {
AccountsControllerState,
AccountsControllerGetStateAction,
AccountsControllerSetSelectedAccountAction,
AccountsControllerSetAccountNameAction,
AccountsControllerListAccountsAction,
AccountsControllerListMultichainAccountsAction,
AccountsControllerUpdateAccountsAction,
AccountsControllerGetSelectedAccountAction,
AccountsControllerGetSelectedMultichainAccountAction,
AccountsControllerGetAccountByAddressAction,
AccountsControllerGetAccountAction,
AccountsControllerGetNextAvailableAccountNameAction,
AccountsControllerUpdateAccountMetadataAction,
AccountsControllerActions,
AccountsControllerChangeEvent,
AccountsControllerSelectedAccountChangeEvent,
AccountsControllerSelectedEvmAccountChangeEvent,
AccountsControllerAccountAddedEvent,
AccountsControllerAccountRemovedEvent,
AccountsControllerAccountRenamedEvent,
AccountsControllerEvents,
AccountsControllerMessenger,
} from './AccountsController';
export { AccountsController } from './AccountsController';
export { keyringTypeToName, getUUIDFromAddressOfNormalAccount } from './utils';
export * from './AccountsController';
export * from './utils';

0 comments on commit 7598f7c

Please sign in to comment.