diff --git a/x/auctionsV2/keeper/auctions.go b/x/auctionsV2/keeper/auctions.go index 6eedb19db..c835f0be9 100644 --- a/x/auctionsV2/keeper/auctions.go +++ b/x/auctionsV2/keeper/auctions.go @@ -411,12 +411,12 @@ func (k Keeper) CloseEnglishAuction(ctx sdk.Context, englishAuction types.Auctio //send newly minted token((collateral)) to the user // send debt to collector to get added //set net fees data - err = k.tokenMint.MintNewTokensForApp(ctx, englishAuction.AppId, englishAuction.DebtAssetId, bidding.BidderAddress, englishAuction.DebtToken.Amount) + err = k.tokenMint.MintNewTokensForApp(ctx, englishAuction.AppId, englishAuction.DebtAssetId, bidding.BidderAddress, englishAuction.CollateralToken.Amount) if err != nil { return err } - err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, auctionsV2types.ModuleName, collectortypes.ModuleName, sdk.NewCoins(englishAuction.CollateralToken)) + err = k.bankKeeper.SendCoinsFromModuleToModule(ctx, auctionsV2types.ModuleName, collectortypes.ModuleName, sdk.NewCoins(englishAuction.DebtToken)) if err != nil { return err } diff --git a/x/liquidationsV2/keeper/liquidate.go b/x/liquidationsV2/keeper/liquidate.go index 68e5bf800..bc1fbf687 100644 --- a/x/liquidationsV2/keeper/liquidate.go +++ b/x/liquidationsV2/keeper/liquidate.go @@ -527,7 +527,7 @@ func (k Keeper) CheckStatsForSurplusAndDebt(ctx sdk.Context, appID, assetID uint // // --Collateral cmst harbor // debt harbor cmst -func (k Keeper) DebtTokenAmount(ctx sdk.Context, CollateralAssetId, DebtAssetID uint64, lotSize, debtLotSize sdk.Int) (collateralToken, debtToken sdk.Coin) { +func (k Keeper) DebtTokenAmount(ctx sdk.Context, DebtAssetID, CollateralAssetId uint64, lotSize, debtLotSize sdk.Int) (collateralToken, debtToken sdk.Coin) { collateralAsset, found1 := k.asset.GetAsset(ctx, CollateralAssetId) debtAsset, found2 := k.asset.GetAsset(ctx, DebtAssetID) if !found1 || !found2 { diff --git a/x/liquidationsV2/keeper/msg_server_test.go b/x/liquidationsV2/keeper/msg_server_test.go index c307601cd..2f99083a4 100644 --- a/x/liquidationsV2/keeper/msg_server_test.go +++ b/x/liquidationsV2/keeper/msg_server_test.go @@ -775,12 +775,12 @@ func (s *KeeperTestSuite) WasmSetCollectorLookupTableAndAuctionControlForDebt() AppID: 2, CollectorAssetID: 2, SecondaryAssetID: 3, - SurplusThreshold: sdk.NewInt(10000000), - DebtThreshold: sdk.NewInt(5000000), + SurplusThreshold: sdk.NewInt(1000000000000000000), + DebtThreshold: sdk.NewInt(282078000000), LockerSavingRate: sdk.MustNewDecFromStr("0.1"), - LotSize: sdk.NewInt(200000), + LotSize: sdk.NewInt(25000000000), BidFactor: sdk.MustNewDecFromStr("0.01"), - DebtLotSize: sdk.NewInt(2000000), + DebtLotSize: sdk.NewInt(13157894000000), }, }, } {