File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
protocol/x/affiliates/keeper Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -610,9 +610,10 @@ func (k Keeper) OnStatsExpired(
610610 }
611611
612612 var newVolume * big.Int = lib .BigU (uint64 (resultingVolume ))
613- if previousVolume >= affiliateParams .Maximum_30DAttributableVolumePerReferredUserNotional &&
614- resultingVolume < affiliateParams .Maximum_30DAttributableVolumePerReferredUserNotional {
615- deltaAttributedVolume := lib .BigU (affiliateParams .Maximum_30DAttributableVolumePerReferredUserNotional - resultingVolume )
613+ cap := affiliateParams .Maximum_30DAttributableVolumePerReferredUserNotional
614+ if previousVolume >= cap &&
615+ resultingVolume < cap {
616+ deltaAttributedVolume := lib .BigU (cap - resultingVolume )
616617 // Subtract the expired volume (use taker volume for consistency with how it's added)
617618 newVolume = new (big.Int ).Sub (currentVolume , deltaAttributedVolume )
618619 }
You can’t perform that action at this time.
0 commit comments