Skip to content

Commit

Permalink
perf: delete unuse telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir committed Jun 24, 2022
1 parent b3195e2 commit 46bca00
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions x/erc20/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,17 +157,6 @@ func (k Keeper) convertCoinNativeCoin(ctx sdk.Context, pair types.TokenPair, msg
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)

if msg.Coin.Amount.IsInt64() {
telemetry.IncrCounterWithLabels(
[]string{"tx", "msg", "convert", "coin", "amount", "total"},
float32(msg.Coin.Amount.Int64()),
[]metrics.Label{
telemetry.NewLabel("denom", pair.Denom),
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)
}
}()

ctx.EventManager().EmitEvents(
Expand Down Expand Up @@ -256,17 +245,6 @@ func (k Keeper) convertERC20NativeCoin(ctx sdk.Context, pair types.TokenPair, ms
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)

if msg.Amount.IsInt64() {
telemetry.IncrCounterWithLabels(
[]string{"tx", "msg", "convert", "erc20", "amount", "total"},
float32(msg.Amount.Int64()),
[]metrics.Label{
telemetry.NewLabel("denom", pair.Denom),
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)
}
}()

ctx.EventManager().EmitEvents(
Expand Down Expand Up @@ -376,17 +354,6 @@ func (k Keeper) convertERC20NativeToken(ctx sdk.Context, pair types.TokenPair, m
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)

if msg.Amount.IsInt64() {
telemetry.IncrCounterWithLabels(
[]string{"tx", "msg", "convert", "erc20", "amount", "total"},
float32(msg.Amount.Int64()),
[]metrics.Label{
telemetry.NewLabel("denom", pair.Denom),
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)
}
}()

ctx.EventManager().EmitEvents(
Expand Down Expand Up @@ -479,17 +446,6 @@ func (k Keeper) convertCoinNativeERC20(ctx sdk.Context, pair types.TokenPair, ms
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)

if msg.Coin.Amount.IsInt64() {
telemetry.IncrCounterWithLabels(
[]string{"tx", "msg", "convert", "coin", "amount", "total"},
float32(msg.Coin.Amount.Int64()),
[]metrics.Label{
telemetry.NewLabel("denom", pair.Denom),
telemetry.NewLabel("erc20", pair.Erc20Address),
},
)
}
}()

ctx.EventManager().EmitEvents(
Expand Down

0 comments on commit 46bca00

Please sign in to comment.