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: negative stx available balance #3933

Merged
merged 1 commit into from
Jun 27, 2023
Merged

Conversation

alter-eggo
Copy link
Contributor

@alter-eggo alter-eggo commented Jun 27, 2023

Try out this version of the Hiro Wallet - download extension builds.

Closes #3761 and #3716

Fixes the issue of extracting fees of inbound txs from available balance

Copy link
Collaborator

@kyranjamie kyranjamie left a comment

Choose a reason for hiding this comment

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

Can you describe the changes?

Wonder also if a Math.min(0, ...balanceValue) (or bignumber equivalent might be desired here)?

@alter-eggo
Copy link
Contributor Author

@kyranjamie you mean Math.max? to remove possibility of showing negative value?

@alter-eggo alter-eggo force-pushed the fix/stx-available-balance branch from a709a2d to c0851da Compare June 27, 2023 11:07
@vercel vercel bot temporarily deployed to Preview June 27, 2023 11:08 Inactive
@alter-eggo alter-eggo force-pushed the fix/stx-available-balance branch from c0851da to 6194a51 Compare June 27, 2023 11:18
@vercel vercel bot temporarily deployed to Preview June 27, 2023 11:18 Inactive
@alter-eggo
Copy link
Contributor Author

@kyranjamie I changed according to your suggestion but then revert. I think we shouldn't manually set negative value to zero, as this indicates about problems in code. if we did this before - this bug would probably be always there

@kyranjamie
Copy link
Collaborator

Yep, makes sense

@alter-eggo alter-eggo added this pull request to the merge queue Jun 27, 2023
Merged via the queue into dev with commit 6a2adf0 Jun 27, 2023
@alter-eggo alter-eggo deleted the fix/stx-available-balance branch June 27, 2023 13:21
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.

Don't subtract fee from balance for incoming Stacks transactions
3 participants