Skip to content

Fix AccountBuilder naming: enforce explicit name and duplicate name check#628

Open
Devadakene wants to merge 1 commit into
benelabs:mainfrom
Devadakene:account-builder-naming-fix
Open

Fix AccountBuilder naming: enforce explicit name and duplicate name check#628
Devadakene wants to merge 1 commit into
benelabs:mainfrom
Devadakene:account-builder-naming-fix

Conversation

@Devadakene

Copy link
Copy Markdown

This PR closes #541

Summary

  • AccountBuilder::new now initializes with an empty name.
  • AccountBuilder::build validates that a name is set; otherwise, it panics with a helpful message.
  • MockEnv::register_account now checks for duplicate names and panics if the name already exists.
  • Updated documentation and added tests for the new behavior.

Impact

Prevents silent overwriting of accounts in MockEnv and forces explicit, unique naming for accounts. Existing code that relied on the implicit “unnamed” default must be updated to set a name via .name("…") before calling .build().

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@Devadakene Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Prevent AccountBuilder default unnamed accounts from colliding silently

1 participant