Skip to content

Commit 46f15e4

Browse files
committed
fix: 更新間隔を30秒に設定
1 parent d8970ba commit 46f15e4

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"name": "nichash",
3-
"version": "1.0.4",
2+
"name": "nicehash",
3+
"productName": "NiceHash",
4+
"version": "1.0.5",
45
"main": "dist/main.js",
56
"author": "iamtakagi",
67
"license": "MIT",

src/index.ts

+8-10
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ import {
1515
import { getRigs, NicehashRigs } from "./nicehashApi";
1616
import { RPC } from "./rpcLoader";
1717

18-
let mainWindow: BrowserWindow | null;
19-
20-
let rpc: RPC.Client | null;
18+
let mainWindow: BrowserWindow | undefined;
19+
let rpc: RPC.Client | undefined;
2120
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;
2624

2725
async function init() {
2826
// Config 読み込み
@@ -49,7 +47,7 @@ async function init() {
4947

5048
// GPU Device 取得
5149
gpuDecvice = await getGpuDevice(rigs, config["gpuDeviceBrand"]);
52-
}, 1000 * 60);
50+
}, 1000 * 30);
5351
}
5452

5553
function createMainWindow() {
@@ -83,7 +81,7 @@ function createMainWindow() {
8381
});
8482

8583
mainWindow.on("closed", () => {
86-
mainWindow = null;
84+
mainWindow = undefined;
8785
});
8886
}
8987

@@ -99,7 +97,7 @@ app.on("window-all-closed", () => {
9997
});
10098

10199
app.on("activate", () => {
102-
if (mainWindow === null) {
100+
if (!mainWindow) {
103101
createMainWindow();
104102
}
105103
});

src/nicehashApi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Config } from "./config";
44
import { stringify } from "querystring";
55

66
const APP_NAME = "NiceHash" as const;
7-
const APP_VERSION = "1.0.4" as const;
7+
const APP_VERSION = "1.0.5" as const;
88
const NICEHASH_API_HOST = "https://api2.nicehash.com" as const;
99
const USER_AGENT =
1010
`${APP_NAME}/${APP_VERSION} (+https://github.com/iamtakagi/Nicehash)` as const;

0 commit comments

Comments
 (0)