From b2fdb447fe7b0dfe9b986cdd8ac76874eb8adea3 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Sat, 14 Dec 2024 15:35:12 +0100 Subject: [PATCH] Fix: query finality contract balance --- tests/e2e/bcd_consumer_integration_test.go | 4 ++-- .../clientcontroller/cosmwasm/cosmwasm.go | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/e2e/bcd_consumer_integration_test.go b/tests/e2e/bcd_consumer_integration_test.go index 82467d3..9c0e1a0 100644 --- a/tests/e2e/bcd_consumer_integration_test.go +++ b/tests/e2e/bcd_consumer_integration_test.go @@ -297,7 +297,7 @@ func (s *BCDConsumerIntegrationTestSuite) Test6ConsumerFPRewardsGeneration() { s.NotNil(czActivatedBlock) // Ensure the staking contract balance is initially empty - rewards, err := s.cosmwasmController.QueryStakingContractBalances() + rewards, err := s.cosmwasmController.QueryFinalityContractBalances() s.NoError(err) s.Empty(rewards) @@ -344,7 +344,7 @@ func (s *BCDConsumerIntegrationTestSuite) Test6ConsumerFPRewardsGeneration() { // Ensure consumer rewards are generated and sent to the staking contract s.Eventually(func() bool { - rewards, err := s.cosmwasmController.QueryStakingContractBalances() + rewards, err := s.cosmwasmController.QueryFinalityContractBalances() if err != nil { s.T().Logf("failed to query rewards: %s", err.Error()) return false diff --git a/tests/e2e/cosmos-integration-e2e/clientcontroller/cosmwasm/cosmwasm.go b/tests/e2e/cosmos-integration-e2e/clientcontroller/cosmwasm/cosmwasm.go index c92ce71..3f88f44 100644 --- a/tests/e2e/cosmos-integration-e2e/clientcontroller/cosmwasm/cosmwasm.go +++ b/tests/e2e/cosmos-integration-e2e/clientcontroller/cosmwasm/cosmwasm.go @@ -584,6 +584,10 @@ func (cc *CosmwasmConsumerController) QueryDelegations() (*ConsumerDelegationsRe return &resp, nil } +func (cc *CosmwasmConsumerController) QueryFinalityContractBalances() (sdk.Coins, error) { + return cc.QueryBalances(cc.cfg.BtcFinalityContractAddress) +} + func (cc *CosmwasmConsumerController) QueryStakingContractBalances() (sdk.Coins, error) { return cc.QueryBalances(cc.cfg.BtcStakingContractAddress) }