Skip to content

Commit

Permalink
add ability to use everything for account_fund
Browse files Browse the repository at this point in the history
  • Loading branch information
nikooo777 committed Jun 12, 2019
1 parent 963177c commit bc9886b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extras/jsonrpc/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}
Expand Down

0 comments on commit bc9886b

Please sign in to comment.