Commit 9b02bb57 authored by Matthew Slipper's avatar Matthew Slipper
parent 86363951
...@@ -2,6 +2,7 @@ package op_e2e ...@@ -2,6 +2,7 @@ package op_e2e
import ( import (
"context" "context"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"math/big" "math/big"
"testing" "testing"
"time" "time"
...@@ -51,14 +52,15 @@ func TestMintOnRevertedDeposit(t *testing.T) { ...@@ -51,14 +52,15 @@ func TestMintOnRevertedDeposit(t *testing.T) {
}) })
// Confirm balance // Confirm balance
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 15*time.Second)
endBalance, err := l2Verif.BalanceAt(ctx, fromAddr, nil) endBalance, err := wait.ForBalanceChange(ctx, l2Verif, fromAddr, startBalance)
cancel() cancel()
require.Nil(t, err) require.Nil(t, err)
ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 1*time.Second)
toAddrBalance, err := l2Verif.BalanceAt(ctx, toAddr, nil) toAddrBalance, err := l2Verif.BalanceAt(ctx, toAddr, nil)
require.NoError(t, err)
cancel() cancel()
require.NoError(t, err)
diff := new(big.Int) diff := new(big.Int)
diff = diff.Sub(endBalance, startBalance) diff = diff.Sub(endBalance, startBalance)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment