Fix mint metric (#7024)

* remove metric

* only emit when valid int64

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Alexander Bezobchuk 2020-08-12 11:10:53 -04:00 committed by GitHub
parent 1adcb6b680
commit dda9bd8333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,9 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) {
panic(err)
}
defer telemetry.ModuleSetGauge(types.ModuleName, float32(mintedCoin.Amount.Int64()), "minted_tokens")
if mintedCoin.Amount.IsInt64() {
defer telemetry.ModuleSetGauge(types.ModuleName, float32(mintedCoin.Amount.Int64()), "minted_tokens")
}
ctx.EventManager().EmitEvent(
sdk.NewEvent(