Skip to content

Commit

Permalink
chore: wait for blocks after wallet creation (#6689)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Jun 25, 2024
1 parent 7da3ea3 commit 9ac1781
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion e2e/testsuite/testsuite.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ func (s *E2ETestSuite) CreateUserOnChainC(ctx context.Context, amount int64) ibc
// createWalletOnChainIndex creates a wallet with the given amount of funds on the chain of the given index.
func (s *E2ETestSuite) createWalletOnChainIndex(ctx context.Context, amount, chainIndex int64) ibc.Wallet {
chain := s.GetAllChains()[chainIndex]
return interchaintest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), sdkmath.NewInt(amount), chain)[0]
wallet := interchaintest.GetAndFundTestUsers(s.T(), ctx, strings.ReplaceAll(s.T().Name(), " ", "-"), sdkmath.NewInt(amount), chain)[0]
// note the GetAndFundTestUsers requires the caller to wait for some blocks before the funds are accessible.
s.Require().NoError(test.WaitForBlocks(ctx, 2, chain))
return wallet
}

// GetChainANativeBalance gets the balance of a given user on chain A.
Expand Down

0 comments on commit 9ac1781

Please sign in to comment.