hancled if the date not arrive to application

This commit is contained in:
ue 2019-08-27 00:27:56 +03:00
parent 0ca17779e0
commit a8d5567b4f
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