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

Report correct available balance with node version < 7. #322

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

td202
Copy link
Contributor

@td202 td202 commented Sep 19, 2024

Purpose

For node version < 7, the available balance on an account is not returned in the GetAccountInfo query response. This change checks if that is the case and computes the correct balance, instead of simply returning 0.

The main purpose of this is to support the wallet proxy, allowing us to deploy it before node version 7 is deployed.

Changes

  • Revise the FromProto implementation for AccountInfo to calculate the available amount if it is not present in the protobuf.

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

Copy link
Contributor

@drsk0 drsk0 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@td202 td202 merged commit f903faa into main Sep 19, 2024
2 checks passed
@td202 td202 deleted the available-balance branch September 19, 2024 14:29
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.

3 participants