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 #1904 from gochain-io/gochain
Browse files Browse the repository at this point in the history
Add GoChain node
  • Loading branch information
gamalielhere authored Jun 13, 2018
2 parents adb5781 + 1c6bcba commit 91a3da2
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 3 deletions.
1 change: 1 addition & 0 deletions app/scripts/abiDefinitions/goAbi.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 @@ -33,6 +33,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
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
goPath: "m/44'/6060'/0'/0", // first address: m/44'/6060'/0'/0/0
};
$scope.HDWallet.dPath = $scope.HDWallet.defaultDPath;
$scope.mnemonicModel = new Modal(document.getElementById('mnemonicModel'));
Expand Down Expand Up @@ -105,6 +106,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.YAP:
$scope.HDWallet.dPath = $scope.HDWallet.hwYapstonePath;
break;
case nodes.nodeTypes.GO:
$scope.HDWallet.dPath = $scope.HDWallet.goPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.trezorPath;
}
Expand Down Expand Up @@ -143,6 +147,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.YAP:
$scope.HDWallet.dPath = $scope.HDWallet.hwYapstonePath;
break;
case nodes.nodeTypes.GO:
$scope.HDWallet.dPath = $scope.HDWallet.goPath;
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=='GO'">
<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=='GO'">
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 (GO) {{HDWallet.goPath}}"
ng-change="onHDDPathChange()"
ng-model="HDWallet.dPath"
type="radio"
value="{{HDWallet.goPath}}"/>
<span ng-bind="HDWallet.goPath"></span>
<p class="small">
Network: GoChain
</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 @@ -23,6 +23,7 @@ nodes.nodeTypes = {
X888: "X88",
MUSIC: "MUSIC",
YAP: "YAP",
GO: "GO",
Custom: "CUSTOM ETH"
};
nodes.ensNodeTypes = [nodes.nodeTypes.ETH, nodes.nodeTypes.Ropsten];
Expand Down Expand Up @@ -351,6 +352,19 @@ nodes.nodeList = {
'estimateGas': true,
'service': 'yapstone.pro',
'lib': new nodes.customNode('https://node.yapstone.pro', '')
},
'go': {
'name': 'GO',
'blockExplorerTX': 'https://explorer.gochain.io/tx/[[txHash]]',
'blockExplorerAddr': 'https://explorer.gochain.io/addr/[[address]]',
'type': nodes.nodeTypes.GO,
'eip155': true,
'chainId': 60,
'tokenList': require('./tokens/goTokens.json'),
'abiList': require('./abiDefinitions/goAbi.json'),
'estimateGas': true,
'service': 'gochain.io',
'lib': new nodes.customNode('https://rpc.gochain.io', '')
}
};

Expand Down
1 change: 1 addition & 0 deletions app/scripts/tokens/goTokens.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 @@ -596,6 +596,7 @@ label small {
@brand-x888: #ff9;
@brand-music: #fece00;
@brand-yap: #0e97c0;
@brand-go: #27223d;
@brand-cust: #b50085;

.dropdown-node .dropdown-menu {
Expand Down Expand Up @@ -662,6 +663,9 @@ label small {
li:nth-child(25) {
border-left: 2px solid @brand-yap;
}
li:nth-child(26) {
border-left: 2px solid @brand-go;
}
li:last-child {
border-left: 2px solid @gray-light;
}
Expand All @@ -678,7 +682,9 @@ label small {
li:nth-child(21),
li:nth-child(22),
li:nth-child(23),
li:nth-child(24) {
li:nth-child(24),
li:nth-child(25),
li:nth-child(26), {
border-bottom: 1px solid @gray-lighter;
}
}
Expand Down Expand Up @@ -819,6 +825,13 @@ header.YAP {
& + .container .alert-info { background-color:@brand-yap; }
}

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

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

0 comments on commit 91a3da2

Please sign in to comment.