Merge pull request #1089 from esteemapp/bugfix/serverlist

Bugfix/serverlist
This commit is contained in:
Feruz M 2019-08-27 07:53:12 +03:00 committed by GitHub
commit 397c3c44d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 2 deletions

View File

@ -322,7 +322,23 @@ export const uploadImage = file => {
// });
// });
export const getNodes = () => serverList.get().then(resp => resp.data.nodes);
export const getNodes = () =>
serverList
.get()
.then(
resp =>
resp.data.nodes || [
'https://rpc.esteem.app',
'https://api.steemit.com',
'https://steemd.previx.io',
'https://anyx.io',
'https://rpc.buildteam.io',
'https://rpc.steemviz.com',
'https://api.steem.house',
'https://steemd.pevo.science',
'https://steemd.minnowsupportproject.org',
],
);
export const getSCAccessToken = code =>
new Promise(resolve => {

View File

@ -73,7 +73,21 @@ class SettingsContainer extends Component {
.then(resp => {
this.setState({ serverList: resp });
})
.catch(() => {});
.catch(() =>
this.setState({
serverList: [
'https://rpc.esteem.app',
'https://api.steemit.com',
'https://steemd.previx.io',
'https://anyx.io',
'https://rpc.buildteam.io',
'https://rpc.steemviz.com',
'https://api.steem.house',
'https://steemd.pevo.science',
'https://steemd.minnowsupportproject.org',
],
}),
);
}
// Component Functions