Skip to content

Commit ab0abe7

Browse files
committed
PR feedback: add validation
1 parent 42ee7f9 commit ab0abe7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/txm/clientwrappers/dualbroadcast/meta_client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ type Metacalldata struct {
331331
}
332332

333333
func (a *MetaClient) SendRequest(parentCtx context.Context, tx *types.Transaction, attempt *types.Attempt, txMeta *types.TxMeta, fwdrDestAddress common.Address) (*MetacalldataResponse, error) {
334+
if txMeta == nil || txMeta.FwdrDestAddress == nil || txMeta.DualBroadcastParams == nil {
335+
return nil, errors.New("missing tx meta fields for dual broadcast request")
336+
}
337+
334338
m := []byte{97, 116, 108, 97, 115, 95, 111, 101, 118, 65, 117, 99, 116, 105, 111, 110}
335339

336340
cid := hexutil.Uint64(a.chainID.Uint64())

0 commit comments

Comments
 (0)