From 50516b51b3967d0ba0576c479da503d78731d2fb Mon Sep 17 00:00:00 2001 From: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com> Date: Wed, 22 Nov 2023 11:44:41 +0100 Subject: [PATCH] test: fix --- x/margin/keeper/open_short_process.go | 2 ++ x/margin/types/pool.go | 16 +++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/x/margin/keeper/open_short_process.go b/x/margin/keeper/open_short_process.go index 2581f5adc..857c6eaa1 100644 --- a/x/margin/keeper/open_short_process.go +++ b/x/margin/keeper/open_short_process.go @@ -69,6 +69,8 @@ func (k Keeper) ProcessOpenShort(ctx sdk.Context, mtp *types.MTP, leverage sdk.D mtp.Custodies = []sdk.Coin{sdk.NewCoin(baseCurrency, sdk.NewInt(0))} mtp.BorrowInterestPaidCustodies = []sdk.Coin{sdk.NewCoin(baseCurrency, sdk.NewInt(0))} mtp.TakeProfitCustodies = []sdk.Coin{sdk.NewCoin(baseCurrency, sdk.NewInt(0))} + mtp.FundingFeePaidCustodies = []sdk.Coin{sdk.NewCoin(baseCurrency, sdk.NewInt(0))} + mtp.FundingFeeReceivedCustodies = []sdk.Coin{sdk.NewCoin(baseCurrency, sdk.NewInt(0))} } // Borrow the asset the user wants to short. diff --git a/x/margin/types/pool.go b/x/margin/types/pool.go index 4f5c59c7c..458f8551c 100644 --- a/x/margin/types/pool.go +++ b/x/margin/types/pool.go @@ -8,13 +8,15 @@ import ( func NewPool(poolId uint64) Pool { return Pool{ - AmmPoolId: poolId, - Health: sdk.NewDec(100), - Enabled: true, - Closed: false, - BorrowInterestRate: sdk.NewDecFromIntWithPrec(sdk.NewInt(1), 1), - PoolAssetsLong: []PoolAsset{}, - PoolAssetsShort: []PoolAsset{}, + AmmPoolId: poolId, + Health: sdk.NewDec(100), + Enabled: true, + Closed: false, + BorrowInterestRate: sdk.NewDecFromIntWithPrec(sdk.NewInt(1), 1), + PoolAssetsLong: []PoolAsset{}, + PoolAssetsShort: []PoolAsset{}, + LastHeightBorrowInterestRateComputed: 0, + FundingRate: sdk.ZeroDec(), } }