Skip to content

Commit ed91a8a

Browse files
authored
qa: use CommitmentFinalized for USDC balance check (#3542)
## Summary of Changes - Change `GetTokenAccountBalance` commitment level from `CommitmentConfirmed` to `CommitmentFinalized` when checking USDC balances in the QA settlement test ## Testing Verification - Fixes flaky `TestQA_MulticastSettlement/validate_balance_after_pay` failure seen in https://github.com/malbeclabs/infra/actions/runs/24531910905/job/71717025418, where the balance was read immediately after a transaction was confirmed but before it was finalized, causing the debit to not yet be visible
1 parent d23d82f commit ed91a8a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

e2e/internal/qa/client_settlement.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func (c *Client) GetUSDCBalance(ctx context.Context) (uint64, error) {
197197
}
198198

199199
solanaClient := rpc.New(c.SolanaRPCURL)
200-
result, err := solanaClient.GetTokenAccountBalance(ctx, ata, rpc.CommitmentConfirmed)
200+
result, err := solanaClient.GetTokenAccountBalance(ctx, ata, rpc.CommitmentFinalized)
201201
if err != nil {
202202
return 0, fmt.Errorf("failed to get token account balance for ATA %s on host %s: %w", ata, c.Host, err)
203203
}

0 commit comments

Comments
 (0)