-
Notifications
You must be signed in to change notification settings - Fork 491
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
Account min balance field #2898
Comments
MotivationTransactions submitted to the algod frequently fail because they would cause the min balance of an address to increase to more than the current balance of that address. Currently, applications wanting to know an account's min balance have to calculate it themselves based on the known calculation for min balance and other information about the account. If the min balance calculation were ever to change, this would cause their implementations to break. And it's a duplication of logic. An easy example is a wallet user who wants to know how many Algos she can actually spend from her account. If we make this information easy to access, her wallet can display her min balance to her at all times. The min balance information can be added as part of the existing account information endpoints (the one for algod and the one for indexer) since these will usually already be called before submitting the transaction and this is the natural place to put it. |
@barnjamin if we just add this to the algod API would that work? We're wondering if there's a good reason to have it on indexer as well (if people need it they can always go to algod for it) |
This is a duplicate of #2419, closing this issue. |
Problem
It'd be nice to have the min balance required for an account to be computed during the API request to the algod/indexer
Solution
Prior to sending the Account payload back to the requestor, call
MinBalance
and add it to the payloadgo-algorand/data/basics/userBalance.go
Line 438 in 08d31fa
The text was updated successfully, but these errors were encountered: