File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,9 +62,9 @@ export function countDaysAfterBlock(workspace: WorkspaceDBScheme): number | unde
6262 return ;
6363 }
6464
65- const expectedPayDay = new Date ( workspace . blockedDate ) ;
65+ const blockedDay = new Date ( workspace . blockedDate ) ;
6666
6767 const now = new Date ( ) . getTime ( ) ;
6868
69- return Math . floor ( ( now - expectedPayDay . getTime ( ) ) / MILLISECONDS_IN_DAY ) ;
69+ return Math . floor ( ( now - blockedDay . getTime ( ) ) / MILLISECONDS_IN_DAY ) ;
7070}
Original file line number Diff line number Diff line change @@ -373,7 +373,7 @@ export default class PaymasterWorker extends Worker {
373373 * Sends reminder emails to blocked workspace admins
374374 *
375375 * @param workspace - workspace to send reminders for
376- * @param daysAfterBlock - number of days the workspace spent after payday
376+ * @param daysAfterBlock - number of days since the workspace was blocked
377377 */
378378 private async sendBlockedWorkspaceReminders (
379379 workspace : WorkspaceDBScheme ,
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ const createWorkspaceMock = (parameters: {
6060 balance : 0 ,
6161 subscriptionId : parameters . subscriptionId ,
6262 isBlocked : parameters . isBlocked ,
63- blockedDate : parameters . isBlocked ? new Date ( ) : null ,
63+ blockedDate : parameters . blockedDate !== undefined ? parameters . blockedDate : ( parameters . isBlocked ? new Date ( ) : null ) ,
6464 } ;
6565
6666 if ( parameters . paidUntil ) {
You can’t perform that action at this time.
0 commit comments