File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -413,9 +413,11 @@ export async function checkAllowances(synapse: Synapse): Promise<{
413413 // Get current allowances
414414 const currentAllowances = await synapse . payments . serviceApproval ( warmStorageAddress , TOKENS . USDFC )
415415
416- // Check if we need to update (not at max)
416+ // Check if we need to update (not at max or max lockup period is not enough )
417417 const needsUpdate =
418- currentAllowances . rateAllowance < MAX_RATE_ALLOWANCE || currentAllowances . lockupAllowance < MAX_LOCKUP_ALLOWANCE
418+ currentAllowances . rateAllowance < MAX_RATE_ALLOWANCE ||
419+ currentAllowances . lockupAllowance < MAX_LOCKUP_ALLOWANCE ||
420+ currentAllowances . maxLockupPeriod < BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
419421
420422 return {
421423 needsUpdate,
You can’t perform that action at this time.
0 commit comments