Initial Intel TEE integration.

This commit is contained in:
Andy Phillipson 2016-12-05 17:33:46 -05:00
commit 0c69dfb061
24 changed files with 492 additions and 75 deletions

View file

@ -66,15 +66,15 @@ angular.module('copayApp.controllers').controller('joinController',
if (appConfigService.name == 'copay') {
if (isChromeApp) {
self.seedOptions.push({
id: 'ledger',
label: 'Ledger Hardware Wallet',
id: walletService.externalSource.ledger.id,
label: walletService.externalSource.ledger.longName,
});
}
if (isChromeApp || isDevel) {
self.seedOptions.push({
id: 'trezor',
label: 'Trezor Hardware Wallet',
id: walletService.externalSource.trezor.id,
label: walletService.externalSource.trezor.longName,
});
}
}
@ -130,19 +130,19 @@ angular.module('copayApp.controllers').controller('joinController',
return;
}
if (self.seedSourceId == 'ledger' || self.seedSourceId == 'trezor') {
if (self.seedSourceId == walletService.externalSource.ledger.id || self.seedSourceId == walletService.externalSource.trezor.id) {
var account = $scope.account;
if (!account || account < 1) {
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Invalid account number'));
return;
}
if (self.seedSourceId == 'trezor')
if (self.seedSourceId == walletService.externalSource.trezor.id)
account = account - 1;
opts.account = account;
ongoingProcess.set('connecting' + self.seedSourceId, true);
var src = self.seedSourceId == 'ledger' ? ledger : trezor;
var src = self.seedSourceId == walletService.externalSource.ledger.id ? ledger : trezor;
src.getInfoForNewWallet(true, account, function(err, lopts) {
ongoingProcess.set('connecting' + self.seedSourceId, false);