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 @@ -415,9 +415,11 @@ export async function checkAllowances(synapse: Synapse): Promise<{
415415 // Get current allowances
416416 const currentAllowances = await synapse . payments . serviceApproval ( warmStorageAddress , TOKENS . USDFC )
417417
418- // Check if we need to update (not at max)
418+ // Check if we need to update (not at max or max lockup period is not enough )
419419 const needsUpdate =
420- currentAllowances . rateAllowance < MAX_RATE_ALLOWANCE || currentAllowances . lockupAllowance < MAX_LOCKUP_ALLOWANCE
420+ currentAllowances . rateAllowance < MAX_RATE_ALLOWANCE ||
421+ currentAllowances . lockupAllowance < MAX_LOCKUP_ALLOWANCE ||
422+ currentAllowances . maxLockupPeriod < BigInt ( DEFAULT_LOCKUP_DAYS ) * TIME_CONSTANTS . EPOCHS_PER_DAY
421423
422424 return {
423425 needsUpdate,
You can’t perform that action at this time.
0 commit comments