Skip to content

Commit

Permalink
Fix: recently called contracts endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Oct 1, 2023
1 parent 46f9ae9 commit 590135c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/api/handlers/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,16 +204,18 @@ type ContractWithStats struct {

// RecentlyCalledContract -
type RecentlyCalledContract struct {
ID int64 `json:"id"`
Address string `json:"address"`
LastAction time.Time `json:"last_action,omitempty" extensions:"x-nullable"`
TxCount int64 `json:"tx_count,omitempty" extensions:"x-nullable"`
ID int64 `json:"id"`
Address string `json:"address"`
LastAction time.Time `json:"last_action"`
OperationsCount int64 `json:"operations_count"`
}

// FromModel -
func (c *RecentlyCalledContract) FromModel(contract contract.Contract) {
c.Address = contract.Account.Address
c.ID = contract.ID
c.LastAction = contract.Account.LastAction
c.OperationsCount = contract.Account.OperationsCount
}

// OperationResponse -
Expand Down

0 comments on commit 590135c

Please sign in to comment.