Skip to content

Commit

Permalink
add context to the error returned by waitForReceipt when context is d…
Browse files Browse the repository at this point in the history
…one before tx is mined (#293)
  • Loading branch information
samlaf authored Jul 8, 2024
1 parent 8f12390 commit 5eb73ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chainio/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (m *SimpleTxManager) waitForReceipt(ctx context.Context, txID wallet.TxID)
for {
select {
case <-ctx.Done():
return nil, ctx.Err()
return nil, errors.Join(errors.New("Context done before tx was mined"), ctx.Err())
case <-queryTicker.C:
if receipt := m.queryReceipt(ctx, txID); receipt != nil {
return receipt, nil
Expand Down

0 comments on commit 5eb73ed

Please sign in to comment.