1
- // Copyright © 2023 Kaleido, Inc.
1
+ // Copyright © 2024 Kaleido, Inc.
2
2
//
3
3
// SPDX-License-Identifier: Apache-2.0
4
4
//
@@ -206,7 +206,7 @@ func (sth *simpleTransactionHandler) processPolicyAPIRequests(ctx context.Contex
206
206
var pending * pendingState
207
207
// If this transaction is in-flight, we use that record
208
208
for _ , inflight := range sth .inflight {
209
- if inflight .mtx .ID == request .txID {
209
+ if inflight != nil && inflight . mtx != nil && inflight .mtx .ID == request .txID {
210
210
pending = inflight
211
211
break
212
212
}
@@ -483,7 +483,7 @@ func (sth *simpleTransactionHandler) HandleTransactionConfirmations(ctx context.
483
483
// Will be picked up on the next policy loop cycle
484
484
var pending * pendingState
485
485
for _ , p := range sth .inflight {
486
- if p .mtx .ID == txID {
486
+ if p != nil && p . mtx != nil && p .mtx .ID == txID {
487
487
pending = p
488
488
break
489
489
}
@@ -505,7 +505,7 @@ func (sth *simpleTransactionHandler) HandleTransactionConfirmations(ctx context.
505
505
func (sth * simpleTransactionHandler ) HandleTransactionReceiptReceived (ctx context.Context , txID string , receipt * ffcapi.TransactionReceiptResponse ) (err error ) {
506
506
var pending * pendingState
507
507
for _ , p := range sth .inflight {
508
- if p .mtx .ID == txID {
508
+ if p != nil && p . mtx != nil && p .mtx .ID == txID {
509
509
pending = p
510
510
break
511
511
}
0 commit comments