Skip to content

Commit

Permalink
[bugfix][protocol] fix settled funding event emission (#1051)
Browse files Browse the repository at this point in the history
* [bugfix][protocol] fix settled funding event emission

* add TODO
  • Loading branch information
lucas-dydx authored Feb 6, 2024
1 parent e6398f3 commit ab6a65c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protocol/x/subaccounts/types/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()),
)
Expand Down

0 comments on commit ab6a65c

Please # to comment.