Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DongLieu committed Dec 19, 2024
1 parent 9cac265 commit 6db99df
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions x/auction/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,15 @@ func (k Querier) QueryAllBidsByAddress(ctx context.Context, req *types.QueryAllB
}

var Bids []types.Bid
top_auctionID, err := k.k.AuctionIdSeq.Peek(ctx)
if err != nil {
return nil, err
}
for auction_id := uint64(0); auction_id <= top_auctionID; auction_id++ {
bidsByAddress, err := k.k.BidByAddress.Get(ctx, collections.Join(auction_id, sdk.AccAddress(bidderAddr)))
k.k.Auctions.Walk(ctx, nil, func(key uint64, value types.Auction) (stop bool, err error) {

Check failure on line 102 in x/auction/keeper/grpc_query.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `k.k.Auctions.Walk` is not checked (errcheck)
bidsByAddress, err := k.k.BidByAddress.Get(ctx, collections.Join(key, sdk.AccAddress(bidderAddr)))
if err != nil {
return nil, err
return true, err
}

Bids = append(Bids, bidsByAddress.Bids...)
}
return false, nil
})

return &types.QueryAllBidsByAddressResponse{
Bids: Bids,
Expand Down

0 comments on commit 6db99df

Please sign in to comment.