return NewSuccessResponse(balances)
}
+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)
+}
+
// POST /get-transaction
func (a *API) getTransaction(ctx context.Context, txInfo struct {
TxID string `json:"tx_id"`
resOutID := txDesc.Tx.ResultIds[0]
resOut := txDesc.Tx.Entries[*resOutID]
switch out := resOut.(type) {
- case *bc.Output:
+ case *bc.IntraChainOutput:
+ tx.MuxID = *out.Source.Ref
+ case *bc.VoteOutput:
tx.MuxID = *out.Source.Ref
case *bc.Retirement:
tx.MuxID = *out.Source.Ref
}
accountID = acc.ID
}
- accountUTXOs := a.wallet.GetAccountUtxos(accountID, filter.ID, filter.Unconfirmed, filter.SmartContract)
+ accountUTXOs := a.wallet.GetAccountUtxos(accountID, filter.ID, filter.Unconfirmed, filter.SmartContract, false)
UTXOs := []query.AnnotatedUTXO{}
for _, utxo := range accountUTXOs {