Skip to content

Commit

Permalink
services/horizon: Add Muxed Account details to effect responses (#3610)
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio authored May 23, 2021
1 parent eee7b9a commit a11d444
Show file tree
Hide file tree
Showing 6 changed files with 196 additions and 113 deletions.
6 changes: 5 additions & 1 deletion protocols/horizon/effects/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package effects

import (
"encoding/json"
"github.com/stellar/go/xdr"
"time"

"github.com/stellar/go/protocols/horizon/base"
"github.com/stellar/go/support/render/hal"
"github.com/stellar/go/xdr"
)

// Peter 30-04-2019: this is copied from the history package "github.com/stellar/go/services/horizon/internal/db2/history"
Expand Down Expand Up @@ -249,6 +249,8 @@ type Base struct {
ID string `json:"id"`
PT string `json:"paging_token"`
Account string `json:"account"`
AccountMuxed string `json:"account_muxed,omitempty"`
AccountMuxedID uint64 `json:"account_muxed_id,omitempty"`
Type string `json:"type"`
TypeI int32 `json:"type_i"`
LedgerCloseTime time.Time `json:"created_at"`
Expand Down Expand Up @@ -382,6 +384,8 @@ type TrustlineDeauthorized struct {
type Trade struct {
Base
Seller string `json:"seller"`
SellerMuxed string `json:"seller_muxed,omitempty"`
SellerMuxedID uint64 `json:"seller_muxed_id,omitempty"`
OfferID int64 `json:"offer_id,string"`
SoldAmount string `json:"sold_amount"`
SoldAssetType string `json:"sold_asset_type"`
Expand Down
2 changes: 2 additions & 0 deletions services/horizon/internal/db2/history/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,8 @@ type Effect struct {
// when the effect type is trade
type TradeEffectDetails struct {
Seller string `json:"seller"`
SellerMuxed string `json:"seller_muxed,omitempty"`
SellerMuxedID uint64 `json:"seller_muxed_id,omitempty"`
OfferID int64 `json:"offer_id"`
SoldAmount string `json:"sold_amount"`
SoldAssetType string `json:"sold_asset_type"`
Expand Down
Loading

0 comments on commit a11d444

Please sign in to comment.