summaryrefslogtreecommitdiffhomepage
path: root/gui/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/shared')
-rw-r--r--gui/src/shared/account-expiry.ts4
-rw-r--r--gui/src/shared/ipc-schema.ts1
2 files changed, 3 insertions, 2 deletions
diff --git a/gui/src/shared/account-expiry.ts b/gui/src/shared/account-expiry.ts
index 7ca382efb2..81c45fec07 100644
--- a/gui/src/shared/account-expiry.ts
+++ b/gui/src/shared/account-expiry.ts
@@ -5,10 +5,10 @@ export function hasExpired(expiry: DateType): boolean {
return new Date(expiry).getTime() < Date.now();
}
-export function closeToExpiry(expiry: DateType): boolean {
+export function closeToExpiry(expiry: DateType, days = 3): boolean {
return (
!hasExpired(expiry) &&
- new Date(expiry) <= dateByAddingComponent(new Date(), DateComponent.day, 3)
+ new Date(expiry) <= dateByAddingComponent(new Date(), DateComponent.day, days)
);
}
diff --git a/gui/src/shared/ipc-schema.ts b/gui/src/shared/ipc-schema.ts
index 5789bcc149..e2b3ebbed3 100644
--- a/gui/src/shared/ipc-schema.ts
+++ b/gui/src/shared/ipc-schema.ts
@@ -164,6 +164,7 @@ export const ipcSchema = {
logout: invoke<void, void>(),
getWwwAuthToken: invoke<void, string>(),
submitVoucher: invoke<string, VoucherResponse>(),
+ updateData: send<void>(),
},
accountHistory: {
'': notifyRenderer<AccountToken | undefined>(),