Skip to content

Add an option to send a transaction using all available LBC #1628

Open
@tzarebczan

Description

@tzarebczan

The Issue

As a daemon or app user, I want to be able to move all my funds from one address to another. Currently, you'd need to send some amount that's smaller than the wallet balance to account for fees. There should be an option that allows all funds to be sent along with the appropriate fee, i.e. a send max scenario.

Steps

  • make it so you can use all as a value to --amount. this signals you want to use your whole available balance
  • create the transaction internally using the full amount, then estimate the fee, then update the transaction to subtract the fee from the full amount

APIs that should support this: support_create, wallet_send, any other api that has a --amount flag

Use case: i want to support my channel with all my available lbc and i don't want to do the math to figure out how much the fee should be.

Take a look txo_fund --everything. There may be reusable code there. (https://github.com/lbryio/lbry-sdk/blob/master/lbry/wallet/account.py#L488)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions