File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/modules/rewards/services Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,17 @@ export class OpRebateService {
161
161
return ;
162
162
}
163
163
164
+ const opRebatesStats = await this . opRewardsStatsRepository . findOne ( { where : { id : Not ( IsNull ( ) ) } } ) ;
165
+ const opRebatesThreshold = ethers . utils . parseEther ( "749000" ) ;
166
+ const isOpRebatesThresholdReached = new BigNumber (
167
+ opRebatesStats . totalTokenAmount ,
168
+ ) . isGreaterThanOrEqualTo ( opRebatesThreshold . toString ( ) ) ;
169
+
170
+ if ( isOpRebatesThresholdReached ) {
171
+ this . logger . verbose ( `OP rebate rewards threshold reached. Skipping...` ) ;
172
+ return ;
173
+ }
174
+
164
175
const deposit : PartialDeposit = await this . depositRepository . findOne ( {
165
176
where : { id : depositPrimaryKey } ,
166
177
select : partialDepositKeys ,
You can’t perform that action at this time.
0 commit comments