Skip to content

Commit

Permalink
rm unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 committed Oct 3, 2024
1 parent 110ba4d commit 4229a30
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions btcstaking-tracker/stakingeventwatcher/expected_babylon_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,6 @@ func NewBabylonClientAdapter(babylonClient *bbnclient.Client) *BabylonClientAdap
}
}

// BtcDelegations - returns btc delegations TODO: Consider doing quick retries for failed queries.
func (bca *BabylonClientAdapter) BtcDelegations(offset uint64, limit uint64) ([]Delegation, error) {
activeDelegations, err := bca.DelegationsByStatus(btcstakingtypes.BTCDelegationStatus_ACTIVE, offset, limit)
if err != nil {
return nil, fmt.Errorf("failed to fetch active delegations: %w", err)
}

verifiedDelegations, err := bca.DelegationsByStatus(btcstakingtypes.BTCDelegationStatus_VERIFIED, offset, limit)
if err != nil {
return nil, fmt.Errorf("failed to fetch verified delegations: %w", err)
}

// Combine results
allDelegations := append(activeDelegations, verifiedDelegations...)

return allDelegations, nil
}

// DelegationsByStatus - returns btc delegations by status
func (bca *BabylonClientAdapter) DelegationsByStatus(
status btcstakingtypes.BTCDelegationStatus, offset uint64, limit uint64) ([]Delegation, error) {
Expand Down

0 comments on commit 4229a30

Please sign in to comment.