Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit e75e42c

Browse files
committed
fix(electron): rename dh2048.pem to dhparam.pem
1 parent a8c1b9d commit e75e42c

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

ember-electron/daemon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const startDaemon = async () => {
128128
}
129129

130130
const tlsPath = path.join(dataPath, 'tls');
131-
const dhparamPath = path.join(tlsPath, 'dh2048.pem');
131+
const dhparamPath = path.join(tlsPath, 'dhparam.pem');
132132
if (!config.rpc.secure) {
133133
log.info('Generating secure node RPC configuration...');
134134
const clientsPath = path.join(tlsPath, 'clients');
@@ -137,7 +137,7 @@ const startDaemon = async () => {
137137
const serverCertPath = path.join(tlsPath, 'server.cert.pem');
138138
const serverKeyPath = path.join(tlsPath, 'server.key.pem');
139139
const serverPems = generateCert('nanowalletcompany.com');
140-
const dhparam = await fs.readFileAsync(path.join(__dirname, 'tls', 'dh2048.pem'));
140+
const dhparam = await fs.readFileAsync(path.join(__dirname, 'tls', 'dhparam.pem'));
141141
await writeFileAtomic(serverCertPath, normalizeNewline(serverPems.cert), { mode: 0o600 });
142142
await writeFileAtomic(serverKeyPath, normalizeNewline(serverPems.private), { mode: 0o600 });
143143
await writeFileAtomic(dhparamPath, normalizeNewline(dhparam), { mode: 0o600 });

ember-electron/main.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,17 @@ const run = async () => {
153153
await app.whenReady();
154154

155155
if (!is.development) {
156+
autoUpdater.on('error', (err) => {
157+
log.error('Error updating:', err);
158+
});
159+
156160
autoUpdater.on('checking-for-update', () => {
157161
log.info('Checking for update:', productName, '>', version);
158162
global.isUpdating = false;
159163
});
160164

161165
autoUpdater.on('update-available', () => {
162-
log.info('Update available:', productName, '>', version);
166+
log.info('Update available:', productName, '>', version, '(downloading...)');
163167
});
164168

165169
autoUpdater.on('update-not-available', () => {
@@ -172,8 +176,12 @@ const run = async () => {
172176
});
173177

174178
updateElectronApp({
175-
logger: log,
176179
updateInterval: '30 minutes',
180+
logger: {
181+
log(...args) {
182+
return log.debug('[update-electron-app]', ...args);
183+
},
184+
},
177185
});
178186
}
179187

@@ -191,7 +199,7 @@ const run = async () => {
191199

192200
const storeVersion = store.get('version');
193201
if (!storeVersion || semver.gt(version, storeVersion)) {
194-
const outdatedAssets = ['config.json', 'log', 'tls'];
202+
const outdatedAssets = ['config.json', 'log'];
195203
log.info('Deleting outdated assets:', outdatedAssets.join(', '));
196204
await del(outdatedAssets, { force: true, cwd: dataPath });
197205
}

0 commit comments

Comments
 (0)