From 0f7f8c011a96661edc7f82d6dc5cb29803bae0b2 Mon Sep 17 00:00:00 2001 From: lucas-dydx <76970939+lucas-dydx@users.noreply.github.com> Date: Tue, 6 Feb 2024 15:00:10 -0600 Subject: [PATCH] [bugfix][protocol] fix settled funding event emission (#1051) * [bugfix][protocol] fix settled funding event emission * add TODO (cherry picked from commit ab6a65cfea8c9735c4b6b2b45cc0b756db9851b3) --- protocol/x/subaccounts/types/events.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol/x/subaccounts/types/events.go b/protocol/x/subaccounts/types/events.go index 3a3538658b..703c32cdef 100644 --- a/protocol/x/subaccounts/types/events.go +++ b/protocol/x/subaccounts/types/events.go @@ -19,6 +19,7 @@ const ( // NewCreateSettledFundingEvent constructs a new funding sdk.Event. Note that `fundingPaid` is positive // if the subaccount paid funding, negative if the subaccount received funding. +// TODO(CT-245): Add tests that this event is emitted. func NewCreateSettledFundingEvent( subaccount SubaccountId, perpetualId uint32, @@ -27,7 +28,7 @@ func NewCreateSettledFundingEvent( return sdk.NewEvent( EventTypeSettledFunding, sdk.NewAttribute(AttributeKeySubaccount, subaccount.Owner), - sdk.NewAttribute(AttributeKeySubaccount, fmt.Sprint(subaccount.Number)), + sdk.NewAttribute(AttributeKeySubaccountNumber, fmt.Sprint(subaccount.Number)), sdk.NewAttribute(AttributeKeyPerpetualId, fmt.Sprint(perpetualId)), sdk.NewAttribute(AttributeKeyFundingPaid, fundingPaid.String()), )