fix: initialize issuance asset supplies at genesis (#634)

This commit is contained in:
Kevin Davis 2020-08-21 19:24:31 -04:00 committed by GitHub
parent b356309d90
commit b2eff063a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,15 @@ func InitGenesis(ctx sdk.Context, k keeper.Keeper, supplyKeeper types.SupplyKeep
k.SetAssetSupply(ctx, supply, supply.GetDenom()) 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 // ExportGenesis export genesis state for issuance module