Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Jun 7, 2024
1 parent 69f9877 commit fde43f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion x/auction/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (q Querier) RewardsAuction(goCtx context.Context, msg *auction.QueryRewards
r.Rewards = rewards.Rewards
r.EndsAt = rewards.EndsAt

bid, _ := q.Keeper(&ctx).getRewardsBid(id)
bid := q.Keeper(&ctx).getRewardsBid(id)
if bid != nil {
r.Bidder = bid.Bidder
r.Bid = coin.UmeeInt(bid.Amount)
Expand Down
6 changes: 3 additions & 3 deletions x/auction/keeper/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (k Keeper) FinalizeRewardsAuction() error {
return nil
}

bid, _ := k.getRewardsBid(id)
bid := k.getRewardsBid(id)
if bid != nil && len(bid.Bidder) != 0 {
bidderAccAddr := sdk.MustAccAddressFromBech32(bid.Bidder)
err := k.sendCoins(k.accs.RewardsCollect, bidderAccAddr, a.Rewards)
Expand Down Expand Up @@ -98,13 +98,13 @@ func (k Keeper) rewardsBid(msg *auction.MsgRewardsBid) error {
return store.SetValue(k.store, key, &bid, keyMsg)
}

func (k Keeper) getRewardsBid(id uint32) (*auction.Bid, uint32) {
func (k Keeper) getRewardsBid(id uint32) *auction.Bid {
if id == 0 {
id = k.currentRewardsAuctionID()
}
keyMsg := "auction.rewards.bid"
key := k.keyRewardsBid(id)
return store.GetValue[*auction.Bid](k.store, key, keyMsg), id
return store.GetValue[*auction.Bid](k.store, key, keyMsg)
}

func (k Keeper) getAllRewardsBids() ([]auction.BidKV, error) {
Expand Down

0 comments on commit fde43f9

Please sign in to comment.