Skip to content

Commit

Permalink
add comment and log for rev share err case
Browse files Browse the repository at this point in the history
Signed-off-by: Shrenuj Bansal <[email protected]>
  • Loading branch information
shrenujb committed Jun 27, 2024
1 parent 49942c3 commit d6b1e71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions protocol/x/subaccounts/keeper/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ func (k Keeper) DistributeFees(
ctx,
perpetual.Params.MarketId,
)
// Note: The likelihood of this error is very low, and not getting the rev share should not
// prevent the trade from going through. Therefore, we log the error and continue
if err != nil {
log.ErrorLog(ctx, "DistributeFees: failed to get market mapper revenue share", "err", err)
}
if err == nil && revShareAddr != nil {
if revSharePpm >= 1e6 {
log.ErrorLog(
Expand Down

0 comments on commit d6b1e71

Please sign in to comment.