Add service provider auctions #59
@ -224,7 +224,11 @@ func (k Keeper) PaginatedListRecords(ctx sdk.Context, pagination *query.PageRequ
|
||||
}
|
||||
} else {
|
||||
var err error
|
||||
records, pageResp, err = query.CollectionPaginate(ctx, k.Records, pagination, func(key string, value registrytypes.Record) (registrytypes.Record, error) {
|
||||
records, pageResp, err = query.CollectionPaginate(
|
||||
ctx,
|
||||
k.Records,
|
||||
pagination,
|
||||
func(key string, value registrytypes.Record) (registrytypes.Record, error) {
|
||||
if err := k.populateRecordNames(ctx, &value); err != nil {
|
||||
return registrytypes.Record{}, err
|
||||
}
|
||||
|
@ -94,9 +94,9 @@ func (rk RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionId string
|
||||
}
|
||||
|
||||
if auctionObj.Status == auctiontypes.AuctionStatusCompleted {
|
||||
if auctionObj.WinnerAddress != "" {
|
||||
if len(auctionObj.WinnerAddresses) == 1 {
|
||||
// Mark authority owner and change status to active.
|
||||
authority.OwnerAddress = auctionObj.WinnerAddress
|
||||
authority.OwnerAddress = auctionObj.WinnerAddresses[0]
|
||||
authority.Status = registrytypes.AuthorityActive
|
||||
|
||||
// Reset bond id if required, as owner has changed.
|
||||
|
Loading…
Reference in New Issue
Block a user