summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2022-02-23 14:26:10 +0100
committerOskar Nyberg <oskar@mullvad.net>2022-03-14 13:58:44 +0100
commit8659f97d48369e3d61aee615bea06ffe30164f83 (patch)
tree174564b1865f8c04ee4d637902b5f9cd41a41cc7 /gui/src/renderer
parent7d37bfd840abfdbbf4ae0f191a3c2afe40f700c9 (diff)
downloadmullvadvpn-8659f97d48369e3d61aee615bea06ffe30164f83.tar.xz
mullvadvpn-8659f97d48369e3d61aee615bea06ffe30164f83.zip
Fix DeviceConfig type to not include undefined
Diffstat (limited to 'gui/src/renderer')
-rw-r--r--gui/src/renderer/app.tsx4
-rw-r--r--gui/src/renderer/redux/account/actions.ts6
2 files changed, 5 insertions, 5 deletions
diff --git a/gui/src/renderer/app.tsx b/gui/src/renderer/app.tsx
index 8558b98050..ea6c12cc84 100644
--- a/gui/src/renderer/app.tsx
+++ b/gui/src/renderer/app.tsx
@@ -32,7 +32,7 @@ import {
IAccountData,
IAppVersionInfo,
IDevice,
- DeviceConfig,
+ IDeviceConfig,
IDeviceRemoval,
IDnsOptions,
ILocation,
@@ -96,7 +96,7 @@ export default class AppRenderer {
private relayListPair!: IRelayListPair;
private tunnelState!: TunnelState;
private settings!: ISettings;
- private deviceConfig: DeviceConfig;
+ private deviceConfig?: IDeviceConfig;
private guiSettings!: IGuiSettingsState;
private loginState: 'none' | 'logging in' | 'creating account' | 'too many devices' = 'none';
private loginScheduler = new Scheduler();
diff --git a/gui/src/renderer/redux/account/actions.ts b/gui/src/renderer/redux/account/actions.ts
index 355acc4a35..aa0a949533 100644
--- a/gui/src/renderer/redux/account/actions.ts
+++ b/gui/src/renderer/redux/account/actions.ts
@@ -1,4 +1,4 @@
-import { AccountToken, DeviceConfig, IDevice } from '../../../shared/daemon-rpc-types';
+import { AccountToken, IDeviceConfig, IDevice } from '../../../shared/daemon-rpc-types';
interface IStartLoginAction {
type: 'START_LOGIN';
@@ -107,7 +107,7 @@ function startLogin(accountToken: AccountToken): IStartLoginAction {
};
}
-function loggedIn(deviceConfig: NonNullable<DeviceConfig>): ILoggedInAction {
+function loggedIn(deviceConfig: IDeviceConfig): ILoggedInAction {
return {
type: 'LOGGED_IN',
accountToken: deviceConfig.accountToken,
@@ -172,7 +172,7 @@ function createAccountFailed(error: Error): ICreateAccountFailed {
};
}
-function accountCreated(deviceConfig: NonNullable<DeviceConfig>, expiry: string): IAccountCreated {
+function accountCreated(deviceConfig: IDeviceConfig, expiry: string): IAccountCreated {
return {
type: 'ACCOUNT_CREATED',
accountToken: deviceConfig.accountToken,