Skip to content

Commit

Permalink
Fix: entrypoint schema endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Mar 25, 2022
1 parent 4f98936 commit 37781bd
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions cmd/api/handlers/entrypoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,18 @@ func (ctx *Context) GetEntrypointSchema(c *gin.Context) {
break
}

account, err := ctx.Accounts.Get(req.NetworkID(), req.Address)
if ctx.handleError(c, err, 0) {
return
}

op, err := ctx.Operations.Last(
map[string]interface{}{
"operation.network": req.NetworkID(),
"destination.address": req.Address,
"kind": modelTypes.OperationKindTransaction,
"entrypoint": esReq.EntrypointName,
"status": modelTypes.OperationStatusApplied,
"operation.network": req.NetworkID(),
"destination_id": account.ID,
"kind": modelTypes.OperationKindTransaction,
"entrypoint": esReq.EntrypointName,
"status": modelTypes.OperationStatusApplied,
}, 0)
if ctx.handleError(c, err, 0) {
return
Expand Down

0 comments on commit 37781bd

Please sign in to comment.