File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ type TransactionEvent struct {
33
33
TransactionCbor byteSliceJsonHex `json:"transactionCbor,omitempty"`
34
34
Inputs []ledger.TransactionInput `json:"inputs"`
35
35
Outputs []ledger.TransactionOutput `json:"outputs"`
36
- Certificates []ledger.Certificate `json:"certificates"`
36
+ Certificates []ledger.Certificate `json:"certificates,omitempty "`
37
37
Metadata * cbor.LazyValue `json:"metadata,omitempty"`
38
38
Fee uint64 `json:"fee"`
39
39
TTL uint64 `json:"ttl,omitempty"`
@@ -65,15 +65,19 @@ func NewTransactionEvent(
65
65
BlockHash : block .Hash (),
66
66
Inputs : tx .Inputs (),
67
67
Outputs : tx .Outputs (),
68
- Certificates : tx .Certificates (),
69
68
Fee : tx .Fee (),
70
- TTL : tx .TTL (),
71
69
}
72
70
if includeCbor {
73
71
evt .TransactionCbor = tx .Cbor ()
74
72
}
73
+ if tx .Certificates () != nil {
74
+ evt .Certificates = tx .Certificates ()
75
+ }
75
76
if tx .Metadata () != nil {
76
77
evt .Metadata = tx .Metadata ()
77
78
}
79
+ if tx .TTL () != 0 {
80
+ evt .TTL = tx .TTL ()
81
+ }
78
82
return evt
79
83
}
You can’t perform that action at this time.
0 commit comments