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

@ -4,7 +4,13 @@
<div>
<span ng-show="wallet.status.wallet.singleAddress" class="size-12"><span translate>Auditable</span></span>
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.network != 'livenet'" src="img/icon-testnet-white.svg">
<img style="height:0.6em; margin-right: 1px;" ng-show="!wallet.canSign() && !wallet.isPrivKeyExternal()" src="img/icon-read-only-white.svg">
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.getPrivKeyExternalSourceName() == 'trezor'"
src="img/icon-trezor-white.svg">
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.getPrivKeyExternalSourceName() == 'ledger'"
src="img/icon-ledger-white.svg">
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.getPrivKeyExternalSourceName() == 'intelTEE'"
src="img/icon-inteltee-white.svg">
<span class="size-12 dib" style="height:0.6em; margin-right: 1px;" ng-show="wallet.account">#{{wallet.account || 0}} </span>
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.getPrivKeyExternalSourceName() == 'trezor'" src="img/icon-trezor-white.svg">
<img style="height:0.6em; margin-right: 1px;" ng-show="wallet.getPrivKeyExternalSourceName() == 'ledger'" src="img/icon-ledger-white.svg">

View file

@ -18,12 +18,6 @@
</span>
<i class="icon bp-arrow-right"></i>
</a>
<a class="item" ng-show="wallet.isPrivKeyExternal()">
<span translate>Hardware Wallet</span>
<span class="item-note">
{{externalSource}}
</span>
</a>
<a class="item item-icon-right" ui-sref="tabs.preferences.preferencesColor">
<span translate>Color</span>
<span class="item-note">

View file

@ -0,0 +1,14 @@
<ion-view>
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{exteralSource}}</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div class="padding">
<button class="button button-standard button-assertive" ng-click="showMneumonicFromHardwarePopup()">
{{'Show Recovery Phrase'|translate}}
</button>
</div>
</ion-content>
</ion-view>

View file

@ -43,6 +43,13 @@
{{derivationStrategy}}
</span>
</div>
<a class="item item-icon-right" href ui-sref="tabs.preferences.preferencesExternal" ng-show="wallet.isPrivKeyExternal()">
<span translate>Hardware Wallet</span>
<span class="item-note">
{{externalSource}}
</span>
<i class="icon bp-arrow-right"></i>
</a>
<div class="item" ng-show="wallet.isPrivKeyExternal()">
<span translate>Hardware Wallet</span>
<span class="item-note">

View file

@ -120,7 +120,7 @@
ng-model="formData.derivationPath">
</label>
<ion-toggle ng-show="seedSource.id == 'new'" ng-model="formData.testnetEnabled" toggle-class="toggle-positive">
<ion-toggle ng-show="seedSource.id == 'new' || seedSource.id == 'intelTEE'" ng-model="formData.testnetEnabled" toggle-class="toggle-positive">
Testnet
</ion-toggle>

View file

@ -15,7 +15,7 @@
<select ng-model="formData.seedSource" ng-options="seed as seed.label for seed in seedOptions"></select>
</label>
<label class="item item-input item-stacked-label" ng-show="formData.seedSource.id == 'trezor' || formData.seedSource.id == 'ledger'">
<label class="item item-input item-stacked-label" ng-show="formData.seedSource.id == 'trezor' || formData.seedSource.id == 'ledger' || formData.seedSource.id == 'intelTee'">
<span class="input-label" translate>Account Number</span>
<input type="number" ng-model="formData.account" ignore-mouse-wheel>
</label>

View file

@ -53,6 +53,19 @@
</div>
<div class="row qr">
<div class="text-center col center-block" copy-to-clipboard="addr" ng-repeat="wallet in wallets track by $index" ng-class="walletPosition($index)">
<span style="position: absolute; width: 220px" ng-show="shouldShowReceiveAddressFromHardware()">
<div style="width: 100%; height: 226px; background-color: rgba(255,255,255,0.8);">
<button class="button light-gray small round m10b"
style="background-color: white; border-color: black; color: black; top: 50%; transform: translateY(-50%);"
ng-click="showReceiveAddressFromHardware()">
<span translate>Show address</span>
</button>
</div>
</span>
<qrcode ng-if="walletAddrs[wallet.id]" size="220" data="bitcoin:{{walletAddrs[wallet.id]}}" color="#334"></qrcode>
</div>
</div>