diff --git a/gulpTasks/testing.js b/gulpTasks/testing.js index ebfd8fe48..39efa8c99 100644 --- a/gulpTasks/testing.js +++ b/gulpTasks/testing.js @@ -5,7 +5,7 @@ const options = require('../gulpfile.js').options; gulp.task('test', () => { return gulp.src([ - `./tests/${options.type}/*.test.js` + `./tests/${options.type}/${options.test}.test.js` ]).pipe(mocha({ timeout: 60000, ui: 'exports', diff --git a/gulpfile.js b/gulpfile.js index ab76c600f..c3b1d01b4 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -11,16 +11,16 @@ const gulp = require('gulp'); const minimist = require('minimist'); const runSeq = require('run-sequence'); - // parse commandline arguments const args = process.argv.slice(2); const platforms = (process.platform === 'darwin') ? ['mac', 'linux', 'win'] : ['linux', 'win']; const options = minimist(args, { - string: ['walletSource'], + string: ['platform', 'walletSource', 'test'], boolean: _.flatten(['wallet', platforms]), default: { wallet: false, walletSource: 'master', + test: 'basic', }, }); @@ -81,3 +81,4 @@ gulp.task('uploadQueue', (cb) => { runSeq.apply(null, _.flatten([tasks, cb])); }); + diff --git a/interface/.meteor/packages b/interface/.meteor/packages index 29a5f4906..2b36f0b02 100644 --- a/interface/.meteor/packages +++ b/interface/.meteor/packages @@ -14,7 +14,6 @@ frozeman:template-var frozeman:reactive-timer frozeman:storage frozeman:global-notifications -numeral:numeral reactive-var@1.0.11 sacha:spin chuangbo:cookie @@ -43,3 +42,5 @@ standard-minifier-js@1.2.1 tap:i18n-bundler shell-server ecmascript +numeral:numeral +numeral:languages diff --git a/interface/.meteor/versions b/interface/.meteor/versions index 0870d46b0..cbff7123e 100644 --- a/interface/.meteor/versions +++ b/interface/.meteor/versions @@ -71,6 +71,7 @@ mongo@1.1.14 mongo-id@1.0.6 mrt:jquery-ui-sortable@1.10.3 npm-mongo@2.2.11_2 +numeral:languages@1.5.3 numeral:numeral@1.5.3_1 observe-sequence@1.0.14 ordered-dict@1.0.9 diff --git a/interface/client/appStart.js b/interface/client/appStart.js index 8907f448d..3e1e2cfe5 100644 --- a/interface/client/appStart.js +++ b/interface/client/appStart.js @@ -3,19 +3,19 @@ The init function of Mist @method mistInit */ -mistInit = function(){ +mistInit = function () { console.info('Initialise Mist Interface'); EthBlocks.init(); - Tabs.onceSynced.then(function() { - if (0 <= location.search.indexOf('reset-tabs')) { + Tabs.onceSynced.then(function () { + if (location.search.indexOf('reset-tabs') >= 0) { console.info('Resetting UI tabs'); Tabs.remove({}); } - if(!Tabs.findOne('browser')) { + if (!Tabs.findOne('browser')) { console.debug('Insert tabs'); Tabs.insert({ @@ -27,30 +27,33 @@ mistInit = function(){ } // overwrite wallet on start again, but use $set to dont remove titles - Tabs.upsert({_id: 'wallet'}, {$set: { - url: 'https://wallet.ethereum.org', - redirect: 'https://wallet.ethereum.org', - position: 1, - permissions: { - admin: true + Tabs.upsert( + { _id: 'wallet' }, + { + $set: { + url: 'https://wallet.ethereum.org', + redirect: 'https://wallet.ethereum.org', + position: 1, + permissions: { + admin: true + } } - } - }); + }); // Sets browser as default tab if: // 1) there's no record of selected tab // 2) data is corrupted (no saved tab matches localstore) - if(!LocalStore.get('selectedTab') || !Tabs.findOne(LocalStore.get('selectedTab'))){ + if (!LocalStore.get('selectedTab') || !Tabs.findOne(LocalStore.get('selectedTab'))) { LocalStore.set('selectedTab', 'wallet'); } }); }; -Meteor.startup(function(){ +Meteor.startup(function () { console.info('Meteor starting up...'); - if (!location.hash) { + if (!location.hash) { // Main window EthAccounts.init(); mistInit(); } @@ -58,27 +61,31 @@ Meteor.startup(function(){ console.debug('Setting language'); // SET default language - if(Cookie.get('TAPi18next')) { + if (Cookie.get('TAPi18next')) { TAPi18n.setLanguage(Cookie.get('TAPi18next')); } else { - var userLang = navigator.language || navigator.userLanguage, - availLang = TAPi18n.getLanguages(); + const userLang = navigator.language || navigator.userLanguage; + const availLang = TAPi18n.getLanguages(); // set default language if (_.isObject(availLang) && availLang[userLang]) { TAPi18n.setLanguage(userLang); - } else if (_.isObject(availLang) && availLang[userLang.substr(0,2)]) { - TAPi18n.setLanguage(userLang.substr(0,2)); + } else if (_.isObject(availLang) && availLang[userLang.substr(0, 2)]) { + TAPi18n.setLanguage(userLang.substr(0, 2)); } else { TAPi18n.setLanguage('en'); } } // change moment and numeral language, when language changes - Tracker.autorun(function(){ - if(_.isString(TAPi18n.getLanguage())) { - var lang = TAPi18n.getLanguage().substr(0,2); + Tracker.autorun(function () { + if (_.isString(TAPi18n.getLanguage())) { + const lang = TAPi18n.getLanguage().substr(0, 2); moment.locale(lang); - numeral.language(lang); + try { + numeral.language(lang); + } catch (err) { + console.error(`numeral.js couldn't set number formating: ${err.message}`); + } EthTools.setLocale(lang); } }); diff --git a/interface/client/templates/popupWindows/onboardingScreen.js b/interface/client/templates/popupWindows/onboardingScreen.js index 6d6a8a718..38775ab7e 100644 --- a/interface/client/templates/popupWindows/onboardingScreen.js +++ b/interface/client/templates/popupWindows/onboardingScreen.js @@ -265,12 +265,14 @@ Template['popupWindows_onboardingScreen_importAccount'].events({ ipc.on('uiAction_checkedWalletFile', function (e, error, type) { switch (type) { case 'presale': + console.log(`Imported ${type} account`); TemplateVar.set(template, 'filePath', files[0].path); Tracker.afterFlush(function () { template.$('.password').focus(); }); break; case 'web3': + console.log(`Imported ${type} account`); TemplateVar.set(template, 'filePath', files[0].path); TemplateVar.set(template, 'importing', true); setTimeout(function () { diff --git a/interface/i18n/mist.de.i18n.json b/interface/i18n/mist.de.i18n.json index 2c8016b32..e833dae1e 100644 --- a/interface/i18n/mist.de.i18n.json +++ b/interface/i18n/mist.de.i18n.json @@ -5,7 +5,7 @@ "label": "__app__", "about": "Über __app__", "checkForUpdates": "Nach Aktualisierungen suchen...", - "checkForNodeUpdates": "Check for Ethereum node updates...", + "checkForNodeUpdates": "Nach Ethereum Softwareknoten Aktualisierungen suchen...", "services": "Dienste", "hide": "__app__ ausblenden", "hideOthers": "Andere ausblenden", @@ -24,7 +24,7 @@ "view": { "label": "Ansicht", "fullscreen": "Vollbildmodus", - "default": "Default" + "default": "Standard" }, "accounts": { "label": "Konten", @@ -43,12 +43,12 @@ "runTests": "Tests durchführen", "logFiles": "Logdatei anzeigen", "openRemix": "Remix IDE öffnen", - "ethereumNode": "Ethereum Node", + "ethereumNode": "Ethereum Softwareknoten", "network": "Netzwerk", "mainNetwork": "Hauptnetzwerk", "startMining": "⛏ Mining starten (nur auf Testnetz)", "stopMining": "⛏ Mining stoppen", - "externalNode": "using external node", + "externalNode": "externer Softwareknoten aktiv", "nodeMode": "Chain download", "fullNode": "Store full blockchain", "lightNode": "Use light Node (experimental!)" @@ -61,12 +61,12 @@ }, "help": { "label": "Hilfe", - "reportBug": "Report an issue on Github" + "reportBug": "Ein Problem melden" } }, "errors": { - "nodeConnect": "Es konnte keine Verbindung mit dem Node hergestellt werden. Weitere Informatinen finden sich in den Logdateien.", - "nodeStartup": "Anscheinend konnte der Node nicht gestartet werden, läuft evtl. schon eine andere Instanz? Oder läuft eventuell gerade ein Datenbank-Update?", + "nodeConnect": "Es konnte keine Verbindung mit dem Softwareknoten hergestellt werden. Weitere Informatinen finden sich in den Logdateien.", + "nodeStartup": "Anscheinend konnte der Softwareknoten nicht gestartet werden, läuft evtl. schon eine andere Instanz? Oder läuft eventuell gerade ein Datenbank-Update?", "timeSync": { "title": "Deine Computer Uhr ist nicht synchronisiert!", "description": "Um mit dem Ethereum netzwerk zu synchronisieren muss deine Computer Uhr mit einem Zeit-Server synchronisiert werden.", @@ -75,8 +75,8 @@ "darwin": "Um Zeit Synchronisation einzuschalten, öffne die System Einstellungen und checke \"Zeit Datum automatisch\"." }, "nodeChecksumMismatch": { - "title": "Checksum mismatch in downloaded node!", - "description": "__algorithm__: __hash__\n\nPlease install the __type__ node version __version__ manually." + "title": "Prüfsumme des heruntergeladenen Softwareknotens stimmt nicht überein!", + "description": "__algorithm__: __hash__\n\nBitte installiere den Softwareknoten __type__ in Version __version__ manuell." }, "legacyChain": { "title": "Legacy chain detected", @@ -115,34 +115,33 @@ } }, "startScreen": { - "runningNodeFound": "Laufender Ethereum Node gefunden!", - "startingNode": "Starte Ethereum Node...", + "runningNodeFound": "Laufender Ethereum Softwareknoten gefunden!", + "startingNode": "Starte Ethereum Softwareknoten...", "startedNode": "Starte Anwendung...", - "nodeConnectionTimeout": "Ethereum Node konnte nicht gestartet werden!
Wenn Sie Geth installiert haben,, verwenden Sie bitte diesen Befehl, um Geth zu starten:
geth --ipcpath __path__

oder senden Sie einen Fehlerreport", - "nodeBinaryNotFound": "Keine Programmdatei für den Ethereum Node gefunden!
Bitte starten Sie den Ethereum Node manuell. ", - "nodeSyncing": "Ethereum Node muss synchronisiert werden, bitte warten...", + "nodeConnectionTimeout": "Ethereum Softwareknoten konnte nicht gestartet werden!
Wenn Sie Geth installiert haben,, verwenden Sie bitte diesen Befehl, um Geth zu starten:
geth --ipcpath __path__

oder senden Sie einen Fehlerreport", + "nodeBinaryNotFound": "Keine Programmdatei für den Ethereum Softwareknoten gefunden!
Bitte starten Sie den Ethereum Softwareknoten manuell. ", + "nodeSyncing": "Ethereum Softwareknoten muss synchronisieren, bitte warten...", "nodeSyncInfo": "Block __displayBlock__ von __highestBlock__ wird heruntergeladen.", "nodeSyncConnecting": "Suche nach Peers...", "peerSearchTimeout": "Peer-Suche überspringen", - "stoppingNode": "Stopping Ethereum node...", - "nodeStarting": "Ethereum node starting up...", - "nodeStarted": "Ethereum node started", - "nodeConnected": "Ethereum node connected", - "nodeStopping": "Ethereum node stopping...", - "nodeStopped": "Ethereum node stopped", - "nodeError": "Ethereum node connection error :'(", - "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", - "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", - "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", - "launchApp": "Launch Application", + "stoppingNode": "Stoppe Ethereum Softwareknoten...", + "nodeStarting": "Ethereum Softwareknoten startet...", + "nodeStarted": "Ethereum Softwareknoten gestartet", + "nodeConnected": "Ethereum Softwareknoten verbunden", + "nodeStopping": "Ethereum Softwareknoten stoppt...", + "nodeStopped": "Ethereum Softwareknoten gestoppt", + "nodeError": "Verbindungsproblem zum Ethereum Softwareknoten :'(", + "unableToBindPort": "Ethereum Softwareknoten kann nicht gestartet werden. Läuft bereits eine andere Instanz?", + "nodeSyncInfoStates": "Lade Block __displayBlock__ von __highestBlock__,
Lade chain structure __displayState__ von __displayKnownStates__", + "nodeSyncFoundPeers": "Verbinde mit __peers__ Peers...", + "launchApp": "Starte die Anwendung", "clientBinaries": { - "scanning": "Checking for node update...", - "downloading": "Downloading new node...", - "loadConfig": "Loading client config...", + "scanning": "Suche nach Softwareknoten Aktualisierung...", + "downloading": "Lade neue Softwareknoten-Version herunter...", + "loadConfig": "Lade Softwareknoten Konfiguration...", "filtering": "Filtering client binaries...", - "done": "Ethereum node up-to-date...", - "error": "Error running downloaded binary." + "done": "Ethereum Softwareknoten aktuell...", + "error": "Ethereum Softwareknoten konnte nicht gestartet werden." } }, "popupWindows": { @@ -153,7 +152,7 @@ "creating": "Konto wird angelegt...", "errors": { "passwordMismatch": "Die Passwörter stimmen nicht überein.", - "passwordTooShort": "Make a longer password" + "passwordTooShort": "Wähle ein längeres Passwort..." } }, "unlockMasterPassword": { @@ -184,14 +183,14 @@ "sendTransaction": "Transaktion absenden" }, "errors": { - "connectionTimeout": "Eine Verbindung mit dem Node war nicht möglich, eventuell ist der Node im Hintergrund abgestürzt?", + "connectionTimeout": "Eine Verbindung mit dem Softwareknoten war nicht möglich, eventuell ist der Softwareknoten im Hintergrund abgestürzt?", "wrongPassword": "Falsches Passwort", "multipleKeysMatchAddress": "Multiple keys match address, please remove duplicates from keystore (menu -> accounts -> backup -> accounts)", "insufficientFundsForGas": "Insufficient funds in main account (etherbase) to pay for gas", - "sameAccount": "Can't send to itself" + "sameAccount": "Kann nicht zum gleichen Konto schicken." }, - "transactionThrow": "The contract won't allow this transaction to be executed", - "noEstimate": "We couldn't estimate the gas.", + "transactionThrow": "Der Vertrag wird diese Transaktion nicht ausführen können", + "noEstimate": "Transaktionsgebühr konnte nicht geschätzt werden.", "gasLimit": "Provide maximum fee", "parameters": "Parameters", "showRawBytecode": "show raw data", @@ -207,7 +206,7 @@ "gotoMainnetDescription": " Sie werden etwas Ether benötigen, um Verträge anzulegen und auszuführen. Wir werden Ihnen helfen, etwas zu bekommen ...", "doYouHaveAWalletFile": "Haben Sie eine Wallet-Datei?", "walletFileDescription": "

Wallet-Datei zum importieren in dieses Fenster ziehen.
Wenn Sie 2014 am Ethereum-Pre-sale teilgenommen haben, sollten Sie über eine Datei mit dem Dateinamen ethereum_wallet_backup.json verfügen. Sie wurde nach dem Kauf heruntergeladen und Ihnen auch per E-Mail geschickt.

", - "dropFilesHere": "Pre-sale Datei hochladen", + "dropFilesHere": "Pre-sale Datei laden", "creating": "Erstellen...", "importing": "Importieren...", "skip": "Diesen Schritt überspringen", @@ -234,7 +233,7 @@ "learnReceipt": "Lernen Sie dieses Rezept kennen" }, "errors": { - "nodeNotStartedYet": "Warten Sie noch einige Sekunden, bis der Node gestartet ist, und versuchen Sie es dann noch einmal", + "nodeNotStartedYet": "Warten Sie noch einige Sekunden, bis der Softwareknoten gestartet ist, und versuchen Sie es dann noch einmal", "unknownFile": "Datei nicht erkannt.", "wrongPassword": "Falsches Passwort.", "importFailed": "Beim Import der Datei ist folgender Fehler aufgetreten: __error__" @@ -276,4 +275,4 @@ "bytes": "Bytes" } } -} \ No newline at end of file +} diff --git a/interface/i18n/mist.en.i18n.json b/interface/i18n/mist.en.i18n.json index d31bb6589..8111b4ff6 100644 --- a/interface/i18n/mist.en.i18n.json +++ b/interface/i18n/mist.en.i18n.json @@ -152,7 +152,6 @@ "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncConnecting": "Looking for peers...", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "peerSearchTimeout": "Skip peer search", "launchApp": "Launch Application", "clientBinaries": { diff --git a/interface/i18n/mist.es.i18n.json b/interface/i18n/mist.es.i18n.json index 1e7059e9b..4246bace7 100644 --- a/interface/i18n/mist.es.i18n.json +++ b/interface/i18n/mist.es.i18n.json @@ -134,7 +134,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "launchApp": "Launch Application", "clientBinaries": { "scanning": "Checking for node update...", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum es una plataforma descentralizada para la construcción de aplicaciones en una blockchain: segura y a prueba de manipulaciones que puede transferir valor, propiedad y vive para siempre", diff --git a/interface/i18n/mist.fa.i18n.json b/interface/i18n/mist.fa.i18n.json index b2d807e66..ac35cee5d 100644 --- a/interface/i18n/mist.fa.i18n.json +++ b/interface/i18n/mist.fa.i18n.json @@ -133,7 +133,6 @@ "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncConnecting": "Looking for peers...", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "peerSearchTimeout": "Skip peer search", "launchApp": "Launch Application", "clientBinaries": { @@ -209,7 +208,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum is a public blockchain that features a turing complete programming for building solid, decentralized applications.", diff --git a/interface/i18n/mist.fr.i18n.json b/interface/i18n/mist.fr.i18n.json index 74eda619f..367af1830 100644 --- a/interface/i18n/mist.fr.i18n.json +++ b/interface/i18n/mist.fr.i18n.json @@ -134,7 +134,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "launchApp": "Launch Application", "clientBinaries": { "scanning": "Checking for node update...", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum est une plateforme décentralisée pour la création d'applications sur une blockchain (chaîne de blocs) : logiciel inviolable qui peut transférer de la valeur et de la propriété et qui vit pour toujours", diff --git a/interface/i18n/mist.it.i18n.json b/interface/i18n/mist.it.i18n.json index b6a312829..48a2a6a70 100644 --- a/interface/i18n/mist.it.i18n.json +++ b/interface/i18n/mist.it.i18n.json @@ -133,7 +133,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "peerSearchTimeout": "Skip peer search", "launchApp": "Launch Application", "clientBinaries": { @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum é una piattaforma decentralizzata per costruire applicazioni sfruttando una blockchain: software a prova di manomissione che puó trasferire valore e proprietá vivendo per sempre", diff --git a/interface/i18n/mist.ja.i18n.json b/interface/i18n/mist.ja.i18n.json index 9cbb4835b..0cc367072 100644 --- a/interface/i18n/mist.ja.i18n.json +++ b/interface/i18n/mist.ja.i18n.json @@ -134,7 +134,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "launchApp": "Launch Application", "clientBinaries": { "scanning": "Checking for node update...", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum は分散型のプラットフォームで、ブロックチェーン上でアプリケーションを作成することが出来ます。価値を転送することが出来、永続的に稼働するセキュリティの高いソフトウェアを作ることが出来ます。", diff --git a/interface/i18n/mist.ko.i18n.json b/interface/i18n/mist.ko.i18n.json index 948738ecf..111667cba 100644 --- a/interface/i18n/mist.ko.i18n.json +++ b/interface/i18n/mist.ko.i18n.json @@ -133,7 +133,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "peerSearchTimeout": "Skip peer search", "launchApp": "Launch Application", "clientBinaries": { @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "이더리움은 블럭체인상에 앱을 만들기 위한 탈중앙화된 플랫폼이며, 이 블럭체인은 변조방지가능한 소프트웨어로서 가치와 자산을 전송할 수 있고 영구히 존속합니다.", diff --git a/interface/i18n/mist.kr.i18n.json b/interface/i18n/mist.kr.i18n.json index 41babc6ba..54eabbd51 100644 --- a/interface/i18n/mist.kr.i18n.json +++ b/interface/i18n/mist.kr.i18n.json @@ -133,7 +133,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "peerSearchTimeout": "Skip peer search", "launchApp": "Launch Application", "clientBinaries": { @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "이더리움은 블럭체인상에 앱을 만들기 위한 탈중앙화된 플랫폼이며, 이 블럭체인은 변조방지가능한 소프트웨어로서 가치와 자산을 전송할 수 있고 영구히 존속합니다.", diff --git a/interface/i18n/mist.nb.i18n.json b/interface/i18n/mist.nb.i18n.json index 91ce3fe5c..625b2a22a 100644 --- a/interface/i18n/mist.nb.i18n.json +++ b/interface/i18n/mist.nb.i18n.json @@ -131,7 +131,6 @@ "nodeSyncing": "Ethereum-node trenger å synkroniseres, vennligst vent...", "nodeSyncInfo": "Laster ned blokk __currentBlock__ av __highestBlock__.", "nodeSyncConnecting": "Leter etter peers...", - "nodeSyncingStopped": "Ethereum-node synkronisering stoppet", "peerSearchTimeout": "Hopp over peer søk", "launchApp": "Start Applikasjonen", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum er en desentralisert plattform for å bygge applikasjoner på en blokkjede: sabotasjesikker programvare som kan overføre verdi og eiendom, og som lever evig", diff --git a/interface/i18n/mist.nl.i18n.json b/interface/i18n/mist.nl.i18n.json index 9440f6b4c..09b1e9a9b 100644 --- a/interface/i18n/mist.nl.i18n.json +++ b/interface/i18n/mist.nl.i18n.json @@ -151,7 +151,6 @@ "nodeSyncInfoStates": "Blok __displayBlock__ van __highestBlock__ aan het downloaden,
Chain structuur __displayState__ van __displayKnownStates__ aan het downloaden", "nodeSyncConnecting": "Zoeken naar peers...", "nodeSyncFoundPeers": "Verbinden met __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync gestopt", "peerSearchTimeout": "Sla peer search over", "launchApp": "Applicatie Opstarten", "clientBinaries": { @@ -227,7 +226,9 @@ "showRawBytecode": "Toon ruwe data", "showDecodedParameters": "Toon gedecodeerde parameters", "lookupData": "Probeer de data te decoderen", - "lookupDataExplainer": "Zoek hiernaar op het internet" + "lookupDataExplainer": "Zoek hiernaar op het internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum is een decentraal platform voor het bouwen van applicaties op een blockchain: software die immuun is voor fraude en levenslang waarde en eigendom over kan brengen", diff --git a/interface/i18n/mist.pt.i18n.json b/interface/i18n/mist.pt.i18n.json index 8a63a7806..1c2007819 100644 --- a/interface/i18n/mist.pt.i18n.json +++ b/interface/i18n/mist.pt.i18n.json @@ -135,7 +135,6 @@ "nodeError": "Ethereum node connection error :'(", "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "clientBinaries": { "scanning": "Checking for node update...", "downloading": "Downloading new node...", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum é uma plataforma decentralizada para construir aplicativos no blockchain: apps a prova de fraude, censura ou corrupção que podem transferir valor e títulos de propriedade", diff --git a/interface/i18n/mist.ru.i18n.json b/interface/i18n/mist.ru.i18n.json index 7f4a73b8a..951ad7ab9 100644 --- a/interface/i18n/mist.ru.i18n.json +++ b/interface/i18n/mist.ru.i18n.json @@ -133,7 +133,6 @@ "nodeSyncInfoStates": "Загружено блоков __displayBlock__ из __highestBlock__,
Загружено частей структуры блокчейна __displayState__ из __displayKnownStates__", "nodeSyncConnecting": "Поиск пиров...", "nodeSyncFoundPeers": "Количество подключеных пиров __peers__...", - "nodeSyncingStopped": "Остановилась синхронизация Ethereum-ноды", "peerSearchTimeout": "Пропустить поиск пиров", "launchApp": "Запуск приложения", "clientBinaries": { @@ -199,7 +198,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Etherium представляет собой децентрализованную платформу основанную на блокчейне для создания надежных и децентрализованных приложений", diff --git a/interface/i18n/mist.sq.i18n.json b/interface/i18n/mist.sq.i18n.json index 8f7713eaa..c43abc9ad 100644 --- a/interface/i18n/mist.sq.i18n.json +++ b/interface/i18n/mist.sq.i18n.json @@ -133,7 +133,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "peerSearchTimeout": "Skip peer search", "launchApp": "Launch Application", "clientBinaries": { @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "Ethereum është një platformë e decentralizuar për ndërtim aplikacionesh në një zinxhir blloqesh (blockchain): tamper-proof software i cili mund të transferojë vlerë dhe pronësi dhe jetë përgjithmonë", diff --git a/interface/i18n/mist.zh-TW.i18n.json b/interface/i18n/mist.zh-TW.i18n.json index 0a204209c..1f04ea9cc 100644 --- a/interface/i18n/mist.zh-TW.i18n.json +++ b/interface/i18n/mist.zh-TW.i18n.json @@ -134,7 +134,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "launchApp": "Launch Application", "clientBinaries": { "scanning": "Checking for node update...", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "以太坊是一個用於在區塊鏈上創建應用的去中心化平台:一種用於轉移價值和資產,永遠存在並且無法被篡改的軟體", diff --git a/interface/i18n/mist.zh.i18n.json b/interface/i18n/mist.zh.i18n.json index 32b67136a..8a7ea320b 100644 --- a/interface/i18n/mist.zh.i18n.json +++ b/interface/i18n/mist.zh.i18n.json @@ -134,7 +134,6 @@ "unableToBindPort": "Ethereum node cannot run. Is another instance already running?", "nodeSyncInfoStates": "Downloading block __displayBlock__ of __highestBlock__,
Downloading chain structure __displayState__ of __displayKnownStates__", "nodeSyncFoundPeers": "Connecting to __peers__ peers...", - "nodeSyncingStopped": "Ethereum node sync stopped", "launchApp": "Launch Application", "clientBinaries": { "scanning": "Checking for node update...", @@ -197,7 +196,9 @@ "showRawBytecode": "show raw data", "showDecodedParameters": "show decoded parameters", "lookupData": "Try to decode data", - "lookupDataExplainer": "Look this up on the internet" + "lookupDataExplainer": "Look this up on the internet", + "overBlockGasLimit": "The gas required for this execution could exceed the block gas limit.", + "notEnoughGas": "Gas might not be enough to successfully finish this transaction.
Click here to increase the gas amount." }, "onboarding": { "description": "以太坊是一个用于在区块链上创建应用的去中心化平台:一种用于转移价值和资产,永远存在并且无法被篡改的软件", diff --git a/interface/project-tap.i18n b/interface/project-tap.i18n index 505e66bb2..0c215d17d 100644 --- a/interface/project-tap.i18n +++ b/interface/project-tap.i18n @@ -1,5 +1,7 @@ { - "cdn_path" : "i18n", - "helper_name": "i18n", - "supported_languages": ["de", "en", "es", "fa", "fr", "it", "ja", "ko", "nb", "nl", "pt", "ru", "sq", "zh", "zh-TW"] + "cdn_path": "i18n", + "helper_name": "i18n", + "supported_languages": [ + "de", "en", "es", "fa", "fr", "it", "ja", "ko", "nb", "nl", "pt", "ru", "sq", "zh", "zh-TW" + ] } diff --git a/modules/ipcCommunicator.js b/modules/ipcCommunicator.js index 0d0affe35..b1e696443 100644 --- a/modules/ipcCommunicator.js +++ b/modules/ipcCommunicator.js @@ -115,21 +115,23 @@ ipc.on('backendAction_stopWebviewNavigation', (e, id) => { // check wallet file ipc.on('backendAction_checkWalletFile', (e, path) => { - - log.warn(111); fs.readFile(path, 'utf8', (event, data) => { try { - const wallet = JSON.parse(data); - const result = keyfileRecognizer(wallet); + const keyfile = JSON.parse(data); + const result = keyfileRecognizer(keyfile); /** result * [ 'ethersale', undefined ] Ethersale keyfile * [ 'web3', 3 ] web3 (v3) keyfile * null no valid keyfile */ - if (_.first(result) === 'ethersale') { + const type = _.first(result); + + log.debug(`Importing ${type} account...`); + + if (type === 'ethersale') { e.sender.send('uiAction_checkedWalletFile', null, 'presale'); - } else if (_.first(result) === 'web3') { + } else if (type === 'web3') { e.sender.send('uiAction_checkedWalletFile', null, 'web3'); let keystorePath = Settings.userHomePath; @@ -151,15 +153,19 @@ ipc.on('backendAction_checkWalletFile', (e, path) => { if (process.platform === 'win32') keystorePath = `${Settings.appDataPath}\\Ethereum\\keystore`; } - fs.writeFile(`${keystorePath}/0x${wallet.address}`, data, (err) => { + fs.writeFile(`${keystorePath}/0x${keyfile.address}`, data, (err) => { if (err) throw new Error("Can't write file to disk"); }); } else { - throw new Error('Wallet import: Cannot recognize keyfile'); + throw new Error('Account import: Cannot recognize keyfile (invalid)'); } } catch (err) { e.sender.send('uiAction_checkedWalletFile', null, 'invalid'); - log.error(err); + if (/Unexpected token . in JSON at position 0/.test(err.message) === true) { + log.error('Account import: Cannot recognize keyfile (no JSON)'); + } else { + log.error(err); + } } }); }); diff --git a/tests/fixtures/fixture-popup.html b/tests/fixtures/fixture-popup.html index c9a6a1645..97aa0338d 100644 --- a/tests/fixtures/fixture-popup.html +++ b/tests/fixtures/fixture-popup.html @@ -4,7 +4,7 @@

Fixture Popup

- Target blank - Target popup + Target blank + Target popup diff --git a/tests/fixtures/js-redirect.html b/tests/fixtures/js-redirect.html new file mode 100644 index 000000000..3a0c9f51f --- /dev/null +++ b/tests/fixtures/js-redirect.html @@ -0,0 +1,17 @@ + + + JS redirect fixture + + +

JS redirect fixture

+ + + + diff --git a/tests/fixtures/meta-redirect.html b/tests/fixtures/meta-redirect.html new file mode 100644 index 000000000..bd0f7a3e6 --- /dev/null +++ b/tests/fixtures/meta-redirect.html @@ -0,0 +1,9 @@ + + + Meta redirect fixture + + + +

Meta redirect fixture

+ + diff --git a/tests/mist/basic.test.js b/tests/mist/basic.test.js index 74ef89ff2..40040af0e 100644 --- a/tests/mist/basic.test.js +++ b/tests/mist/basic.test.js @@ -17,7 +17,6 @@ test['Sanity Check: main window is focused'] = function* () { (yield client.getUrl()).should.match(/interface\/index\.html$/); }; -// FAILING ON TRAVIS test['Browser bar should render urls with separators'] = function* () { const client = this.client; @@ -99,7 +98,7 @@ test['Load fixture page'] = function* () { yield this.loadFixture(); }; -test['"http://" protocol should be allowed on browser bar'] = function* () { // ETH-01-002 +test['"http" protocol should be allowed on browser bar'] = function* () { // ETH-01-002 const client = this.client; yield this.loadFixture(); @@ -117,7 +116,7 @@ test['"http://" protocol should be allowed on browser bar'] = function* () { // browserBarText.should.eql('http://localhost:8080 ▸ index.html'); // checks that did change displayed URL }; -test['"javascript:" protocol should be disallowed on browser bar'] = function* () { // ETH-01-002 +test['"javascript" protocol should be disallowed on browser bar'] = function* () { // ETH-01-002 const client = this.client; yield this.loadFixture(); yield client.setValue('#url-input', 'javascript:window.close()'); @@ -134,7 +133,7 @@ test['"javascript:" protocol should be disallowed on browser bar'] = function* ( browserBarText.should.eql('http://localhost:8080'); // checks that hasn't changed displayed URL }; -test['"data:" protocol should be disallowed on browser bar'] = function* () { // ETH-01-002 +test['"data" protocol should be disallowed on browser bar'] = function* () { // ETH-01-002 const client = this.client; yield this.loadFixture(); yield client.setValue('#url-input', 'data:text/plain;charset=utf-8;base64,dGhpcyB0ZXN0IGlzIG9uIGZpcmU='); @@ -151,15 +150,15 @@ test['"data:" protocol should be disallowed on browser bar'] = function* () { // browserBarText.should.eql('http://localhost:8080'); // checks that hasn't changed displayed URL }; -// test['"file:///" protocol should be disallowed'] = function* () { // ETH-01-002 -// const client = this.client; -// const filePath = 'file://' + path.join(__dirname, '..', 'fixtures', 'index.html'); +test['"file" protocol should be disallowed on browser bar'] = function* () { // ETH-01-012 + const client = this.client; + const filePath = 'file://' + path.join(__dirname, '..', 'fixtures', 'index.html'); -// yield this.navigateTo(filePath); -// yield Q.delay(1500); -// const browserBarText = yield this.getBrowserBarText(); -// browserBarText.should.match(/errorPages ▸ 400.html$/); -// }; + yield this.navigateTo(filePath); + yield Q.delay(1500); + const browserBarText = yield this.getBrowserBarText(); + browserBarText.should.match(/errorPages ▸ 400.html$/); +}; test['Pin tab test'] = function* () { const client = this.client; @@ -174,57 +173,100 @@ test['Pin tab test'] = function* () { sidebarItemsAfterAdd.length.should.eql(3); }; -// test['Browse tab should be changed to pinned tab if the URL is the same'] = function* () { // ETH-01-007 -// const client = this.client; -// yield this.selectTab('browser'); +test['Browse tab should be changed to pinned tab if URLs are the same'] = function* () { // ETH-01-007 + const client = this.client; + yield this.selectTab('browser'); -// yield this.navigateTo('https://wallet.ethereum.org' ); -// yield Q.delay(1000); -// const el = (yield client.element('.sidebar nav > ul > .selected')); -// console.log('el', el); + yield this.navigateTo('https://wallet.ethereum.org'); + yield Q.delay(1000); + const selectedTab = (yield client.execute(() => { // code executed in browser context + return LocalStore.get('selectedTab'); + })).value; -// el.getAttribute('data-tab-id').should.eql('wallet'); + selectedTab.should.eql('wallet'); +}; -// }; +test['Wallet tab shouldn\'t have the page replaced if URLs does not match'] = function* () { // ETH-01-007 + const client = this.client; + const app = this; + yield this.selectTab('wallet'); -// test['Wallet tab shouldn\'t have the page replaced if URLs does not match'] = function* () { // ETH-01-007 -// const client = this.client; -// const app = this; -// yield this.selectTab('wallet'); + yield this.navigateTo(`${this.fixtureBaseUrl}index.html?https://wallet.ethereum.org`); + yield client.waitUntil(() => { + return client.execute(() => { + return LocalStore.get('selectedTab') === 'browser'; + }); + }, 2000); +}; -// yield this.navigateTo(`${this.fixtureBaseUrl}index.html?https://wallet.ethereum.org`); -// yield client.waitUntil(() => { -// return client.element('.sidebar nav > ul > .selected').then((e) => { -// console.log('e', e); -// return e.getAttribute('data-tab-id') === 'browse'; -// }); -// }, 2000); -// }; +test['Wallet tab shouldn\'t have the page replaced if URLs does not match - 2'] = function* () { // ETH-01-007 + const client = this.client; + const app = this; + yield this.selectTab('wallet'); -// test['Wallet tab shouldn\'t have the page replaced if URLs does not match - 2'] = function* () { // ETH-01-007 -// const client = this.client; -// const app = this; -// yield this.selectTab('wallet'); + // Now changing address via JS + yield client.setValue('#url-input', `${this.fixtureBaseUrl}index.html?https://wallet.ethereum.org`); + const isProtocolBlocked = yield client.execute(() => { // Code executed in context of browser + $('form.url').submit(); + }); -// // Now changing address via JS -// yield client.setValue('#url-input', `${this.fixtureBaseUrl}index.html?https://wallet.ethereum.org`); -// const isProtocolBlocked = yield client.execute(() => { // Code executed in context of browser -// $('form.url').submit(); -// }); + yield client.waitUntil(() => { + return client.execute(() => { + return LocalStore.get('selectedTab') === 'browser'; + }); + }, 2000); +}; -// yield client.waitUntil(() => { -// return client.element('.sidebar nav > ul > .selected').then((e) => { -// console.log('e', e); -// return e.getAttribute('data-tab-id') === 'browser'; -// }); -// }, 2000); -// }; +test['Links with target _blank should open inside Mist'] = function* () { + const client = this.client; + yield this.navigateTo(`${this.fixtureBaseUrl}/fixture-popup.html`); + yield this.getWindowByUrl(e => /fixture-popup.html$/.test(e)); -test['Links with target _blank or _popup should open inside Mist'] = function* () { + yield client.click('a[target=_blank]'); + yield client.waitUntil(() => { + return client.getUrl((url) => { + return /index.html$/.test(url); + }); + }); +}; + +test['Links with target _popup should open inside Mist'] = function* () { const client = this.client; yield this.navigateTo(`${this.fixtureBaseUrl}/fixture-popup.html`); - yield this.getWindowByUrl(e => /popup.html$/.test(e)); + yield this.getWindowByUrl(e => /fixture-popup.html$/.test(e)); + + yield client.click('a[target=_popup]'); + yield client.waitUntil(() => { + return client.getUrl((url) => { + return /index.html$/.test(url); + }) + }); +}; + +// ETH-01-005 +test['Mist main webview should not redirect to arbitrary addresses'] = function* () { + const client = this.client; + const initialURL = yield client.getUrl(); + + yield client.execute(() => { // code executed in context of browser + window.location.href = 'http://google.com'; + }); - // TODO: click on the fixtures' links and assert if they opened on the same page + yield Q.delay(1000); + (yield client.getUrl()).should.eql(initialURL); }; + +// ETH-01-008 +test['Mist main webview should not redirect to local files'] = function* () { + const client = this.client; + const initialURL = yield client.getUrl(); + + yield this.navigateTo('https://cure53.de/exchange/8743653459838/ETH-01-008.php'); + + yield client.waitUntil(() => { + return client.getText('.url-breadcrumb').then((e) => { + return /400\.html$/.test(e); + }); + }, 5000, 'expected a URL not allowed as a result'); +};