Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MEW Websocket node #483

Merged
merged 3 commits into from
Jan 18, 2019
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
### Feature

- Add KeepKey [#350](https://github.com/MyEtherWallet/MyEtherWallet/pull/350)
- Add MEW Websocket node [#483](https://github.com/MyEtherWallet/MyEtherWallet/pull/483)

### Devop

Expand Down
34 changes: 16 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@
</option>
</select>
<input
v-validate="'required|url:require_protocol'"
v-validate="{
required: true,
url: {
require_protocol: true,
protocols: ['http', 'https', 'ws', 'wss']
}
}"
v-model="url"
class="custom-input-text-1"
type="text"
Expand All @@ -121,7 +127,7 @@
/>
<input
v-validate="'required|url:require_protocol'"
v-show="selectedNetwork.name === 'CUS'"
v-show="selectedNetworkName === 'CUS'"
v-model="blockExplorerTX"
class="custom-input-text-1"
type="text"
Expand All @@ -131,8 +137,8 @@
/>
<input
v-validate="'required|numeric'"
v-show="selectedNetwork.name === 'CUS'"
v-model="chainID"
v-show="selectedNetworkName === 'CUS'"
:value="chainID"
class="custom-input-text-1"
type="number"
name="customChain"
Expand All @@ -141,7 +147,7 @@
/>
<input
v-validate="'required|url:require_protocol'"
v-show="selectedNetwork.name === 'CUS'"
v-show="selectedNetworkName === 'CUS'"
v-model="blockExplorerAddr"
class="custom-input-text-1"
type="text"
Expand Down Expand Up @@ -210,7 +216,7 @@
<div class="content-block">
<div class="save-button-container">
<button
v-show="selectedNetwork.name !== 'CUS'"
v-show="selectedNetworkName !== 'CUS'"
:class="[
errors.has('nodeName') ||
errors.has('nodeUrl') ||
Expand All @@ -225,7 +231,7 @@
{{ $t('interface.save') }}
</button>
<button
v-show="selectedNetwork.name === 'CUS'"
v-show="selectedNetworkName === 'CUS'"
:class="[
errors.has('nodeName') ||
errors.has('nodeUrl') ||
Expand Down Expand Up @@ -304,13 +310,13 @@ export default {
if (store.get('customNetworks') !== undefined) {
this.customNetworks = store.get('customNetworks');
}
this.types['custom'] = {
this.types['CUS'] = {
name: 'CUS',
name_long: 'CUSTOM',
homePage: '',
blockExplorerTX: '',
blockExplorerAddr: '',
chainID: '',
chainID: networkTypes['ETH'].chainID,
tokens: [],
contracts: [],
ensResolver: ''
Expand Down Expand Up @@ -338,7 +344,6 @@ export default {
this.$refs.networkAdd.classList.toggle('hidden');
},
resetCompState() {
this.chainID = '';
this.port = 443;
this.name = '';
this.url = '';
Expand Down
10 changes: 10 additions & 0 deletions src/networks/nodes/eth-mew-ws.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { ETH } from '../types';
export default {
type: ETH,
service: 'myetherwallet.com-ws',
url: 'wss://ws.mewapi.io/eth',
port: 443,
auth: false,
username: '',
password: ''
};
2 changes: 2 additions & 0 deletions src/networks/nodes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ethethscan from './eth-ethscan';
import ethinfura from './eth-infura';
import ethinfuraws from './eth-infura-ws';
import ethmew from './eth-mew';
import ethmewws from './eth-mew-ws';
import etho from './etho';
import go from './go';
import kovethscan from './kov-ethscan';
Expand Down Expand Up @@ -44,6 +45,7 @@ export {
ethinfura,
ethinfuraws,
ethmew,
ethmewws,
etho,
go,
kovethscan,
Expand Down
2 changes: 1 addition & 1 deletion vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const webpackConfig = {
},
devServer: {
https: true,
host: '0.0.0.0',
host: 'localhost',
hotOnly: true,
port: 8080
},
Expand Down