Skip to content

Commit 50799ff

Browse files
authored
fix: guard against nil transaction (#499)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 16888c8 commit 50799ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/utxorpc/submit.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ func (s *submitServiceServer) SubmitTx(
4343
) (*connect.Response[submit.SubmitTxResponse], error) {
4444
// txRaw
4545
txRaw := req.Msg.GetTx() // *AnyChainTx
46+
if txRaw == nil {
47+
return nil, errors.New("transaction is required")
48+
}
4649
log.Printf("Got a SubmitTx request with 1 transaction")
4750
resp := &submit.SubmitTxResponse{}
4851

0 commit comments

Comments
 (0)