Lock bid price in reveal phase only for vickrey auctions
Some checks failed
Build / build (pull_request) Has been cancelled
Protobuf / lint (pull_request) Has been cancelled
Integration Tests / test-integration (pull_request) Has been cancelled
SDK Tests / sdk_tests_auctions (pull_request) Has been cancelled
E2E Tests / test-e2e (pull_request) Has been cancelled
Unit Tests / test-unit (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

This commit is contained in:
IshaVenikar 2024-09-20 10:37:24 +05:30
parent 273da5f2a9
commit 3f9b494480

View File

@ -540,10 +540,12 @@ func (k Keeper) RevealBid(ctx sdk.Context, msg auctiontypes.MsgRevealBid) (*auct
} }
// Lock bid amount. // Lock bid amount.
if auction.Kind == auctiontypes.AuctionKindVickrey {
sdkErr := k.bankKeeper.SendCoinsFromAccountToModule(ctx, signerAddress, auctiontypes.ModuleName, sdk.NewCoins(bidAmount)) sdkErr := k.bankKeeper.SendCoinsFromAccountToModule(ctx, signerAddress, auctiontypes.ModuleName, sdk.NewCoins(bidAmount))
if sdkErr != nil { if sdkErr != nil {
return nil, sdkErr return nil, sdkErr
} }
}
// Update bid. // Update bid.
bid.BidAmount = bidAmount bid.BidAmount = bidAmount