Skip to content

Commit d46449a

Browse files
committed
Improved logging
1 parent 9917fcf commit d46449a

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 4.5.2
4+
5+
### Fixes
6+
7+
- Fixed Cardano Node starting/stopping issues
8+
39
## 4.5.1
410

511
### Fixes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "daedalus",
33
"productName": "Daedalus",
4-
"version": "4.5.1",
4+
"version": "4.5.2",
55
"description": "Cryptocurrency Wallet",
66
"main": "./dist/main/index.js",
77
"scripts": {

source/main/index.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ const onAppReady = async () => {
118118
const platformVersion = os.release();
119119
const ram = JSON.stringify(os.totalmem(), null, 2);
120120
const startTime = new Date().toISOString();
121-
// first checks for japanese locale, otherwise returns english
121+
// first checks for Japanese locale, otherwise returns english
122122
const systemLocale = detectSystemLocale();
123+
const userLocale = getLocale(network);
123124

124125
const systemInfo = logSystemInfo({
125126
cardanoNodeVersion,
@@ -149,27 +150,29 @@ const onAppReady = async () => {
149150
cwd: process.cwd(),
150151
});
151152

153+
logger.info('System and user locale', { systemLocale, userLocale });
154+
152155
ensureXDGDataIsSet();
153156
await installChromeExtensions(isDev);
154157

155-
// Detect locale
156-
const locale = getLocale(network);
158+
logger.info('Setting up Main Window...');
157159
mainWindow = createMainWindow(
158-
locale,
160+
userLocale,
159161
restoreSavedWindowBounds(screen, requestElectronStore)
160162
);
161163
saveWindowBoundsOnSizeAndPositionChange(mainWindow, requestElectronStore);
162164

165+
logger.info('Setting up Cardano Node...');
163166
cardanoNode = setupCardanoNode(launcherConfig, mainWindow);
164167

165-
buildAppMenus(mainWindow, cardanoNode, locale, {
168+
buildAppMenus(mainWindow, cardanoNode, userLocale, {
166169
isNavigationEnabled: false,
167170
});
168171

169172
enableApplicationMenuNavigationChannel.onReceive(
170173
() =>
171174
new Promise((resolve) => {
172-
buildAppMenus(mainWindow, cardanoNode, locale, {
175+
buildAppMenus(mainWindow, cardanoNode, userLocale, {
173176
isNavigationEnabled: true,
174177
});
175178
resolve();
@@ -179,10 +182,10 @@ const onAppReady = async () => {
179182
rebuildApplicationMenu.onReceive(
180183
(data) =>
181184
new Promise((resolve) => {
182-
buildAppMenus(mainWindow, cardanoNode, locale, {
185+
buildAppMenus(mainWindow, cardanoNode, userLocale, {
183186
isNavigationEnabled: data.isNavigationEnabled,
184187
});
185-
mainWindow.updateTitle(locale);
188+
mainWindow.updateTitle(userLocale);
186189
resolve();
187190
})
188191
);

source/main/utils/detectSystemLocale.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
// @flow
22
import { app } from 'electron';
3-
import { logger } from './logging';
43
import { LOCALES } from '../../common/types/locales.types.js';
54
import type { Locale } from '../../common/types/locales.types.js';
65

76
export const detectSystemLocale = (): Locale => {
87
const systemLocale = app.getLocale();
9-
logger.info('Detected system locale', { systemLocale });
108
if (systemLocale === 'ja') {
119
return LOCALES.japanese;
1210
}

source/renderer/app/stores/NetworkStatusStore.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export default class NetworkStatusStore extends Store {
172172

173173
// Setup disk space checks
174174
getDiskSpaceStatusChannel.onReceive(this._onCheckDiskSpace);
175+
this._checkDiskSpace();
175176

176177
this._getStateDirectoryPath();
177178

0 commit comments

Comments
 (0)