diff --git a/protocol/x/revshare/keeper/revshare.go b/protocol/x/revshare/keeper/revshare.go index 9ed025f7fe..2596a878fb 100644 --- a/protocol/x/revshare/keeper/revshare.go +++ b/protocol/x/revshare/keeper/revshare.go @@ -177,17 +177,16 @@ func (k Keeper) GetAllRevShares( return types.RevSharesForFill{}, nil } netFeesSubAffiliateFeesShared := new(big.Int).Sub(netFees, affiliateFeesShared) - unconditionalRevShares, err := k.getUnconditionalRevShares(ctx, netFeesSubAffiliateFeesShared) - if err != nil { - log.ErrorLogWithError(ctx, "error getting unconditional rev shares", err) - return types.RevSharesForFill{}, nil - } - if netFeesSubAffiliateFeesShared.Sign() <= 0 { log.ErrorLog(ctx, "net fees sub affiliate fees shared is less than or equal to 0") return types.RevSharesForFill{}, nil } + unconditionalRevShares, err := k.getUnconditionalRevShares(ctx, netFeesSubAffiliateFeesShared) + if err != nil { + log.ErrorLogWithError(ctx, "error getting unconditional rev shares", err) + return types.RevSharesForFill{}, nil + } marketMapperRevShares, err := k.getMarketMapperRevShare(ctx, fill.MarketId, netFeesSubAffiliateFeesShared) if err != nil { log.ErrorLogWithError(ctx, "error getting market mapper rev shares", err) diff --git a/protocol/x/revshare/keeper/revshare_test.go b/protocol/x/revshare/keeper/revshare_test.go index f724a14ef7..b127b8e923 100644 --- a/protocol/x/revshare/keeper/revshare_test.go +++ b/protocol/x/revshare/keeper/revshare_test.go @@ -324,6 +324,9 @@ func TestKeeper_GetAllRevShares_Valid(t *testing.T) { expectedRevSharesForFill: types.RevSharesForFill{ AllRevShares: []types.RevShare{ { + // BobAddress has 500000000000000000000000 coins staked + // via genesis. Which puts Bob at the highest tier + // and gives him a 15% taker fee share. Recipient: constants.BobAccAddress.String(), RevShareFeeSource: types.REV_SHARE_FEE_SOURCE_TAKER_FEE, RevShareType: types.REV_SHARE_TYPE_AFFILIATE,