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

rpc: Fix error wrapping chain in GetAccountLedgerSequence #136 #137

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

Conversation

bilaal441
Copy link

What

Fixes the error handling in the GetAccountLedgerSequence function to correctly wrap ErrAccountNotFound, allowing proper error detection in the account sponsorship flow.

Why

Currently, when creating a sponsored account via /tx/create-sponsored-account, the process fails because the error wrapping is incorrect. The error check errors.Is(err, ErrAccountNotFound) fails since the error is returned as a plain string. This fix ensures the error is properly wrapped, allowing correct handling of missing accounts.

Known limitations

N/A

Issue that this PR addresses

Fixes: rpc: Fix error wrapping chain in GetAccountLedgerSequence #136
Priority: High

Checklist

PR Structure

  • It is not possible to break this PR down into smaller PRs.
  • This PR does not mix refactoring changes with feature changes.
  • This PR's title starts with the name of the package most changed in the PR (rpc).

Thoroughness

  • This PR adds tests for the new functionality or fixes.
  • All updated queries have been tested (refer to this check if the data set returned by the updated query is expected to be same as the original one).

Release

  • This is not a breaking change.
  • This is ready to be tested in development.
  • The new functionality is gated with a feature flag if this is not ready for production.

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.

rpc: Fix error wrapping chain in GetAccountLedgerSequence
1 participant