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

Add spendable balances info to account page. #544

Open
4 tasks
SpicyLemon opened this issue Dec 5, 2024 · 0 comments
Open
4 tasks

Add spendable balances info to account page. #544

SpicyLemon opened this issue Dec 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SpicyLemon
Copy link

Summary

Add spendable balance info to the account page.

Problem Definition

As a user, I want to know both how much is actually in my account and how much I can spend so that I can make proper assessments of my (or any account's) situation.

With the hold module, and the exchange using it (e.g. commitments), there's funds in accounts that aren't spendable, but explorer doesn't show any of this information. So, e.g. if I've got 100hash in my account, and all of it is committed to a market, explorer says I've got 100hash available even though I couldn't send that to anyone or use it for fees or anything. This often leads to confusion.

Proposal

On the account info page (accounts/<address>):

  1. In the hash chart (upper right corner), add a "Spendable" row between "Available" and "Delegated".
  2. On the "Assets" tab (at the bottom), add a column for "Spendable".

The bank module has the SpendableBalances and SpendableBalanceByDenom queries that can get the info needed.

If you're trying to keep track of it through events, you'd be looking to track the EventHoldAdded and EventHoldReleased events. However, another way funds aren't spendable is with vesting accounts which use some math to determine how much is spendable at any given point in time. So just tracking those events might not provide a full picture.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@SpicyLemon SpicyLemon added the enhancement New feature or request label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant