Skip to content

Commit

Permalink
Add metric
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyaoy committed Jun 4, 2024
1 parent 92e19d3 commit 078b321
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions protocol/lib/metrics/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ const (
VaultCancelOrder = "vault_cancel_order"
VaultPlaceOrder = "vault_place_order"
VaultPlaceOrderDifferentPrice = "vault_place_order_different_price"
VaultPlaceOrderSamePrice = "vault_place_order_same_price"
VaultType = "vault_type"
VaultId = "vault_id"
VaultEquity = "vault_equity"
Expand Down
3 changes: 3 additions & 0 deletions protocol/x/vault/keeper/orders.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ func (k Keeper) RefreshVaultClobOrders(ctx sdk.Context, vaultId types.VaultId) (
),
)
} else {
vaultId.IncrCounter(
metrics.VaultPlaceOrderDifferentPrice,
)
k.GetIndexerEventManager().AddTxnEvent(
ctx,
indexerevents.SubtypeStatefulOrder,
Expand Down

0 comments on commit 078b321

Please sign in to comment.