Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
javiersuweijie committed Mar 27, 2024
1 parent bc47bfb commit 3cfc47a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x/alliance/bindings/query_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ func (q *QueryPlugin) GetAlliance(ctx sdk.Context, denom string) (res []byte, er
},
IsInitialized: asset.IsInitialized,
})
return
return res, err
}

func (q *QueryPlugin) GetDelegation(ctx sdk.Context, denom string, delegator string, validator string) (res []byte, err error) {
delegatorAddr, err := sdk.AccAddressFromBech32(delegator)
if err != nil {
return
return nil, err
}
validatorAddr, err := sdk.ValAddressFromBech32(validator)
if err != nil {
return
return nil, err
}
delegation, found := q.allianceKeeper.GetDelegation(ctx, delegatorAddr, validatorAddr, denom)
if !found {
Expand Down Expand Up @@ -115,11 +115,11 @@ func (q *QueryPlugin) GetDelegationRewards(ctx sdk.Context,
) (res []byte, err error) {
delegatorAddr, err := sdk.AccAddressFromBech32(delegator)
if err != nil {
return
return nil, err
}
validatorAddr, err := sdk.ValAddressFromBech32(validator)
if err != nil {
return
return nil, err
}
allianceValidator, err := q.allianceKeeper.GetAllianceValidator(ctx, validatorAddr)
if err != nil {
Expand All @@ -128,7 +128,7 @@ func (q *QueryPlugin) GetDelegationRewards(ctx sdk.Context,

rewards, err := q.allianceKeeper.ClaimDelegationRewards(ctx, delegatorAddr, allianceValidator, denom)
if err != nil {
return
return nil, err
}

res, err = json.Marshal(types.DelegationRewardsResponse{
Expand Down

0 comments on commit 3cfc47a

Please sign in to comment.