Skip to content

Commit

Permalink
Merge branch 'develop' into 9746
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyletang authored Oct 11, 2023
2 parents 6dbb870 + 20b860f commit ddf22f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@
- [9746](https://github.com/vegaprotocol/vega/issues/9746) - Fix handling of LP fees reward
- [9747](https://github.com/vegaprotocol/vega/issues/9747) - Return correct destination type
- [9541](https://github.com/vegaprotocol/vega/issues/9731) - Add filtering for party to the referral fees API.
- [9751](https://github.com/vegaprotocol/vega/issues/9751) - Make sure that LP fee party accounts exists.

## 0.72.1

Expand Down
7 changes: 4 additions & 3 deletions core/collateral/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ func (e *Engine) transferFees(ctx context.Context, marketID string, assetID stri
responses := make([]*types.LedgerMovement, 0, len(transfers))

for _, transfer := range transfers {
req, err := e.getFeeTransferRequest(
req, err := e.getFeeTransferRequest(ctx,
transfer, makerFee, infraFee, liquiFee, marketID, assetID)
if err != nil {
e.log.Error("Failed to build transfer request for event",
Expand Down Expand Up @@ -2001,6 +2001,7 @@ func (e *Engine) MarginUpdateOnOrder(ctx context.Context, marketID string, updat
}

func (e *Engine) getFeeTransferRequest(
ctx context.Context,
t *types.Transfer,
makerFee, infraFee, liquiFee *types.Account,
marketID, assetID string,
Expand All @@ -2021,11 +2022,11 @@ func (e *Engine) getFeeTransferRequest(
}

partyLiquidityFeeAccount := func() (*types.Account, error) {
return getAccount(marketID, t.Owner, types.AccountTypeLPLiquidityFees)
return e.GetOrCreatePartyLiquidityFeeAccount(ctx, t.Owner, marketID, assetID)
}

bonusDistributionAccount := func() (*types.Account, error) {
return getAccount(marketID, systemOwner, types.AccountTypeLiquidityFeesBonusDistribution)
return e.GetOrCreateLiquidityFeesBonusDistributionAccount(ctx, marketID, assetID)
}

marginAccount := func() (*types.Account, error) {
Expand Down

0 comments on commit ddf22f7

Please sign in to comment.