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

add akroma support #1976

Merged
merged 4 commits into from Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/scripts/abiDefinitions/akromaAbi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
3 changes: 3 additions & 0 deletions app/scripts/controllers/decryptWalletCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
singularDTVPath: "m/0'/0'/0'", // first address: m/0'/0'/0'/0
goPath: "m/44'/6060'/0'/0", // first address: m/44'/6060'/0'/0/0
hwEOSClassicPath: "m/44'/2018'/0'/0", // first address: m/44'/2018'/0'/0/0
hwAkromaPath: "m/44'/200625'/0'/0", // first address: m/44'/200625'/0'/0/0
hwESNetworkPath: "m/44'/31102'/0'/0", // first address: m/44'/31102'/0'/0/0
};
$scope.HDWallet.dPath = $scope.HDWallet.defaultDPath;
Expand Down Expand Up @@ -109,6 +110,8 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.EOSC:
$scope.HDWallet.dPath = $scope.HDWallet.hwEOSClassicPath;
break;
case nodes.nodeTypes.Akroma:
$scope.HDWallet.dPath = $scope.HDWallet.hwAkromaPath;
case nodes.nodeTypes.ESN:
$scope.HDWallet.dPath = $scope.HDWallet.hwESNetworkPath;
break;
Expand Down
21 changes: 18 additions & 3 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=='POA'||ajaxReq.type=='TOMO'||ajaxReq.type=='ELLA'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ETSC'||ajaxReq.type=='MUSIC'||ajaxReq.type=='GO'||ajaxReq.type=='EOSC'||ajaxReq.type=='ESN'">
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=='ELLA'||ajaxReq.type=='EGEM'||ajaxReq.type=='CLO'||ajaxReq.type=='ETSC'||ajaxReq.type=='MUSIC'||ajaxReq.type=='GO'||ajaxReq.type=='EOSC'||ajaxReq.type=='AKROMA'||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=='GO'||ajaxReq.type=='EOSC' ||ajaxReq.type=='POA'||ajaxReq.type=='ESN'">
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=='AKROMA'||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 @@ -991,6 +991,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 (Akroma) {{HDWallet.hwAkromaPath}}"
ng-change="onHDDPathChange()"
ng-model="HDWallet.dPath"
type="radio"
value="{{HDWallet.hwAkromaPath}}"/>
<span ng-bind="HDWallet.hwAkromaPath"></span>
<p class="small">
Network: Akroma (AKA)
</p>
</label>
</div>

<div class="col-sm-4">
<label class="radio small">
<input aria-describedby="Path: TREZOR (ESN) {{HDWallet.hwESNetworkPath}}"
Expand All @@ -1004,7 +1018,8 @@ <h4 id="modalTitle" class="modal-title" translate="ADD_Radio_5_Path" style="marg
</p>
</label>
</div>



<div class="col-sm-4">
<label class="radio small">
<p class="small"><strong>
Expand Down
14 changes: 14 additions & 0 deletions app/scripts/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ nodes.nodeTypes = {
MUSIC: "MUSIC",
GO: "GO",
EOSC: "EOSC",
AKROMA: "AKROMA",
ESN: "ESN",
Custom: "CUSTOM ETH"
};
Expand Down Expand Up @@ -339,6 +340,19 @@ nodes.nodeList = {
'service': 'eos-classic.io',
'lib': new nodes.customNode('https://node.eos-classic.io', '')
},
'akroma': {
'name': 'AKA',
'blockExplorerTX': 'https://akroma.io/explorer/transaction/[[txHash]]',
'blockExplorerAddr': 'https://akroma.io/explorer/address/[[address]]',
'type': nodes.nodeTypes.AKROMA,
'eip155': true,
'chainId': 200625,
'tokenList': require('./tokens/akromaTokens.json'),
'abiList': require('./abiDefinitions/akromaAbi.json'),
'estimateGas': true,
'service': 'akroma.io',
'lib': new nodes.customNode('https://rpc.akroma.io', '')
},
'esn': {
'name': 'ESN',
'blockExplorerTX': 'https://ethersocial.net/tx/[[txHash]]',
Expand Down
1 change: 1 addition & 0 deletions app/scripts/tokens/akromaTokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
15 changes: 14 additions & 1 deletion app/styles/etherwallet-custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ label small {
@brand-music: #fece00;
@brand-go: #27223d;
@brand-eosc: #926565;
@brand-akroma: #F10000;
@brand-esn: #a16bff;
@brand-cust: #b50085;

Expand Down Expand Up @@ -672,8 +673,12 @@ label small {
border-left: 2px solid @brand-eosc;
}
li:nth-child(25) {
border-left: 2px solid @brand-akroma;
}
li:nth-child(26) {
border-left: 2px solid @brand-esn;
}

li:last-child {
border-left: 2px solid @gray-light;
}
Expand All @@ -692,7 +697,8 @@ label small {
li:nth-child(22),
li:nth-child(23),
li:nth-child(24),
li:nth-child(25), {
li:nth-child(25),
li:nth-child(26),{
border-bottom: 1px solid @gray-lighter;
}
}
Expand Down Expand Up @@ -826,6 +832,13 @@ header.EOSC {
& + .container .alert-info { background-color:@brand-eosc; }
}

header.AKROMA {
.header-branding { border-bottom: 0.25rem solid @brand-akroma; }
& + .container + .pre-footer + .footer { border-top: 0.25rem solid @brand-akroma; }
& + .container .modal-content { border: 0.25rem solid @brand-akroma; }
& + .container .alert-info { background-color:@brand-akroma; }
}

header.ESN {
.header-branding { border-bottom: 0.25rem solid @brand-esn; }
& + .container + .pre-footer + .footer { border-top: 0.25rem solid @brand-esn; }
Expand Down