From b2eff063a8b850d0a07fec9bbbc6b7ff50ffe82b Mon Sep 17 00:00:00 2001 From: Kevin Davis Date: Fri, 21 Aug 2020 19:24:31 -0400 Subject: [PATCH] fix: initialize issuance asset supplies at genesis (#634) --- x/issuance/genesis.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/x/issuance/genesis.go b/x/issuance/genesis.go index 2969c116..7e43371e 100644 --- a/x/issuance/genesis.go +++ b/x/issuance/genesis.go @@ -28,6 +28,15 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, supplyKeeper types.SupplyKeep k.SetAssetSupply(ctx, supply, supply.GetDenom()) } + for _, asset := range gs.Params.Assets { + if asset.RateLimit.Active { + _, found := k.GetAssetSupply(ctx, asset.Denom) + if !found { + k.CreateNewAssetSupply(ctx, asset.Denom) + } + } + } + } // ExportGenesis export genesis state for issuance module