Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in_progress property to Trace #474

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -5457,6 +5457,11 @@
"example": false,
"type": "boolean"
},
"in_progress": {
"description": "Trace is not finished yet. Transactions still happening",
"example": false,
"type": "boolean"
},
"interfaces": {
"example": [
"wallet",
Expand All @@ -5473,7 +5478,8 @@
},
"required": [
"transaction",
"interfaces"
"interfaces",
"in_progress"
],
"type": "object"
},
Expand Down
5 changes: 5 additions & 0 deletions api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6527,6 +6527,7 @@ components:
required:
- transaction
- interfaces
- in_progress
properties:
transaction:
$ref: '#/components/schemas/Transaction'
Expand All @@ -6535,6 +6536,10 @@ components:
items:
type: string
example: [ "wallet", "tep62_item" ]
in_progress:
type: boolean
example: false
description: Trace is not finished yet. Transactions still happening
children:
type: array
items:
Expand Down
6 changes: 5 additions & 1 deletion pkg/api/event_converters.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ func distinctAccounts(skip *tongo.AccountID, book addressBook, accounts ...*tong
}

func convertTrace(t *core.Trace, book addressBook) oas.Trace {
trace := oas.Trace{Transaction: convertTransaction(t.Transaction, t.AccountInterfaces, book), Interfaces: g.ToStrings(t.AccountInterfaces)}
trace := oas.Trace{
Transaction: convertTransaction(t.Transaction, t.AccountInterfaces, book),
Interfaces: g.ToStrings(t.AccountInterfaces),
InProgress: t.InProgress(),
}

sort.Slice(t.Children, func(i, j int) bool {
if t.Children[i].InMsg == nil || t.Children[j].InMsg == nil {
Expand Down
25 changes: 21 additions & 4 deletions pkg/oas/oas_json_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions pkg/oas/oas_schemas_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading