(t testing.TB, ctx sdk.Context, app *sifapp.SifchainApp, marginKeeper types.Keeper, collateralAsset string, custodyAsset string, address string, position types.Position, id uint64, health sdk.Dec)
| 1064 | return ctx, app, marginKeeper |
| 1065 | } |
| 1066 | func addMTPKey(t testing.TB, ctx sdk.Context, app *sifapp.SifchainApp, marginKeeper types.Keeper, collateralAsset string, custodyAsset string, address string, position types.Position, id uint64, health sdk.Dec) types.MTP { |
| 1067 | storeKey := app.GetKey(types.StoreKey) |
| 1068 | store := ctx.KVStore(storeKey) |
| 1069 | key := types.GetMTPKey(address, id) |
| 1070 | |
| 1071 | newMTP := types.MTP{ |
| 1072 | Id: id, |
| 1073 | Address: address, |
| 1074 | CollateralAsset: collateralAsset, |
| 1075 | Liabilities: sdk.NewUint(1000), |
| 1076 | InterestPaidCollateral: sdk.ZeroUint(), |
| 1077 | InterestPaidCustody: sdk.ZeroUint(), |
| 1078 | InterestUnpaidCollateral: sdk.NewUint(1000), |
| 1079 | CollateralAmount: sdk.NewUint(1000), |
| 1080 | CustodyAsset: custodyAsset, |
| 1081 | CustodyAmount: sdk.NewUint(1000), |
| 1082 | Leverage: sdk.NewDec(10), |
| 1083 | MtpHealth: health, |
| 1084 | Position: position, |
| 1085 | } |
| 1086 | |
| 1087 | store.Set(key, types.ModuleCdc.MustMarshal(&newMTP)) |
| 1088 | |
| 1089 | return newMTP |
| 1090 | } |
no test coverage detected