Return error on max price amount lock in instead of panic
Some checks failed
Protobuf / lint (pull_request) Successful in 26s
Integration Tests / test-integration (pull_request) Successful in 2m58s
Build / build (pull_request) Successful in 3m12s
E2E Tests / test-e2e (pull_request) Successful in 4m47s
Unit Tests / test-unit (pull_request) Successful in 2m39s
SDK Tests / sdk_tests_authority_auctions (pull_request) Failing after 7m26s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Successful in 10m5s
SDK Tests / sdk_tests (pull_request) Failing after 11m38s

This commit is contained in:
Prathamesh Musale 2024-09-24 18:03:34 +05:30
parent e5f27c246c
commit ee9b10eb00

View File

@ -346,8 +346,7 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg auctiontypes.MsgCreateAuction
sdkErr := k.bankKeeper.SendCoinsFromAccountToModule(ctx, signerAddress, auctiontypes.ModuleName, sdk.NewCoins(totalLockedAmount))
if sdkErr != nil {
k.Logger(ctx).Error(fmt.Sprintf("Auction error transferring maximum price amount: %v", sdkErr))
panic(sdkErr)
return nil, errorsmod.Wrap(sdkErr, "Auction error transferring maximum price amount")
}
}