Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Nov 22, 2023
1 parent 8fa32d1 commit 50516b5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions x/margin/keeper/open_short_process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 9 additions & 7 deletions x/margin/types/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}

Expand Down

0 comments on commit 50516b5

Please sign in to comment.