Skip to content
This repository has been archived by the owner on Nov 21, 2019. It is now read-only.

Commit

Permalink
TREZOR support for EtherSocial Network (ESN)
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmyeonghun authored and hackmod committed Jun 1, 2018
1 parent 68fb6ee commit 0a8dcf2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/scripts/controllers/decryptWalletCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
hwSocialPath: "m/44'/1128'/0'/0", // first address: m/44'/1128'/0'/0/0
hwMusicoinPath: "m/44'/184'/0'/0", // first address: m/44'/184'/0'/0/0
hwYapstonePath: "m/44'/528'/0'/0", // first address: m/44'/528'/0'/0/0
hwESNetworkPath: "m/44'/31102'/0'/0", // first address: m/44'/31102'/0'/0/0
singularDTVPath: "m/0'/0'/0'", // first address: m/0'/0'/0'/0
hwRskPath: "m/44'/137'/0'/0", // first address : m/44'/137'/0'/0/0
};
Expand Down Expand Up @@ -104,6 +105,8 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
break;
case nodes.nodeTypes.YAP:
$scope.HDWallet.dPath = $scope.HDWallet.hwYapstonePath;
case nodes.nodeTypes.ESN:
$scope.HDWallet.dPath = $scope.HDWallet.hwESNetworkPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.trezorPath;
Expand Down Expand Up @@ -142,6 +145,8 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
break;
case nodes.nodeTypes.YAP:
$scope.HDWallet.dPath = $scope.HDWallet.hwYapstonePath;
case nodes.nodeTypes.ESN:
$scope.HDWallet.dPath = $scope.HDWallet.hwESNetworkPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.defaultDPath;
Expand Down
18 changes: 16 additions & 2 deletions app/scripts/directives/walletDecryptDrtv.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h4 translate="decrypt_Access">
<!-- TREZOR -->
<label class="radio"
aria-flowto="aria4"
ng-show="ajaxReq.type=='ETH'||ajaxReq.type=='ETC'||ajaxReq.type=='ROPSTEN ETH'||ajaxReq.type=='RINKEBY ETH'||ajaxReq.type=='KOVAN ETH'||ajaxReq.type=='EXP'||ajaxReq.type=='UBQ'||ajaxReq.type=='RSK'||ajaxReq.type=='POA'||ajaxReq.type=='TOMO'||ajaxReq.type=='ELLA'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ETSC'||ajaxReq.type=='MUSIC'||ajaxReq.type=='YAP'">
ng-show="ajaxReq.type=='ETH'||ajaxReq.type=='ETC'||ajaxReq.type=='ROPSTEN ETH'||ajaxReq.type=='RINKEBY ETH'||ajaxReq.type=='KOVAN ETH'||ajaxReq.type=='EXP'||ajaxReq.type=='UBQ'||ajaxReq.type=='RSK'||ajaxReq.type=='POA'||ajaxReq.type=='TOMO'||ajaxReq.type=='ELLA'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ETSC'||ajaxReq.type=='MUSIC'||ajaxReq.type=='YAP'||ajaxReq.type=='ESN'">
<input aria-flowto="aria4"
type="radio"
aria-label="Trezor Hardware Wallet"
Expand Down Expand Up @@ -769,7 +769,7 @@ <h4 id="modalTitle" class="modal-title" translate="ADD_Radio_5_Path" style="marg
</h4>

<p class="alert alert-danger"
ng-hide="ajaxReq.type=='ETH'||ajaxReq.type=='ETC'||ajaxReq.type=='ROPSTEN ETH'||ajaxReq.type=='RINKEBY ETH'||ajaxReq.type=='KOVAN ETH'||ajaxReq.type=='EXP'||ajaxReq.type=='UBQ'||ajaxReq.type=='ELLA'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ETSC'||ajaxReq.type=='MUSIC'||ajaxReq.type=='YAP'">
ng-hide="ajaxReq.type=='ETH'||ajaxReq.type=='ETC'||ajaxReq.type=='ROPSTEN ETH'||ajaxReq.type=='RINKEBY ETH'||ajaxReq.type=='KOVAN ETH'||ajaxReq.type=='EXP'||ajaxReq.type=='UBQ'||ajaxReq.type=='ELLA'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ETSC'||ajaxReq.type=='MUSIC'||ajaxReq.type=='YAP'||ajaxReq.type=='ESN'">
We do not know the correct path for this network.
<a href="https://github.com/kvhnuke/etherwallet/issues"
target="_blank"
Expand Down Expand Up @@ -977,6 +977,20 @@ <h4 id="modalTitle" class="modal-title" translate="ADD_Radio_5_Path" style="marg
</label>
</div>

<div class="col-sm-4">
<label class="radio small">
<input aria-describedby="Path: TREZOR (ESN) {{HDWallet.hwESNetworkPath}}"
ng-change="onHDDPathChange()"
ng-model="HDWallet.dPath"
type="radio"
value="{{HDWallet.hwESNetworkPath}}"/>
<span ng-bind="HDWallet.hwESNetworkPath"></span>
<p class="small">
Network: EtherSocial Network (ESN)
</p>
</label>
</div>

<div class="col-sm-4">
<label class="radio small">
<p class="small"><strong>
Expand Down

0 comments on commit 0a8dcf2

Please sign in to comment.