Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
added waitReceipt for OpenCommitment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed Apr 15, 2024
1 parent 7b426ed commit bd80a56
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/contracts/preconf/preconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,12 @@ func (p *preconfContract) OpenCommitment(
return common.Hash{}, err
}

receipt, err := p.client.WaitForReceipt(ctx, txHash)
if err != nil {
return common.Hash{}, err // Updated to return common.Hash{}
}

p.logger.Info("preconf contract openCommitment successful", "txHash", txHash, "receiptStatus", receipt.Status)

return txHash, nil
}

0 comments on commit bd80a56

Please sign in to comment.