Skip to content
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

fix: account lookup error in wallet management functions #1688

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

famouswizard
Copy link

This update addresses an important issue in the wallet management functions related to the getAccountByName method. Prior to this change, if the account with the specified name was not found, the code would fail silently, leading to potential issues later in the flow.

What was fixed:

  • Added error handling: The getAccountByName function now explicitly checks if the account exists. If not, it throws an error with a descriptive message indicating that the account could not be found.

Why it matters:

Without this fix, it was possible for the tests or functionality relying on this method to proceed with an invalid state, causing hard-to-debug errors later in the process. By adding this validation, we ensure that the flow fails gracefully with a clear error message, making it much easier to diagnose issues and improving the robustness of the system.

Additional notes:

  • This fix improves the reliability of the tests and enhances overall error handling in the codebase.
  • The added check prevents unexpected behavior when dealing with account operations such as switching or hiding accounts.

Thank you for reviewing this update!

@fuel-cla-bot
Copy link

fuel-cla-bot bot commented Dec 8, 2024

Thanks for the contribution! Before we can merge this, we need @famouswizard to sign the Fuel Labs Contributor License Agreement.

@luizstacio luizstacio changed the title fix: Fix Account Lookup Error in Wallet Management Functions fix: account lookup error in wallet management functions Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant