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

Re-add MUSIC node #1724

Closed
wants to merge 3 commits into from
Closed
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
9 changes: 5 additions & 4 deletions app/scripts/controllers/CX/addWalletCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var addWalletCtrl = function($scope, $sce) {
trezorTestnetPath: "m/44'/1'/0'/0", // first address: m/44'/1'/0'/0/0
trezorClassicPath: "m/44'/61'/0'/0", // first address: m/44'/61'/0'/0/0
trezorPath: "m/44'/60'/0'/0", // first address: m/44'/60'/0'/0/0
hwMusicoinPath: "m/44'/184'/0'/0", // first address: m/44'/184'/0'/0/0
};
$scope.HDWallet.dPath = $scope.HDWallet.defaultDPath;
$scope.mnemonicModel = new Modal(document.getElementById('mnemonicModel'));
Expand All @@ -42,8 +43,8 @@ var addWalletCtrl = function($scope, $sce) {
case nodes.nodeTypes.ETC:
$scope.HDWallet.dPath = $scope.HDWallet.ledgerClassicPath;
break;
case nodes.nodeTypes.MUS:
$scope.HDWallet.dPath = $scope.HDWallet.ledgerMusicPath;
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.ledgerPath;
Expand All @@ -56,8 +57,8 @@ var addWalletCtrl = function($scope, $sce) {
case nodes.nodeTypes.ETC:
$scope.HDWallet.dPath = $scope.HDWallet.trezorClassicPath;
break;
case nodes.nodeTypes.MUS:
$scope.HDWallet.dPath = $scope.HDWallet.trezorMusicPath;
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
case nodes.nodeTypes.Ropsten:
$scope.HDWallet.dPath = $scope.HDWallet.trezorTestnetPath;
Expand Down
10 changes: 10 additions & 0 deletions app/scripts/controllers/decryptWalletCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
hwEllaismPath: "m/44'/163'/0'/0", // first address: m/44'/163'/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
hwMusicoinPath: "m/44'/184'/0'/0", // first address: m/44'/184'/0'/0/0
};
$scope.HDWallet.dPath = $scope.HDWallet.defaultDPath;
$scope.mnemonicModel = new Modal(document.getElementById('mnemonicModel'));
Expand All @@ -53,6 +54,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.UBQ:
$scope.HDWallet.dPath = $scope.HDWallet.hwUbqPath;
break;
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.ledgerPath;
}
Expand Down Expand Up @@ -85,6 +89,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.ELLA:
$scope.HDWallet.dPath = $scope.HDWallet.hwEllaismPath;
break;
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.trezorPath;
}
Expand All @@ -111,6 +118,9 @@ var decryptWalletCtrl = function($scope, $sce, walletService) {
case nodes.nodeTypes.UBQ:
$scope.HDWallet.dPath = $scope.HDWallet.hwUbqPath;
break;
case nodes.nodeTypes.MUSIC:
$scope.HDWallet.dPath = $scope.HDWallet.hwMusicoinPath;
break;
default:
$scope.HDWallet.dPath = $scope.HDWallet.defaultDPath;
}
Expand Down
17 changes: 15 additions & 2 deletions app/scripts/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ nodes.metamaskNode = require('./nodeHelpers/metamask');
nodes.nodeTypes = {
ETH: "ETH",
ETC: "ETC",
MUS: "MUSIC",
MUSIC: "MUSIC",
Ropsten: "ROPSTEN ETH",
Kovan: "KOVAN ETH",
Rinkeby: "RINKEBY ETH",
Expand Down Expand Up @@ -256,7 +256,20 @@ nodes.nodeList = {
'estimateGas': true,
'service': 'gazua.tv',
'lib': new nodes.customNode('https://node.ethereumsocial.kr', '')
}
},
'music_twmc': {
'name': 'MUSIC',
'blockExplorerTX': 'https://explorer.musicoin.tw/tx/[[txHash]]',
'blockExplorerAddr': 'https://explorer.musicoin.tw/account/[[address]]',
'type': nodes.nodeTypes.MUSIC,
'eip155': true,
'chainId': 7762959,
'tokenList': require('./tokens/musicTokens.json'),
'abiList': require('./abiDefinitions/musicAbi.json'),
'estimateGas': true,
'service': 'pool.musicoin.tw',
'lib': new nodes.customNode('https://mewapi.musicoin.tw', '')
},
};


Expand Down
10 changes: 10 additions & 0 deletions app/styles/etherwallet-custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,9 @@ label small {
li:nth-child(17) {
border-left: 2px solid @brand-etsc;
}
li:nth-child(18) {
border-left: 2px solid @brand-music;
}
li:last-child {
border-left: 2px solid @gray-light;
}
Expand Down Expand Up @@ -745,3 +748,10 @@ header.ETSC {
& + .container .modal-content { border: 0.25rem solid @brand-etsc; }
& + .container .alert-info { background-color:@brand-etsc; }
}

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