+func (a *API) listAccountVotes(ctx context.Context, filter struct {
+ AccountID string `json:"account_id"`
+ AccountAlias string `json:"account_alias"`
+}) Response {
+ accountID := filter.AccountID
+ if filter.AccountAlias != "" {
+ acc, err := a.wallet.AccountMgr.FindByAlias(filter.AccountAlias)
+ if err != nil {
+ return NewErrorResponse(err)
+ }
+ accountID = acc.ID
+ }
+
+ votes, err := a.wallet.GetAccountVotes(accountID, "")
+ if err != nil {
+ return NewErrorResponse(err)
+ }
+ return NewSuccessResponse(votes)
+}
+