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

fix(wallet-grpc): return correct available balance and add timelocked balance #5181

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Feb 14, 2023

Description

get_balance call to returns timelocked_balance
get_balance call returns funds that are immediately spendable

Motivation and Context

Calls to get_balance seemingly do not yield the correct balance, e.g your wallet ui says available balance == 0 but the grpc call says available_balance > 0 (because it includes the timelocked funds). This PR changes the available_balance to reflect the amount of funds immediately spendable. This only happens on the grpc level to avoid a breaking change in other code (FFI etc)

How Has This Been Tested?

Existing cucumber. Tested with VN that queries the balance.

BREAKING CHANGE: get_balance grpc call has changed, available_balance no longer includes timelocked funds only immediately available funds. This probably only is used currently in cucumber tests.

Copy link
Collaborator

@SWvheerden SWvheerden left a comment

Choose a reason for hiding this comment

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

utAck

@stringhandler stringhandler added this pull request to the merge queue Feb 14, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Feb 14, 2023
@stringhandler stringhandler merged commit e001125 into tari-project:development Feb 14, 2023
@sdbondi sdbondi deleted the wallet-correct-available-balance branch February 15, 2023 05:24
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