Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dusannosovic-ethernal committed Feb 21, 2024
1 parent 58ee559 commit b84ee99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2e-polybft/e2e/bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,8 @@ func TestE2E_Bridge_NonMintableERC20Token_WithPremine(t *testing.T) {
require.NoError(t, err)

checkBalancesFn := func(address types.Address, rootExpected, childExpected *big.Int, isValidator bool) {
offset := big.NewInt(100)

t.Log("Checking balance of native ERC20 token on root and child", "Address", address,
"Root expected", rootExpected, "Child Expected", childExpected)

Expand All @@ -1323,7 +1325,7 @@ func TestE2E_Bridge_NonMintableERC20Token_WithPremine(t *testing.T) {
if isValidator {
require.True(t, balance.Cmp(childExpected) >= 0) // because of London fork
} else {
require.True(t, balance.Cmp(childExpected) <= 0)
require.True(t, balance.Cmp(childExpected.Sub(childExpected, offset)) >= 0)
}
}

Expand Down

0 comments on commit b84ee99

Please sign in to comment.