Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Passed to `RemoteFeatureFlagController` to trigger cache invalidation when the client version changes.
- Add optional `fetch` field to `WalletOptions` ([#XXXX](https://github.com/MetaMask/core/pull/XXXX))
- Overrides the `fetch` implementation used by `NetworkController`'s RPC service. Defaults to `globalThis.fetch`. Allows platform-specific fetch implementations (e.g. React Native) to be injected.
- Add optional `logger` field to `WalletOptions` ([#XXXX](https://github.com/MetaMask/core/pull/XXXX))
- When provided, emits an `info`-level log after each controller finishes initializing: `[wallet] ${ControllerName}: initialized`. Defaults to no-op (no output). Pass `console` during development to observe initialization order.

[Unreleased]: https://github.com/MetaMask/core/
1 change: 1 addition & 0 deletions packages/wallet/src/initialization/initialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export function initialize({
});

instances[name] = instance as Record<string, unknown>;
options.logger?.info(`[wallet] ${name}: initialized`);
}

return instances as DefaultInstances;
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export type WalletOptions = {
showApprovalRequest: () => void;
clientConfigApiService: ClientConfigApiService;
getMetaMetricsId: () => string;
logger?: Pick<Console, 'info'>;
};
Loading