Skip to content

Commit

Permalink
Added small check to allow for nil TxMeta in CW SubmitTransaction (#1…
Browse files Browse the repository at this point in the history
…3805)

* Added small check to allow for nil TxMeta in CW SubmitTransaction

* Added changeset
  • Loading branch information
silaslenihan authored Jul 10, 2024
1 parent 7413511 commit 5daee38
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/neat-rockets-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Added small check to allow for nil TxMeta in CW SubmitTransaction
9 changes: 8 additions & 1 deletion core/services/relay/evm/chain_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,19 @@ func (w *chainWriter) SubmitTransaction(ctx context.Context, contract, method st
v = value
}

var txMeta *txmgrtypes.TxMeta[common.Address, common.Hash]
if meta != nil && meta.WorkflowExecutionID != nil {
txMeta = &txmgrtypes.TxMeta[common.Address, common.Hash]{
WorkflowExecutionID: meta.WorkflowExecutionID,
}
}

req := evmtxmgr.TxRequest{
FromAddress: methodConfig.FromAddress,
ToAddress: common.HexToAddress(toAddress),
EncodedPayload: calldata,
FeeLimit: methodConfig.GasLimit,
Meta: &txmgrtypes.TxMeta[common.Address, common.Hash]{WorkflowExecutionID: meta.WorkflowExecutionID},
Meta: txMeta,
Strategy: w.sendStrategy,
Checker: checker,
Value: *v,
Expand Down

0 comments on commit 5daee38

Please sign in to comment.