diff --git a/src/containers/pointsContainer.js b/src/containers/pointsContainer.js index 4f0cc3978..912da20a4 100644 --- a/src/containers/pointsContainer.js +++ b/src/containers/pointsContainer.js @@ -151,7 +151,7 @@ class PointsContainer extends Component { } }) .catch(err => { - Alert.alert(err); + Alert.alert(err.message || err.toString()); }); this.setState({ @@ -167,7 +167,7 @@ class PointsContainer extends Component { return balance; }) .catch(err => { - Alert.alert(err); + Alert.alert(err.message || err.toString()); }); }; diff --git a/src/containers/transferContainer.js b/src/containers/transferContainer.js index c5a23b490..7d995b94a 100644 --- a/src/containers/transferContainer.js +++ b/src/containers/transferContainer.js @@ -167,7 +167,7 @@ class TransferContainer extends Component { }; setWithdrawVestingRoute(currentAccount, pinCode, data).catch(err => { - alert(err); + alert(err.message || err.toString()); }); }; diff --git a/src/screens/application/container/applicationContainer.js b/src/screens/application/container/applicationContainer.js index caa96a25d..27a95f753 100644 --- a/src/screens/application/container/applicationContainer.js +++ b/src/screens/application/container/applicationContainer.js @@ -514,7 +514,6 @@ class ApplicationContainer extends Component { this._connectNotificationServer(accountData.name); }) .catch(err => { - this._handleAlert(); Alert.alert( `${intl.formatMessage({ id: 'alert.fetch_error' })} \n${err.message.substr(0, 20)}`, ); diff --git a/src/screens/boostPost/screen/boostPostScreen.js b/src/screens/boostPost/screen/boostPostScreen.js index f3bf7f1e6..2860198d4 100644 --- a/src/screens/boostPost/screen/boostPostScreen.js +++ b/src/screens/boostPost/screen/boostPostScreen.js @@ -104,7 +104,7 @@ class BoostPostScreen extends PureComponent { this.setState({ balance }); }) .catch(err => { - Alert.alert(err); + Alert.alert(err.message || err.toString()); }); }; diff --git a/src/screens/editor/container/editorContainer.js b/src/screens/editor/container/editorContainer.js index 7804a4f17..4a61e5a1c 100644 --- a/src/screens/editor/container/editorContainer.js +++ b/src/screens/editor/container/editorContainer.js @@ -207,7 +207,7 @@ class EditorContainer extends Component { intl.formatMessage({ id: 'alert.fail', }), - error, + error.message || error.toString(), ); this.setState({ isUploading: false }); }); diff --git a/src/screens/profile/container/profileContainer.js b/src/screens/profile/container/profileContainer.js index c8b6caa60..79e6c4e5c 100644 --- a/src/screens/profile/container/profileContainer.js +++ b/src/screens/profile/container/profileContainer.js @@ -202,7 +202,7 @@ class ProfileContainer extends Component { { error, }, - () => alert(error), + () => alert(error.message || error.toString()), ); } else { this._fetchProfile(username, true); diff --git a/src/screens/promote/screen/promoteScreen.js b/src/screens/promote/screen/promoteScreen.js index 574e93098..de751da4a 100644 --- a/src/screens/promote/screen/promoteScreen.js +++ b/src/screens/promote/screen/promoteScreen.js @@ -104,7 +104,7 @@ class PointsScreen extends PureComponent { this.setState({ balance }); }) .catch(err => { - Alert.alert(err); + Alert.alert(err.message || err.toString()); }); }; diff --git a/src/screens/transfer/screen/powerDownScreen.js b/src/screens/transfer/screen/powerDownScreen.js index ad6fb60f0..38ee3e3af 100644 --- a/src/screens/transfer/screen/powerDownScreen.js +++ b/src/screens/transfer/screen/powerDownScreen.js @@ -69,7 +69,7 @@ class PowerDownView extends Component { return res; }) .catch(e => { - alert(e); + alert(e.message || e.toString()); }); };