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

Expose min-balance field in **Account Info** #272

Closed
tzaffi opened this issue Dec 17, 2021 · 7 comments
Closed

Expose min-balance field in **Account Info** #272

tzaffi opened this issue Dec 17, 2021 · 7 comments

Comments

@tzaffi
Copy link
Contributor

tzaffi commented Dec 17, 2021

Problem

min-balance is available in algod but not in the go SDK.

Solution

algorand/go-algorand#3287 has introduced min-balance to the response of algod's /v2/accounts/{{ACCOUNT}} as well as to the goal account info.

  • When querying the REST API avove, expose the min-balance field
  • Pass appropriate cucumber tests

Dependencies

Urgency

Low

@norunners
Copy link

Should the JSON tag omitempty?

@tzaffi
Copy link
Contributor Author

tzaffi commented Feb 7, 2022

Since the response is always expected to provide min-balance we should always provide it. If for some reason it's not provided by algod this is an error situation and should be handled accordingly (and I don't have a simple answer for that).

@norunners
Copy link

norunners commented Feb 15, 2022

I believe that level of validation would need to happen after marshaling has occurred. What I'm asking is when the min-balance field is zero, should we marshal to "min-balance": 0 or exclude the field all together with emitemtpy.

@jasonpaulos
Copy link
Contributor

I believe every account (even accounts with 0 balance) has a minimum balance of 100,000 microAlgos, so we should never expect the response to contain a 0.

@pbennett
Copy link
Contributor

pbennett commented Feb 2, 2023

This has bitten me recently and I had to hack around it in a semi-awkward way in my backend code. Isn't this just adding a single field to the models.Account structure? SDKs should be in-sync with the APIs, so I'm curious why these SDK changes have remained opened for over a year in every SDK.

I'd PR it myself but I can't build or run the tests on my M1 (I've had longstanding issue open for that as well).

@rh-low
Copy link

rh-low commented Sep 6, 2023

Is anyone fixing this soon?

@gmalouf
Copy link
Contributor

gmalouf commented May 23, 2024

Addressed by #641

@gmalouf gmalouf closed this as completed May 23, 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 a pull request may close this issue.

8 participants