Skip to content

Commit bc9886b

Browse files
committed
add ability to use everything for account_fund
1 parent 963177c commit bc9886b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extras/jsonrpc/daemon.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,15 @@ func (d *Client) AccountBalance(account *string) (*AccountBalanceResponse, error
169169
})
170170
}
171171

172-
func (d *Client) AccountFund(fromAccount string, toAccount string, amount string, outputs uint64) (*AccountFundResponse, error) {
172+
// funds an account. If everything is true then amount is ignored
173+
func (d *Client) AccountFund(fromAccount string, toAccount string, amount string, outputs uint64, everything bool) (*AccountFundResponse, error) {
173174
response := new(AccountFundResponse)
174175
return response, d.call(response, "account_fund", map[string]interface{}{
175176
"from_account": fromAccount,
176177
"to_account": toAccount,
177178
"amount": amount,
178179
"outputs": outputs,
180+
"everything": everything,
179181
"broadcast": true,
180182
})
181183
}

0 commit comments

Comments
 (0)