Skip to content

Commit

Permalink
fix: handle overflows during sum
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Sep 19, 2024
1 parent c5c56f0 commit ad645a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/helpers/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ function verify_native_token_balance() {
local final_balance_wei=$(cast balance "$account" --rpc-url "$rpc_url" | awk '{print $1}')

# Calculate expected final balance (initial_balance + amount)
local expected_final_balance_wei=$((initial_balance_wei + amount_wei))
local expected_final_balance_wei=$(echo "$initial_balance_wei + $amount_wei" | bc)

# Check if final_balance matches the expected final balance
if [ "$final_balance_wei" -eq "$expected_final_balance_wei" ]; then
Expand Down

0 comments on commit ad645a5

Please sign in to comment.