-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: simplify AssetsService types
#84
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,14 +4,7 @@ import type { | |
| AssetsControllerGetAccountAssetsByScopeAction, | ||
| } from '@metamask/assets-controller'; | ||
| import type { Messenger } from '@metamask/messenger'; | ||
|
|
||
| import type { MessengerCaller } from '../../types/messenger-caller'; | ||
|
|
||
| export type { | ||
| AssetsControllerGetAccountAssetByIDAction, | ||
| AssetsControllerGetAccountAssetsByIDsAction, | ||
| AssetsControllerGetAccountAssetsByScopeAction, | ||
| }; | ||
|
Comment on lines
-10
to
-14
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better not to re-export these types from another package, because any breaking change on these types from Consumers can simply import them from
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 100% |
||
| import { AsyncMessenger } from '@metamask/snaps-sdk'; | ||
|
|
||
| /** | ||
| * Namespace for the {@link AssetsService} messenger. | ||
|
|
@@ -29,16 +22,6 @@ export type AssetsServiceAllowedActions = | |
| /** | ||
| * Messenger restricted to actions consumed by {@link AssetsService}. | ||
| */ | ||
| export type AssetsServiceMessenger = Messenger< | ||
| typeof ASSETS_SERVICE_NAME, | ||
| AssetsServiceAllowedActions | ||
| export type AssetsServiceMessenger = AsyncMessenger< | ||
| Messenger<typeof ASSETS_SERVICE_NAME, AssetsServiceAllowedActions> | ||
| >; | ||
|
|
||
| /** | ||
| * Caller type for {@link AssetsService}. | ||
| * | ||
| * Matches {@link CoreMessengerCaller} while `CoreMessenger` only delegates | ||
| * assets-controller actions. | ||
| */ | ||
| export type AssetsServiceMessengerCaller = | ||
| MessengerCaller<AssetsServiceAllowedActions>; | ||
This file was deleted.
This file was deleted.
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.
@ulissesferreira given this file is now just a couple of type declarations, we could consider merging it with
AssetsService.ts- wdyt?Uh oh!
There was an error while loading. Please reload this page.
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.
Yeah that seems fair so we can maintain less files. Sounds good.