From 717a011e2267c739f8f3ea5660d654dcaad85de3 Mon Sep 17 00:00:00 2001
From: ue <ugurerdal93@gmail.com>
Date: Tue, 27 Aug 2019 00:27:56 +0300
Subject: [PATCH] hancled if the date not arrive to application

---
 src/providers/esteem/esteem.js                 | 18 +++++++++++++++++-
 .../settings/container/settingsContainer.js    | 16 +++++++++++++++-
 2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/src/providers/esteem/esteem.js b/src/providers/esteem/esteem.js
index 1dcf3e649..e8e049903 100644
--- a/src/providers/esteem/esteem.js
+++ b/src/providers/esteem/esteem.js
@@ -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 => {
diff --git a/src/screens/settings/container/settingsContainer.js b/src/screens/settings/container/settingsContainer.js
index 40194add1..9a187b9fc 100644
--- a/src/screens/settings/container/settingsContainer.js
+++ b/src/screens/settings/container/settingsContainer.js
@@ -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