Skip to content

Commit

Permalink
Merge pull request MyEtherWallet#188 from j-chimienti/fix/priv-key-call
Browse files Browse the repository at this point in the history
remove call for priv key w/ web3 wallet in 'view wallet info' tab
  • Loading branch information
Dexaran authored Jul 10, 2018
2 parents 6038e7e + f632910 commit bcf922f
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 78 deletions.
144 changes: 83 additions & 61 deletions app/includes/viewWalletInfo-content.tpl
Original file line number Diff line number Diff line change
@@ -1,75 +1,97 @@
<article class="col-sm-8 view-wallet-content">

<section class="block">
<div class="col-xs-11">
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon" />
<p class="account-help-text" translate="x_AddessDesc">You may know this as your "Account #" or your "Public Key". It's what you send people so they can send you ETH. That icon is an easy way to recognize your address.</p>
<h5 translate="x_Address">Your Address:</h5>
</div>
<input class="form-control" type="text" ng-value="wallet.getChecksumAddressString()" readonly="readonly">
</div>
<section class="block">
<div class="col-xs-11">
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon"/>
<p class="account-help-text" translate="x_AddessDesc">You may know this as your "Account #" or your
"Public Key". It's what you send people so they can send you ETH. That icon is an easy way to
recognize your address.</p>
<h5 translate="x_Address">Your Address:</h5>
</div>
<input class="form-control" type="text" ng-value="wallet.getChecksumAddressString()" readonly="readonly">
</div>

<div class="col-xs-1 address-identicon-container">
<div class="addressIdenticon" title="Address Indenticon" blockie-address="{{wallet.getAddressString()}}" watch-var="wallet"></div>
</div>
<div class="col-xs-1 address-identicon-container">
<div class="addressIdenticon" title="Address Indenticon" blockie-address="{{wallet.getAddressString()}}"
watch-var="wallet"></div>
</div>

<div class="col-xs-12" ng-show='showEnc'>
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon" />
<p class="account-help-text" translate="x_KeystoreDesc">This Keystore / JSON file matches the format used by Mist & Geth so you can easily import it in the future. It is the recommended file to download and back up.</p>
<h5 translate="x_Keystore">Keystore/JSON File (Recommended • Encrypted • Mist/Geth Format)</h5>
</div>
<a class="btn btn-info btn-block" href="{{blobEnc}}" download="{{encFileName}}" translate="x_Download"> DOWNLOAD </a>
</div>
<div class="col-xs-12" ng-show='showEnc'>
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon"/>
<p class="account-help-text" translate="x_KeystoreDesc">This Keystore / JSON file matches the format
used by Mist & Geth so you can easily import it in the future. It is the recommended file to
download and back up.</p>
<h5 translate="x_Keystore">Keystore/JSON File (Recommended • Encrypted • Mist/Geth Format)</h5>
</div>
<a class="btn btn-info btn-block" href="{{blobEnc}}" download="{{encFileName}}" translate="x_Download">
DOWNLOAD </a>
</div>

<div class="col-xs-12" ng-if="wallet.type === 'default'">
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon"/>
<p class="account-help-text" translate="x_PrivKeyDesc">This is the unencrypted text version of your
private key, meaning no password is necessary. If someone were to find your unencrypted private key,
they could access your wallet without a password. For this reason, encrypted versions are typically
recommended.</p>
<h5>
<span translate="x_PrivKey">Private Key (unencrypted)</span>
</h5>
</div>
<div class="input-group">
<input class="form-control no-animate" type="{{pkeyVisible ? 'text' : 'password'}}"
ng-value="wallet.getPrivateKeyString()" readonly="readonly">
<span tabindex="0" aria-label="make private key visible" role="button" class="input-group-addon eye"
ng-click="showHidePkey()"></span>
</div>
</div>

<div class="col-xs-12" ng-show="wallet.type=='default'">
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon" />
<p class="account-help-text" translate="x_PrivKeyDesc">This is the unencrypted text version of your private key, meaning no password is necessary. If someone were to find your unencrypted private key, they could access your wallet without a password. For this reason, encrypted versions are typically recommended.</p>
<h5>
<span translate="x_PrivKey">Private Key (unencrypted)</span>
</h5>
</div>
<div class="input-group">
<input class="form-control no-animate" type="{{pkeyVisible ? 'text' : 'password'}}" ng-value="wallet.getPrivateKeyString()" readonly="readonly">
<span tabindex="0" aria-label="make private key visible" role="button" class="input-group-addon eye" ng-click="showHidePkey()"></span>
</div>
</div>

<div class="col-xs-12" ng-show="wallet.type=='default'">
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon"/>
<p class="account-help-text" translate="x_PrintDesc">ProTip: Click print and save this as a PDF, even if
you do not own a printer!</p>
<h5 translate="x_Print">Print Paper Wallet:</h5>
</div>
<a class="btn btn-info btn-block" ng-click="printQRCode()" translate="x_Print">Print Paper Wallet</a>
</div>
</section>

<section class="block">
<div class="col-xs-6">
<h5 translate="x_Address">Your Address:</h5>
<div class="qr-code" qr-code="{{wallet.getChecksumAddressString()}}" watch-var="wallet" width="100%"></div>
</div>
<div class="col-xs-6">


<div class="col-xs-12" ng-show="wallet.type=='default'">
<div class="account-help-icon">
<img src="images/icon-help.svg" class="help-icon" />
<p class="account-help-text" translate="x_PrintDesc">ProTip: Click print and save this as a PDF, even if you do not own a printer!</p>
<h5 translate="x_Print">Print Paper Wallet:</h5>
</div>
<a class="btn btn-info btn-block" ng-click="printQRCode()" translate="x_Print">Print Paper Wallet</a>
</div>
</section>
<div ng-if="wallet.type ==='default'">

<section class="block">
<div class="col-xs-6">
<h5 translate="x_Address">Your Address:</h5>
<div class="qr-code" qr-code="{{wallet.getChecksumAddressString()}}" watch-var="wallet" width="100%"></div>
</div>
<div class="col-xs-6">
<h5 ng-show="wallet.type=='default'">
<span translate="x_PrivKey">Private Key (unencrypted)</span>
</h5>
<div class="qr-pkey-container" ng-show="wallet.type=='default'">
<div class="qr-overlay" ng-show="!pkeyVisible"></div>
<div class="qr-code" qr-code="{{wallet.getPrivateKeyString()}}" watch-var="wallet" width="100%"></div>
<div class="input-group">
<input class="form-control no-animate" type="{{pkeyVisible ? 'text' : 'password'}}" ng-value="wallet.getPrivateKeyString()" readonly="readonly" style="display:none;width:0;height:0;padding:0">
<span tabindex="0" aria-label="make private key visible" role="button" class="input-group-addon eye" ng-click="showHidePkey()"></span>
<h5>
<span translate="x_PrivKey">Private Key (unencrypted)</span>
</h5>
<div class="qr-pkey-container">
<div class="qr-overlay" ng-show="!pkeyVisible"></div>
<div class="qr-code" qr-code="{{wallet.getPrivateKeyString()}}" watch-var="wallet"
width="100%"></div>
<div class="input-group">
<input class="form-control no-animate" type="{{pkeyVisible ? 'text' : 'password'}}"
ng-value="wallet.getPrivateKeyString()" readonly="readonly"
style="display:none;width:0;height:0;padding:0">
<span tabindex="0" aria-label="make private key visible" role="button"
class="input-group-addon eye"
ng-click="showHidePkey()"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>

</article>

<article class="col-sm-4">
<wallet-balance-drtv></wallet-balance-drtv>
<wallet-balance-drtv></wallet-balance-drtv>
</article>
39 changes: 22 additions & 17 deletions app/includes/viewWalletInfo.tpl
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
<main class="tab-pane active" ng-if="globalService.currentTab==globalService.tabs.viewWalletInfo.id" ng-controller='viewWalletCtrl' ng-cloak>
<main class="tab-pane active" ng-if="globalService.currentTab==globalService.tabs.viewWalletInfo.id"
ng-controller='viewWalletCtrl' ng-cloak>

<article class="collapse-container">
<article class="collapse-container">

<div ng-click="wd = !wd">
<a class="collapse-button"><span ng-show="wd">+</span><span ng-show="!wd">-</span></a>
<h1 translate="NAV_ViewWallet">View Wallet Details</h1>
</div>
<div ng-click="wd = !wd">
<a class="collapse-button"><span ng-show="wd">+</span><span ng-show="!wd">-</span></a>
<h1 translate="NAV_ViewWallet">View Wallet Details</h1>
</div>

<div ng-show="!wd">
<p translate="VIEWWALLET_Subtitle">
This page allows you to download different versions of private keys and re-print your paper wallet. You may want to do this in order to [import your account into Geth/Mist](http://ethereum.stackexchange.com/questions/465/how-to-import-a-plain-private-key-into-geth/). If you want to check your balance, we recommend using a blockchain explorer like <a href="http://etherscan.io/" target="_blank" rel="noopener">etherscan.io</a>.
</p>
<wallet-decrypt-drtv></wallet-decrypt-drtv>
</div>
<div ng-show="!wd">
<p translate="VIEWWALLET_Subtitle">
This page allows you to download different versions of private keys and re-print your paper wallet. You
may want to do this in order to [import your account into
Geth/Mist](http://ethereum.stackexchange.com/questions/465/how-to-import-a-plain-private-key-into-geth/).
If you want to check your balance, we recommend using a blockchain explorer like <a
href="http://etherscan.io/" target="_blank" rel="noopener">etherscan.io</a>.
</p>
<wallet-decrypt-drtv></wallet-decrypt-drtv>
</div>

</article>
</article>

<article class="row" ng-show="wallet!=null">
<article class="row" ng-show="wallet!=null">

@@if (site === 'cx' ) { @@include( './viewWalletInfo-content.tpl', { "site": "cx" } ) }
@@if (site === 'cew') { @@include( './viewWalletInfo-content.tpl', { "site": "cew" } ) }
@@if (site === 'cx' ) { @@include( './viewWalletInfo-content.tpl', { "site": "cx" } ) }
@@if (site === 'cew') { @@include( './viewWalletInfo-content.tpl', { "site": "cew" } ) }

</article>
</article>

</main>

0 comments on commit bcf922f

Please sign in to comment.