Skip to content

Commit

Permalink
fix: trim the initial sender balance variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Sep 19, 2024
1 parent 29516a9 commit 2ff8991
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/bridge-e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ setup() {
# Query for initial sender balance
run queryContract "$l1_rpc_url" "$gas_token_addr" "$balance_of_fn_sig" "$sender_addr"
assert_success
local gas_token_init_sender_balance=$(echo "$output" | tail -n 1)
local gas_token_init_sender_balance=$(echo "$output" | tail -n 1 | awk '{print $1}')
echo "Initial sender balance $gas_token_init_sender_balance" of gas token on L1 >&3

# Mint gas token on L1
Expand All @@ -95,7 +95,11 @@ setup() {
local gas_token_final_sender_balance=$(echo "$output" |
tail -n 1 |
awk '{print $1}')
local expected_balance=$(echo "$gas_token_init_sender_balance + $wei_amount" | bc)
local expected_balance=$(
echo "$gas_token_init_sender_balance + $wei_amount" |
bc |
awk '{print $1}'
)

echo "Sender balance ($sender_addr) (gas token L1): $gas_token_final_sender_balance" >&3
assert_equal "$gas_token_final_sender_balance" "$expected_balance"
Expand Down

0 comments on commit 2ff8991

Please sign in to comment.