Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
feat: add accountNameSuggestion field to the AccountCreatedEvent (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc authored May 21, 2024
1 parent add765b commit 8e028d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/internal/events.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JsonStruct } from '@metamask/utils';
import { boolean, literal, object } from 'superstruct';
import { boolean, literal, object, string } from 'superstruct';

import { KeyringAccountStruct } from '../api';
import { KeyringEvent } from '../events';
Expand All @@ -14,6 +14,15 @@ export const AccountCreatedEventStruct = object({
*/
account: KeyringAccountStruct,

/**
* Account name suggestion provided to the MetaMask client.
*
* The keyring can suggest a name for the account, but it's up to the
* client to decide whether to use it. The keyring won't be informed if the
* client decides to use a different name.
*/
accountNameSuggestion: exactOptional(string()),

/**
* Instructs MetaMask to display the add account confirmation dialog in the UI.
* **Note:** This is not guaranteed to be honored by the MetaMask client.
Expand Down

0 comments on commit 8e028d3

Please sign in to comment.