Skip to content

Commit

Permalink
Merge pull request #650 from comdex-official/feature/dev
Browse files Browse the repository at this point in the history
Feature/dev
  • Loading branch information
dheerajkd30 authored Jan 1, 2023
2 parents 808eb68 + 3d6d75a commit 946c757
Show file tree
Hide file tree
Showing 5 changed files with 1,281 additions and 3 deletions.
19 changes: 16 additions & 3 deletions app/upgrades/mainnet/v7/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,22 @@ func InitializeLendReservesStates(
ctx sdk.Context,
lendKeeper lendkeeper.Keeper,
) {
dataAsset1, _ := lendKeeper.GetReserveBuybackAssetData(ctx, 1)
dataAsset2, _ := lendKeeper.GetReserveBuybackAssetData(ctx, 2)
dataAsset3, _ := lendKeeper.GetReserveBuybackAssetData(ctx, 3)
dataAsset1, found := lendKeeper.GetReserveBuybackAssetData(ctx, 1)
if !found {
dataAsset1.BuybackAmount = sdk.NewInt(0)
dataAsset1.ReserveAmount = sdk.NewInt(0)
}
dataAsset2, found := lendKeeper.GetReserveBuybackAssetData(ctx, 2)
if !found {
dataAsset2.BuybackAmount = sdk.NewInt(0)
dataAsset2.ReserveAmount = sdk.NewInt(0)
}
dataAsset3, found := lendKeeper.GetReserveBuybackAssetData(ctx, 3)
if !found {
dataAsset3.BuybackAmount = sdk.NewInt(0)
dataAsset3.ReserveAmount = sdk.NewInt(0)
}

reserveStat1 := types.AllReserveStats{
AssetID: 1,
AmountOutFromReserveToLenders: sdk.ZeroInt(),
Expand Down
Loading

0 comments on commit 946c757

Please sign in to comment.