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
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:
parent
ecddfb96bc
commit
3710f83002
@ -910,10 +910,16 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
|
|||||||
totalAmountPaid := auction.WinningPrice.Amount.Mul(math.NewInt(int64(len(auction.WinnerAddresses))))
|
totalAmountPaid := auction.WinningPrice.Amount.Mul(math.NewInt(int64(len(auction.WinnerAddresses))))
|
||||||
creatorLeftOverAmount := sdk.NewCoin(auction.MaxPrice.Denom, totalLockedAmount.Sub(totalAmountPaid))
|
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(
|
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(
|
||||||
ctx,
|
ctx,
|
||||||
auctiontypes.ModuleName,
|
auctiontypes.ModuleName,
|
||||||
sdk.AccAddress(auction.OwnerAddress),
|
creatorAddress,
|
||||||
sdk.NewCoins(creatorLeftOverAmount),
|
sdk.NewCoins(creatorLeftOverAmount),
|
||||||
)
|
)
|
||||||
if sdkErr != nil {
|
if sdkErr != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user