<commit_before>// @flow
/*jshint esversion: 6 */
/*jslint node: true */
"use strict";

// Press F12 to open the DevTools. See https://github.com/sindresorhus/electron-debug.
// DO NOT COMMENT !!!
require("electron-debug")();
require("axios-debug-log");
const electron = require("electron");
const BrowserWindow = electron.BrowserWindow;
const {app, Menu, ipcMain, dialog} = require("electron");
const path = require("path");
const url = require("url");
const os = require("os");
const fs = require("fs-extra");
const passwordHash = require("password-hash");
const crypto = require("crypto");
const bitcoin = require("bitcoinjs-lib");
const bip32utils = require("bip32-utils");
const zencashjs = require("zencashjs");
const sql = require("sql.js");
const updater = require("electron-simple-updater");
const axios = require("axios");
const querystring = require("querystring");
const {List} = require("immutable");
const {translate} = require("./util.js");
const {DateTime} = require("luxon");
const {zenextra} = require("./zenextra.js");

let oldZAddrJSON;

const userWarningImportFileWithPKs = "New address(es) and a private key(s) will be imported. Your previous back-ups do not include the newly imported addresses or the corresponding private keys. Please use the backup feature of Arizen to make new backup file and replace your existing Arizen wallet backup. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";
const userWarningExportWalletUnencrypted = "You are going to export an UNENCRYPTED wallet ( ie your private keys) in plain text. That means that anyone with this file can control your ZENs. Store this file in a safe place. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";
const userWarningExportWalletEncrypted = "You are going to export an ENCRYPTED wallet and your private keys will be encrypted. That means that in order to access your private keys you need to know the corresponding username and password. In case you don't know them you cannot control the ZENs that are controled by these private keys. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";

// Uncomment if you want to run in production
// Show/Hide Development menu
process.env.NODE_ENV = "production";

function sleep(millis) {
    return new Promise(resolve => setTimeout(resolve, millis));
}

function attachUpdaterHandlers() {
    function onUpdateDownloaded() {
        let version = updater.meta.version;
        dialog.showMessageBox({
            type: "info",
            title: "Update is here!",
            message: `Arizen will close and the new ${version} version will be installed. When the update is complete, the Arizen wallet will reopen.`
        }, function () {
            // application forces to update itself
            updater.quitAndInstall();
        });
    }

    updater.on("update-downloaded", onUpdateDownloaded);
}

updater.init({checkUpdateOnStart: true, autoDownload: true});
attachUpdaterHandlers();<commit_msg>Remove auto updater<commit_after>// @flow
/*jshint esversion: 6 */
/*jslint node: true */
"use strict";

// Press F12 to open the DevTools. See https://github.com/sindresorhus/electron-debug.
// DO NOT COMMENT !!!
require("electron-debug")();
require("axios-debug-log");
const electron = require("electron");
const BrowserWindow = electron.BrowserWindow;
const {app, Menu, ipcMain, dialog} = require("electron");
const path = require("path");
const url = require("url");
const os = require("os");
const fs = require("fs-extra");
const passwordHash = require("password-hash");
const crypto = require("crypto");
const bitcoin = require("bitcoinjs-lib");
const bip32utils = require("bip32-utils");
const zencashjs = require("zencashjs");
const sql = require("sql.js");
const axios = require("axios");
const querystring = require("querystring");
const {List} = require("immutable");
const {translate} = require("./util.js");
const {DateTime} = require("luxon");
const {zenextra} = require("./zenextra.js");

let oldZAddrJSON;

const userWarningImportFileWithPKs = "New address(es) and a private key(s) will be imported. Your previous back-ups do not include the newly imported addresses or the corresponding private keys. Please use the backup feature of Arizen to make new backup file and replace your existing Arizen wallet backup. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";
const userWarningExportWalletUnencrypted = "You are going to export an UNENCRYPTED wallet ( ie your private keys) in plain text. That means that anyone with this file can control your ZENs. Store this file in a safe place. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";
const userWarningExportWalletEncrypted = "You are going to export an ENCRYPTED wallet and your private keys will be encrypted. That means that in order to access your private keys you need to know the corresponding username and password. In case you don't know them you cannot control the ZENs that are controled by these private keys. By pressing 'I understand' you declare that you understand this. For further information please refer to the help menu of Arizen.";

// Uncomment if you want to run in production
// Show/Hide Development menu
process.env.NODE_ENV = "production";

function sleep(millis) {
    return new Promise(resolve => setTimeout(resolve, millis));
}
{'fraction_non_alphanumeric': 0.10142882342564827, 'fraction_numerical': 0.0024695713529723057, 'mean_word_length': 4.74468085106383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6556173', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1473, 'n_words': 660}