From 637f151e3fa50689b0563ab7ce4df3c9cf678fe7 Mon Sep 17 00:00:00 2001 From: Pratik Date: Fri, 29 Sep 2023 19:19:40 +0530 Subject: [PATCH] fix- resolve wrong denom in debt auction --- x/liquidationsV2/keeper/liquidate.go | 2 +- x/liquidationsV2/keeper/msg_server_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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 33046f327..d58600d3f 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), }, }, } {