Cleanup accounts jsonrpc code
This commit is contained in:
parent
630260d0b1
commit
818b00190d
2 changed files with 11 additions and 15 deletions
|
@ -182,15 +182,10 @@ func (d *Client) AccountFund(fromAccount string, toAccount string, amount string
|
|||
|
||||
func (d *Client) AccountCreate(accountName string, singleKey bool) (*AccountCreateResponse, error) {
|
||||
response := new(AccountCreateResponse)
|
||||
args := struct {
|
||||
AccountName string `json:"account_name"`
|
||||
SingleKey bool `json:"single_key"`
|
||||
}{
|
||||
AccountName: accountName,
|
||||
SingleKey: singleKey,
|
||||
}
|
||||
structs.DefaultTagName = "json"
|
||||
return response, d.call(response, "account_create", structs.Map(args))
|
||||
return response, d.call(response, "account_create", map[string]interface{}{
|
||||
"account_name": accountName,
|
||||
"single_key": singleKey,
|
||||
})
|
||||
}
|
||||
|
||||
func (d *Client) AccountRemove(accountID string) (*AccountRemoveResponse, error) {
|
||||
|
|
|
@ -219,6 +219,7 @@ type AccountCreateResponse struct {
|
|||
PrivateKey string `json:"private_key"`
|
||||
Seed string `json:"seed"`
|
||||
Ledger string `json:"ledger"`
|
||||
ModifiedOn float64 `json:"modified_on"`
|
||||
}
|
||||
|
||||
type AccountRemoveResponse AccountCreateResponse
|
||||
|
|
Loading…
Reference in a new issue