helium-ledger-app
helium-ledger-app copied to clipboard
Implement Max Payment
Feature Request
Adding a --deduct
flag to the pay
command, which would automatically determine how much HNT would be required to complete a transaction. If the wallet's remaining HNT is not sufficient, using the flag would then deduct it from the payment amount and prompt the user if they want to proceed with the new transfer amount.
My exact use-case is wanting to send the full amount of HNT in one wallet to another address. It's difficult to manually determine the exact math required to make the transfer result in a 0HNT wallet.
@ctrlshiftmake is this feature available now?
No it's not. But I implemented very similar logic here: https://github.com/helium/helium-wallet-rs/pull/76
It's actually slightly easier here because Ledger still uses payment_v1
for now. So the cost will always be $0.35 in DC (not iterative logic necessary).
There has been blockchain work to make the underlying payment_v2 transaction support a "max payment" option which effectively sweeps the entire balance (minus the DC cost).
When that is live, we will go towards integrating that feature in ledger-app and ledger-cli.