Skip to content

Commit

Permalink
add signature to API transaction handler
Browse files Browse the repository at this point in the history
Signed-off-by: p4u <[email protected]>
  • Loading branch information
p4u committed Nov 16, 2023
1 parent 22f46ef commit 2353fd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ type BlockTransactionsInfo struct {
type GenericTransactionWithInfo struct {
TxContent json.RawMessage `json:"tx"`
TxInfo indexertypes.Transaction `json:"txInfo"`
Signature types.HexBytes `json:"signature"`
}

type ChainInfo struct {
Expand Down
1 change: 1 addition & 0 deletions api/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ func (a *API) chainTxHandler(_ *apirest.APIdata, ctx *httprouter.HTTPContext) er
}
tx := &GenericTransactionWithInfo{
TxContent: []byte(protoFormat(stx.Tx)),
Signature: stx.Signature,
TxInfo: *ref,
}
data, err := json.Marshal(tx)
Expand Down

0 comments on commit 2353fd0

Please sign in to comment.