Skip to content

Commit

Permalink
fix if a tx is finalized very fast (#84)
Browse files Browse the repository at this point in the history
* fix

* comment
  • Loading branch information
ARR552 authored Oct 31, 2024
1 parent f1286e9 commit 1b8de9d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ethtxmanager/ethtxmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,11 @@ func (c *Client) ProcessPendingMonitoredTxs(ctx context.Context, resultHandler R
continue
}

// if the result status is confirmed or failed, breaks the wait loop
if result.Status == types.MonitoredTxStatusMined || result.Status == types.MonitoredTxStatusFailed {
// if the result status is mined, safe, finalized or failed, breaks the wait loop
if result.Status == types.MonitoredTxStatusMined ||
result.Status == types.MonitoredTxStatusSafe ||
result.Status == types.MonitoredTxStatusFinalized ||
result.Status == types.MonitoredTxStatusFailed {
break
}

Expand Down

0 comments on commit 1b8de9d

Please sign in to comment.