Fix auction owner address type
Some checks failed
Build / build (pull_request) Has been cancelled
Protobuf / lint (pull_request) Has been cancelled
E2E Tests / test-e2e (pull_request) Has been cancelled
SDK Tests / sdk_tests_authority_auctions (pull_request) Has been cancelled
Integration Tests / test-integration (pull_request) Has been cancelled
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Has been cancelled
SDK Tests / sdk_tests (pull_request) Has been cancelled
Unit Tests / test-unit (pull_request) Has been cancelled

This commit is contained in:
IshaVenikar 2024-09-23 14:48:12 +05:30
parent ecddfb96bc
commit 3710f83002

View File

@ -910,10 +910,16 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
totalAmountPaid := auction.WinningPrice.Amount.Mul(math.NewInt(int64(len(auction.WinnerAddresses))))
creatorLeftOverAmount := sdk.NewCoin(auction.MaxPrice.Denom, totalLockedAmount.Sub(totalAmountPaid))
creatorAddress, err := sdk.AccAddressFromBech32(auction.OwnerAddress)
if err != nil {
k.Logger(ctx).Error(fmt.Sprintf("Invalid creatorAddress address. %v", err))
panic("Invalid creator address.")
}
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(
ctx,
auctiontypes.ModuleName,
sdk.AccAddress(auction.OwnerAddress),
creatorAddress,
sdk.NewCoins(creatorLeftOverAmount),
)
if sdkErr != nil {