diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2022-02-23 14:26:10 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2022-03-14 13:58:44 +0100 |
| commit | 8659f97d48369e3d61aee615bea06ffe30164f83 (patch) | |
| tree | 174564b1865f8c04ee4d637902b5f9cd41a41cc7 /gui/src/renderer | |
| parent | 7d37bfd840abfdbbf4ae0f191a3c2afe40f700c9 (diff) | |
| download | mullvadvpn-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.tsx | 4 | ||||
| -rw-r--r-- | gui/src/renderer/redux/account/actions.ts | 6 |
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, |
