Add account param on GetNewAddress

This commit is contained in:
Albert Puigsech Galicia 2015-04-27 00:44:16 +02:00
parent 13b872259d
commit b1d5c1b9f6

View file

@ -901,14 +901,14 @@ func (r FutureGetNewAddressResult) Receive() (btcutil.Address, error) {
// returned instance. // returned instance.
// //
// See GetNewAddress for the blocking version and more details. // See GetNewAddress for the blocking version and more details.
func (c *Client) GetNewAddressAsync() FutureGetNewAddressResult { func (c *Client) GetNewAddressAsync(account string) FutureGetNewAddressResult {
cmd := btcjson.NewGetNewAddressCmd(nil) cmd := btcjson.NewGetNewAddressCmd(&account)
return c.sendCmd(cmd) return c.sendCmd(cmd)
} }
// GetNewAddress returns a new address. // GetNewAddress returns a new address.
func (c *Client) GetNewAddress() (btcutil.Address, error) { func (c *Client) GetNewAddress(account string) (btcutil.Address, error) {
return c.GetNewAddressAsync().Receive() return c.GetNewAddressAsync(account).Receive()
} }
// FutureGetRawChangeAddressResult is a future promise to deliver the result of // FutureGetRawChangeAddressResult is a future promise to deliver the result of