mirror of https://github.com/BTCPrivate/copay.git
WIP: performance in chrome
This commit is contained in:
parent
bd4513d1e6
commit
ab78588a9f
|
@ -17,7 +17,7 @@
|
||||||
"ng-lodash": "~0.2.0",
|
"ng-lodash": "~0.2.0",
|
||||||
"angular-moment": "0.10.1",
|
"angular-moment": "0.10.1",
|
||||||
"moment": "2.10.3",
|
"moment": "2.10.3",
|
||||||
"angular-bitcore-wallet-client": "0.1.2",
|
"angular-bitcore-wallet-client": "0.1.4",
|
||||||
"angular-ui-router": "~0.2.13",
|
"angular-ui-router": "~0.2.13",
|
||||||
"qrcode-decoder-js": "*",
|
"qrcode-decoder-js": "*",
|
||||||
"fastclick": "*",
|
"fastclick": "*",
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
<switch id="network-name" name="isTestnet" ng-model="isTestnet" class="green right m5t m10b"></switch>
|
<switch id="network-name" name="isTestnet" ng-model="isTestnet" class="green right m5t m10b"></switch>
|
||||||
</label>
|
</label>
|
||||||
<label for="ext-master" class="m10t">
|
<label for="ext-master" class="m10t">
|
||||||
<span translate>Master extended private key</span>
|
<span translate>Backup Words (BIP39 seed)</span>
|
||||||
<small translate>If not given, a secure key will be generated</small>
|
<small translate>If not given, a secure key will be generated</small>
|
||||||
<input id="ext-master"
|
<input id="ext-master"
|
||||||
type="text"
|
type="text"
|
||||||
|
|
|
@ -57,7 +57,7 @@ angular.module('copayApp.controllers').controller('createController',
|
||||||
m: $scope.requiredCopayers,
|
m: $scope.requiredCopayers,
|
||||||
n: $scope.totalCopayers,
|
n: $scope.totalCopayers,
|
||||||
name: form.walletName.$modelValue,
|
name: form.walletName.$modelValue,
|
||||||
extendedPrivateKey: form.privateKey.$modelValue,
|
mnemonic: form.privateKey.$modelValue,
|
||||||
myName: $scope.totalCopayers > 1 ? form.myName.$modelValue : null,
|
myName: $scope.totalCopayers > 1 ? form.myName.$modelValue : null,
|
||||||
networkName: form.isTestnet.$modelValue ? 'testnet' : 'livenet',
|
networkName: form.isTestnet.$modelValue ? 'testnet' : 'livenet',
|
||||||
};
|
};
|
||||||
|
|
|
@ -68,7 +68,6 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
profileService.importWalletMnemonic(words, {
|
profileService.importWalletMnemonic(words, {
|
||||||
passphrase: passphrase,
|
passphrase: passphrase,
|
||||||
}, function(err, ret) {
|
}, function(err, ret) {
|
||||||
console.log('[import.js.70:err:]',err, ret); //TODO
|
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
if (err) {
|
if (err) {
|
||||||
self.error = err;
|
self.error = err;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('splashController',
|
angular.module('copayApp.controllers').controller('splashController',
|
||||||
function($scope, $timeout, $log, profileService, storageService, go) {
|
function($scope, $timeout, $log, profileService, storageService, go, bwcService) {
|
||||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||||
if (!val) go.path('disclaimer');
|
if (!val) go.path('disclaimer');
|
||||||
|
|
||||||
|
@ -29,4 +29,12 @@ angular.module('copayApp.controllers').controller('splashController',
|
||||||
});
|
});
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log('[splash.js.32]'); //TODO
|
||||||
|
var a = bwcService.getClient();
|
||||||
|
|
||||||
|
console.log('[splash.js.34]'); //TODO
|
||||||
|
a.seedFromMnemonic('glare benefit approve speak post afford spot cancel argue cushion unaware kitchen');
|
||||||
|
console.log("LISTO", a.credentials);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -168,8 +168,11 @@ angular.module('copayApp.services')
|
||||||
root._seedWallet = function(walletClient, network) {
|
root._seedWallet = function(walletClient, network) {
|
||||||
var lang = uxLanguage.getCurrentLanguage();
|
var lang = uxLanguage.getCurrentLanguage();
|
||||||
|
|
||||||
|
console.log('[profileService.js.170]'); //TODO
|
||||||
try {
|
try {
|
||||||
walletClient.seedFromRandomWithMnemonic(network, null, lang);
|
walletClient.seedFromRandomWithMnemonic(network, null, lang);
|
||||||
|
|
||||||
|
console.log('[profileService.js.174]'); //TODO
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
$log.info('Error creating seed: ' + e.message);
|
$log.info('Error creating seed: ' + e.message);
|
||||||
if (e.message.indexOf('language') > 0) {
|
if (e.message.indexOf('language') > 0) {
|
||||||
|
@ -205,11 +208,12 @@ angular.module('copayApp.services')
|
||||||
var walletClient = bwcService.getClient();
|
var walletClient = bwcService.getClient();
|
||||||
$log.debug('Creating Wallet:', opts);
|
$log.debug('Creating Wallet:', opts);
|
||||||
|
|
||||||
if (opts.extendedPrivateKey) {
|
if (opts.mnemonic) {
|
||||||
try {
|
try {
|
||||||
walletClient.seedFromExtendedPrivateKey(opts.extendedPrivateKey);
|
walletClient.seedFromMnemonic(opts.mnemonic);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
return cb(gettext('Could not create using the specified extended private key'));
|
$log.info(ex);
|
||||||
|
return cb(gettext('Could not create: Invalid Backup Words'));
|
||||||
}
|
}
|
||||||
} else if (opts.extendedPublicKey) {
|
} else if (opts.extendedPublicKey) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue