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

Commit

Permalink
Merge pull request #2096 from mkrufky/mix
Browse files Browse the repository at this point in the history
Enable Ledger Hardware Wallet support for MIX Blockchain (MIX)
  • Loading branch information
gamalielhere authored Oct 16, 2018
2 parents 6133242 + ea8c1f0 commit 61374bb
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/scripts/abiDefinitions/mixAbi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
7 changes: 7 additions & 0 deletions app/scripts/controllers/decryptWalletCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
hwESNetworkPath: "m/44'/31102'/0'/0", // first address: m/44'/31102'/0'/0/0
hwEther1Path: "m/44'/1313114'/0'/0", // first address: m/44'/1313114'/0'/0/0
hwAtheiosPath: "m/44'/1620'/0'/0", // first address: m/44'/1620'/0'/0/0
hwMixPath: "m/44'/76'/0'/0", // first address: m/44'/76'/0'/0/0
};
$scope.canUseMewConnect = MewConnectEth.checkWebRTCAvailable();
$scope.mewConnectMayFail = MewConnectEth.checkBrowser();
Expand Down Expand Up @@ -95,6 +96,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.GO:
$scope.HDWallet.dPath = $scope.HDWallet.goPath;
break;
case nodes.nodeTypes.MIX:
$scope.HDWallet.dPath = $scope.HDWallet.hwMixPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.ledgerPath;
}
Expand Down Expand Up @@ -213,6 +217,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.ATH:
$scope.HDWallet.dPath = $scope.HDWallet.hwAtheiosPath;
break;
case nodes.nodeTypes.MIX:
$scope.HDWallet.dPath = $scope.HDWallet.hwMixPath;
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">
<!-- Ledger -->
<label aria-flowto="aria3"
class="radio"
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=='POA'||ajaxReq.type=='TOMO'||ajaxReq.type=='ESN'||ajaxReq.type=='AKA'||ajaxReq.type=='PIRL'||ajaxReq.type=='ETHO'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ATH'||ajaxReq.type=='MUSIC'||ajaxReq.type=='EOSC'||ajaxReq.type=='GO'">
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=='POA'||ajaxReq.type=='TOMO'||ajaxReq.type=='ESN'||ajaxReq.type=='AKA'||ajaxReq.type=='PIRL'||ajaxReq.type=='ETHO'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ATH'||ajaxReq.type=='MUSIC'||ajaxReq.type=='EOSC'||ajaxReq.type=='GO'||ajaxReq.type=='MIX'">
<input aria-flowto="aria3"
type="radio"
aria-label="Ledger Hardware Wallet"
Expand Down Expand Up @@ -849,7 +849,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=='GO'||ajaxReq.type=='EOSC'||ajaxReq.type=='POA'||ajaxReq.type=='AKA'||ajaxReq.type=='ESN'||ajaxReq.type=='PIRL'||ajaxReq.type=='ETHO'||ajaxReq.type=='ATH'">
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=='GO'||ajaxReq.type=='EOSC'||ajaxReq.type=='POA'||ajaxReq.type=='AKA'||ajaxReq.type=='ESN'||ajaxReq.type=='PIRL'||ajaxReq.type=='ETHO'||ajaxReq.type=='ATH'||ajaxReq.type=='MIX'">
We do not know the correct path for this network.
<a href="https://github.com/kvhnuke/etherwallet/issues"
target="_blank"
Expand Down Expand Up @@ -1139,6 +1139,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 (MIX) {{HDWallet.hwMixPath}}"
ng-change="onHDDPathChange()"
ng-model="HDWallet.dPath"
type="radio"
value="{{HDWallet.hwMixPath}}"/>
<span ng-bind="HDWallet.hwMixPath"></span>
<p class="small">
Network: Mix Blockchain (MIX)
</p>
</label>
</div>


<div class="col-sm-4">
<label class="radio small">
Expand Down
14 changes: 14 additions & 0 deletions app/scripts/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ nodes.nodeTypes = {
PIRL: "PIRL",
ETHO: "ETHO",
ATH: "ATH",
MIX: "MIX",
Custom: "CUSTOM ETH"
};
nodes.ensNodeTypes = [nodes.nodeTypes.ETH, nodes.nodeTypes.Ropsten];
Expand Down Expand Up @@ -442,6 +443,19 @@ nodes.nodeList = {
estimateGas: true,
service: "wallet.atheios.com",
lib: new nodes.customNode("https://wallet.atheios.com", "8797")
},
mix: {
name: "MIX",
blockExplorerTX: "https://blocks.mix-blockchain.org/transaction/[[txHash]]",
blockExplorerAddr: "https://blocks.mix-blockchain.org/address/[[address]]",
type: nodes.nodeTypes.MIX,
eip155: true,
chainId: 76,
tokenList: require("./tokens/mixTokens.json"),
abiList: require("./abiDefinitions/mixAbi.json"),
estimateGas: true,
service: "mix-blockchain.org",
lib: new nodes.customNode("https://rpc2.mix-blockchain.org", "8647")
}
};

Expand Down
1 change: 1 addition & 0 deletions app/scripts/tokens/mixTokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]

0 comments on commit 61374bb

Please sign in to comment.