-
-
Notifications
You must be signed in to change notification settings - Fork 280
feat(accounts-controller)!: use new SnapAccountService account data events
#8978
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
Merged
+50
−16
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c4b5d5a
fix(snap-account-service)!: prevent double-lock when handling Keyring…
ccharly 340122b
chore: lint
ccharly 7af6eb4
test: add tests
ccharly 8ceff62
chore: changelog
ccharly bfa94c0
chore: changelog
ccharly e7c25d6
fix: faster snap-account-service init
ccharly 9c8d42a
chore: changelog
ccharly cf72603
refactor(snap-account-service)!: make init sync + use it in ctor
ccharly 9fb8d00
chore: changelog
ccharly 3b99fcf
feat(snap-account-service): always forward non-keyring events in :han…
ccharly bd96402
Merge branch 'main' into cc/feat/snap-account-service-sync-init
ccharly b034cd2
chore: changelog
ccharly 4ab5cf4
Merge branch 'cc/feat/snap-account-service-sync-init' into cc/feat/sn…
ccharly d2cf5f3
Merge branch 'main' into cc/feat/snap-account-service-forward-non-key…
ccharly 4258151
refactor: wording
ccharly ab40ded
chore: jsdocs
ccharly b08e13e
chore: revert accounts-controller changes (will be split in its own PR)
ccharly e33e897
Revert "chore: revert accounts-controller changes (will be split in i…
ccharly d4ab067
Merge branch 'main' into cc/feat/use-new-snap-account-service-events
ccharly b04be5d
refactor: remove SnapKering:* events
ccharly 7e64dc0
chore: fix changelog
ccharly 4bcc1c6
fix: do not export SnapAccountService* + move them to types.ts
ccharly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,30 @@ | ||
| // This file contains duplicate code from MultichainNetworkController.ts to avoid circular dependencies | ||
| // It should be refactored to avoid duplication | ||
|
|
||
| import { | ||
| SnapKeyringAccountAssetListUpdatedEvent, | ||
| SnapKeyringAccountBalancesUpdatedEvent, | ||
| SnapKeyringAccountTransactionsUpdatedEvent, | ||
| } from '@metamask/eth-snap-keyring'; | ||
| import type { CaipChainId } from '@metamask/keyring-api'; | ||
| import type { NetworkClientId } from '@metamask/network-controller'; | ||
|
|
||
| export type MultichainNetworkControllerNetworkDidChangeEvent = { | ||
| type: `MultichainNetworkController:networkDidChange`; | ||
| payload: [NetworkClientId | CaipChainId]; | ||
| }; | ||
|
|
||
| export type SnapAccountServiceAccountBalancesUpdatedEvent = { | ||
| type: `SnapAccountService:accountBalancesUpdated`; | ||
| payload: SnapKeyringAccountBalancesUpdatedEvent['payload']; | ||
| }; | ||
|
|
||
| export type SnapAccountServiceAccountTransactionsUpdatedEvent = { | ||
| type: `SnapAccountService:accountTransactionsUpdated`; | ||
| payload: SnapKeyringAccountTransactionsUpdatedEvent['payload']; | ||
| }; | ||
|
|
||
| export type SnapAccountServiceAccountAssetListUpdatedEvent = { | ||
| type: `SnapAccountService:accountAssetListUpdated`; | ||
| payload: SnapKeyringAccountAssetListUpdatedEvent['payload']; | ||
| }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We put them here to avoid having a cycle: