Split configuration into low and high traffic files

Also, we're now handling config ourselves instead of using
electron-config and config dependencies.
This commit is contained in:
Scott Nonnenberg 2018-08-28 14:53:05 -07:00
parent f59ec92fef
commit 998c35dcb3
9 changed files with 112 additions and 103 deletions

View file

@ -1,6 +1,7 @@
const electron = require('electron');
const sql = require('./sql');
const { remove } = require('./key_management');
const { remove: removeUserConfig } = require('./user_config');
const { remove: removeEphemeralConfig } = require('./ephemeral_config');
const { ipcMain } = electron;
@ -41,7 +42,8 @@ function initialize() {
ipcMain.on(ERASE_SQL_KEY, async event => {
try {
remove();
removeUserConfig();
removeEphemeralConfig();
event.sender.send(`${ERASE_SQL_KEY}-done`);
} catch (error) {
const errorForDisplay = error && error.stack ? error.stack : error;