mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
fix: remove duplicat query logic (#684)
This commit is contained in:
parent
dbb385ecd8
commit
8d142458dd
@ -228,21 +228,17 @@ func queryGetClaims(ctx sdk.Context, req abci.RequestQuery, k Keeper) ([]byte, e
|
||||
} else if owner {
|
||||
harvestParams := k.GetParams(ctx)
|
||||
for _, lps := range harvestParams.LiquidityProviderSchedules {
|
||||
for _, dt := range types.DepositTypesClaimQuery {
|
||||
claim, found := k.GetClaim(ctx, params.Owner, lps.DepositDenom, dt)
|
||||
claim, found := k.GetClaim(ctx, params.Owner, lps.DepositDenom, types.LP)
|
||||
if found {
|
||||
claims = append(claims, claim)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, dds := range harvestParams.DelegatorDistributionSchedules {
|
||||
for _, dt := range types.DepositTypesClaimQuery {
|
||||
claim, found := k.GetClaim(ctx, params.Owner, dds.DistributionSchedule.DepositDenom, dt)
|
||||
claim, found := k.GetClaim(ctx, params.Owner, dds.DistributionSchedule.DepositDenom, types.Stake)
|
||||
if found {
|
||||
claims = append(claims, claim)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if depositType {
|
||||
harvestParams := k.GetParams(ctx)
|
||||
for _, lps := range harvestParams.LiquidityProviderSchedules {
|
||||
|
Loading…
Reference in New Issue
Block a user