fixes error when mnemonic is empty
This commit is contained in:
parent
0a8f1acbe2
commit
70eb80aae8
4 changed files with 6 additions and 6 deletions
|
|
@ -15,6 +15,7 @@ var templates = {
|
||||||
'.desktop': 'webkitbuilds/',
|
'.desktop': 'webkitbuilds/',
|
||||||
'setup-win.iss': 'webkitbuilds/',
|
'setup-win.iss': 'webkitbuilds/',
|
||||||
'build-macos.sh': 'webkitbuilds/',
|
'build-macos.sh': 'webkitbuilds/',
|
||||||
|
'manifest.json': 'chrome-app/',
|
||||||
// 'bower.json': '/',
|
// 'bower.json': '/',
|
||||||
};
|
};
|
||||||
var configDir = process.argv[2] || 'copay';
|
var configDir = process.argv[2] || 'copay';
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "*PACKAGENAME*",
|
"name": "*PACKAGENAME*",
|
||||||
"description": "*PACKAGEDESCRIPTION*",
|
"description": "*DESCRIPTION*",
|
||||||
"version": "*VERSION*",
|
"version": "*VERSION*",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"storage",
|
"storage",
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,12 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
|
|
||||||
$scope.seedOptions = [];
|
$scope.seedOptions = [];
|
||||||
|
|
||||||
if (isChromeApp) {
|
if (isChromeApp || isDevel) {
|
||||||
$scope.seedOptions.push({
|
$scope.seedOptions.push({
|
||||||
id: 'ledger',
|
id: 'ledger',
|
||||||
label: 'Ledger Hardware Wallet',
|
label: 'Ledger Hardware Wallet',
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
if (isChromeApp || isDevel) {
|
|
||||||
$scope.seedOptions.push({
|
$scope.seedOptions.push({
|
||||||
id: 'trezor',
|
id: 'trezor',
|
||||||
label: 'Trezor Hardware Wallet',
|
label: 'Trezor Hardware Wallet',
|
||||||
|
|
@ -281,14 +279,14 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.importHW = function(form) {
|
$scope.importHW = function(form) {
|
||||||
if (form.$invalid || $scope.formData.ccount < 0) {
|
if (form.$invalid || $scope.formData.account < 0) {
|
||||||
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('There is an error in the form'));
|
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('There is an error in the form'));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.importErr = false;
|
$scope.importErr = false;
|
||||||
|
|
||||||
var account = $scope.formData.ccount;
|
var account = $scope.formData.account;
|
||||||
|
|
||||||
if ($scope.seedSource.id == 'trezor') {
|
if ($scope.seedSource.id == 'trezor') {
|
||||||
if (account < 1) {
|
if (account < 1) {
|
||||||
|
|
|
||||||
|
|
@ -636,6 +636,7 @@ angular.module('copayApp.services')
|
||||||
};
|
};
|
||||||
|
|
||||||
root._normalizeMnemonic = function(words) {
|
root._normalizeMnemonic = function(words) {
|
||||||
|
if (!words || !words.indexOf) return words;
|
||||||
var isJA = words.indexOf('\u3000') > -1;
|
var isJA = words.indexOf('\u3000') > -1;
|
||||||
var wordList = words.split(/[\u3000\s]+/);
|
var wordList = words.split(/[\u3000\s]+/);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue