@@ -15,14 +15,12 @@ import {
15
15
import { getRigs , NicehashRigs } from "./nicehashApi" ;
16
16
import { RPC } from "./rpcLoader" ;
17
17
18
- let mainWindow : BrowserWindow | null ;
19
-
20
- let rpc : RPC . Client | null ;
18
+ let mainWindow : BrowserWindow | undefined ;
19
+ let rpc : RPC . Client | undefined ;
21
20
let startTimestamp : number ;
22
-
23
- let config : Config | null ;
24
- let rigs : NicehashRigs . RootObject | null ;
25
- let gpuDecvice : NicehashRigs . Device | null ;
21
+ let config : Config | undefined ;
22
+ let rigs : NicehashRigs . RootObject | undefined ;
23
+ let gpuDecvice : NicehashRigs . Device | undefined ;
26
24
27
25
async function init ( ) {
28
26
// Config 読み込み
@@ -49,7 +47,7 @@ async function init() {
49
47
50
48
// GPU Device 取得
51
49
gpuDecvice = await getGpuDevice ( rigs , config [ "gpuDeviceBrand" ] ) ;
52
- } , 1000 * 60 ) ;
50
+ } , 1000 * 30 ) ;
53
51
}
54
52
55
53
function createMainWindow ( ) {
@@ -83,7 +81,7 @@ function createMainWindow() {
83
81
} ) ;
84
82
85
83
mainWindow . on ( "closed" , ( ) => {
86
- mainWindow = null ;
84
+ mainWindow = undefined ;
87
85
} ) ;
88
86
}
89
87
@@ -99,7 +97,7 @@ app.on("window-all-closed", () => {
99
97
} ) ;
100
98
101
99
app . on ( "activate" , ( ) => {
102
- if ( mainWindow === null ) {
100
+ if ( ! mainWindow ) {
103
101
createMainWindow ( ) ;
104
102
}
105
103
} ) ;
0 commit comments