Skip to content

Conversation

@ccharly
Copy link
Contributor

@ccharly ccharly commented Nov 5, 2025

The notify:accountCreated event was fired even for existing accounts, which would cause errors in the SnapKeyring handling (if the account has not been created already):

Similarly to the Solana Snap, if the account already exists, we just return the KeyringAccount object and that's it:


Note

Stop emitting accountCreated when the account already exists; bump Snap version to 1.6.0.

  • Core (snap):
    • AccountUseCases.create: Return existing account without emitting accountCreated to ensure idempotency.
  • Manifest:
    • Bump packages/snap/snap.manifest.json version to 1.6.0 and update source.shasum.

Written by Cursor Bugbot for commit d57dc39. This will update automatically on new commits. Configure here.

@ccharly ccharly requested a review from a team as a code owner November 5, 2025 13:16
@@ -1,13 +1,13 @@
{
"version": "1.4.3",
"version": "1.4.4",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the release workflow does not automatically update this?

Comment on lines -168 to -173
await this.#snapClient.emitAccountCreatedEvent(
account,
correlationId,
accountName,
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still have an emitAccountCreatedEvent below, when the account got inserted for the first time.

@ccharly ccharly force-pushed the fix/create-account-idempotency branch from 92fac71 to ce50bb0 Compare November 25, 2025 14:07
@ccharly ccharly force-pushed the fix/create-account-idempotency branch from ce50bb0 to d57dc39 Compare November 25, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants