Skip to content

Commit

Permalink
Fix: query finality contract balance
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Dec 14, 2024
1 parent 182df13 commit b2fdb44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/bcd_consumer_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit b2fdb44

Please sign in to comment.