From bc9886b3e8abc0912047a9102fa1da282cc49632 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Wed, 12 Jun 2019 02:53:42 +0200 Subject: [PATCH] add ability to use everything for account_fund --- extras/jsonrpc/daemon.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extras/jsonrpc/daemon.go b/extras/jsonrpc/daemon.go index f6965c4..4ebdb48 100644 --- a/extras/jsonrpc/daemon.go +++ b/extras/jsonrpc/daemon.go @@ -169,13 +169,15 @@ func (d *Client) AccountBalance(account *string) (*AccountBalanceResponse, error }) } -func (d *Client) AccountFund(fromAccount string, toAccount string, amount string, outputs uint64) (*AccountFundResponse, error) { +// funds an account. If everything is true then amount is ignored +func (d *Client) AccountFund(fromAccount string, toAccount string, amount string, outputs uint64, everything bool) (*AccountFundResponse, error) { response := new(AccountFundResponse) return response, d.call(response, "account_fund", map[string]interface{}{ "from_account": fromAccount, "to_account": toAccount, "amount": amount, "outputs": outputs, + "everything": everything, "broadcast": true, }) }