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 #1876 from yapstonegithub/add-yap
Browse files Browse the repository at this point in the history
[YAP] Add Yapstone node
  • Loading branch information
gamalielhere authored May 31, 2018
2 parents 7bdc494 + d6e1053 commit 46321d0
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/scripts/abiDefinitions/yapAbi.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 @@ -30,6 +30,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
hwCallistoPath: "m/44'/820'/0'/0", // first address: m/44'/820'/0'/0/0
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
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 @@ -101,6 +102,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
case nodes.nodeTypes.YAP:
$scope.HDWallet.dPath = $scope.HDWallet.hwYapstonePath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.trezorPath;
}
Expand Down Expand Up @@ -136,6 +140,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
case nodes.nodeTypes.YAP:
$scope.HDWallet.dPath = $scope.HDWallet.hwYapstonePath;
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'">
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'">
<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'">
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'">
We do not know the correct path for this network.
<a href="https://github.com/kvhnuke/etherwallet/issues"
target="_blank"
Expand Down Expand Up @@ -965,6 +965,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 (YAP) {{HDWallet.hwYapstonePath}}"
ng-change="onHDDPathChange()"
ng-model="HDWallet.dPath"
type="radio"
value="{{HDWallet.hwYapstonePath}}"/>
<span ng-bind="HDWallet.hwYapstonePath"></span>
<p class="small">
Network: Yapstone
</p>
</label>
</div>

<section class="row">
<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 @@ -22,6 +22,7 @@ nodes.nodeTypes = {
EAST: "EAST",
X888: "X88",
MUSIC: "MUSIC",
YAP: "YAP",
Custom: "CUSTOM ETH"
};
nodes.ensNodeTypes = [nodes.nodeTypes.ETH, nodes.nodeTypes.Ropsten];
Expand Down Expand Up @@ -337,6 +338,19 @@ nodes.nodeList = {
'estimateGas': true,
'service': 'musicoin.org',
'lib': new nodes.customNode('https://mcdnode.trustfarm.io/api', '')
},
'yap': {
'name': 'YAP',
'blockExplorerTX': 'https://explorer.yapstone.pro/tx/[[txHash]]',
'blockExplorerAddr': 'https://explorer.yapstone.pro/addr/[[address]]',
'type': nodes.nodeTypes.YAP,
'eip155': true,
'chainId': 528,
'tokenList': require('./tokens/yapTokens.json'),
'abiList': require('./abiDefinitions/yapAbi.json'),
'estimateGas': true,
'service': 'yapstone.pro',
'lib': new nodes.customNode('https://node.yapstone.pro', '')
}
};

Expand Down
1 change: 1 addition & 0 deletions app/scripts/tokens/yapTokens.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
14 changes: 13 additions & 1 deletion app/styles/etherwallet-custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,7 @@ label small {
@brand-east: #0e97c0;
@brand-x888: #ff9;
@brand-music: #fece00;
@brand-yap: #0e97c0;
@brand-cust: #b50085;

.dropdown-node .dropdown-menu {
Expand Down Expand Up @@ -658,6 +659,9 @@ label small {
li:nth-child(24) {
border-left: 2px solid @brand-music;
}
li:nth-child(25) {
border-left: 2px solid @brand-yap;
}
li:last-child {
border-left: 2px solid @gray-light;
}
Expand All @@ -673,7 +677,8 @@ label small {
li:nth-child(20),
li:nth-child(21),
li:nth-child(22),
li:nth-child(23) {
li:nth-child(23),
li:nth-child(24) {
border-bottom: 1px solid @gray-lighter;
}
}
Expand Down Expand Up @@ -807,6 +812,13 @@ header.MUSIC {
& + .container .alert-info { background-color:@brand-music; }
}

header.YAP {
.nav-container { border-top: 0.25rem solid @brand-yap; }
& + .container + .pre-footer + .footer { border-top: 0.25rem solid @brand-yap; }
& + .container .modal-content { border: 0.25rem solid @brand-yap; }
& + .container .alert-info { background-color:@brand-yap; }
}

.contest-container {
align-content: center;
display: flex;
Expand Down

0 comments on commit 46321d0

Please sign in to comment.