HomePhabricator

[Cashtab] Select 99% of balance if user cannot afford the whole agora offer

Description

[Cashtab] Select 99% of balance if user cannot afford the whole agora offer

Summary:
Working on exact fee calculation in D18380. Apart from various complexities, it's also a tough UX problem to manage. When we do get it right, and a user really can max buy -- well, then they have no XEC left for any other actions. So we need to either have a notice for this or prevent it somehow.

For now, this is probably the best kind of solution. It's better than the user seeing an error whenever they try to Max buy. And it will never consume the user's entire XEC balance.

Test Plan:
npm test

this diff is deployed at cashtab.io

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: Fabien, emack

Differential Revision: https://reviews.bitcoinabc.org/D18382

Details

Provenance
bytesofmanAuthored on Jul 17 2025, 22:49
bytesofmanPushed on Jul 18 2025, 18:04
Reviewer
Restricted Project
Differential Revision
D18382: [Cashtab] Select 99% of balance if user cannot afford the whole agora offer
Parents
rABC3158dca172bb: [Cashtab] Catch any errors that come up in creating the agora partial acceptTx
Branches
Unknown
Tags
Unknown