diff --git a/extras/jsonrpc/daemon.go b/extras/jsonrpc/daemon.go index 25fd807..815c87f 100644 --- a/extras/jsonrpc/daemon.go +++ b/extras/jsonrpc/daemon.go @@ -149,12 +149,12 @@ func (d *Client) SingleAccountList(accountID string) (*Account, error) { } type AccountSettings struct { - Default bool `json:"default"` - NewName string `json:"new_name"` - ReceivingGap int `json:"receiving_gap"` - ReceivingMaxUses int `json:"receiving_max_uses"` - ChangeGap int `json:"change_gap"` - ChangeMaxUses int `json:"change_max_uses"` + Default *bool `json:"default,omitempty"` + NewName *string `json:"new_name,omitempty"` + ReceivingGap *int `json:"receiving_gap,omitempty"` + ReceivingMaxUses *int `json:"receiving_max_uses,omitempty"` + ChangeGap *int `json:"change_gap,omitempty"` + ChangeMaxUses *int `json:"change_max_uses,omitempty"` } func (d *Client) AccountSet(accountID string, settings AccountSettings) (*Account, error) { diff --git a/extras/jsonrpc/daemon_test.go b/extras/jsonrpc/daemon_test.go index cc12c48..b072925 100644 --- a/extras/jsonrpc/daemon_test.go +++ b/extras/jsonrpc/daemon_test.go @@ -350,7 +350,7 @@ func TestClient_AccountSet(t *testing.T) { } account := (accounts.LBCRegtest)[0].ID - got, err := d.AccountSet(account, AccountSettings{ChangeMaxUses: 10000}) + got, err := d.AccountSet(account, AccountSettings{ChangeMaxUses: util.PtrToInt(10000)}) if err != nil { t.Error(err) return