From 3dfc1a9a10d8ed8c722b3fad9aacdd4376243c8c Mon Sep 17 00:00:00 2001 From: u-e Date: Thu, 10 Jan 2019 22:28:02 +0300 Subject: [PATCH] fixed wallet claim reward removed finally state --- src/components/wallet/container/walletContainer.js | 6 ++---- src/screens/drafts/container/draftsContainer.js | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/wallet/container/walletContainer.js b/src/components/wallet/container/walletContainer.js index 9a337d267..05b155362 100644 --- a/src/components/wallet/container/walletContainer.js +++ b/src/components/wallet/container/walletContainer.js @@ -83,11 +83,10 @@ class WalletContainer extends Component { }) .then((account) => { this._getWalletData(account && account[0]); + this.setState({ claiming: false }); }) .catch((err) => { Alert.alert(err); - }) - .finally(() => { this.setState({ claiming: false }); }); }; @@ -99,11 +98,10 @@ class WalletContainer extends Component { getAccount(selectedUser.name) .then((account) => { this._getWalletData(account && account[0]); + this.setState({ isRefreshing: false }); }) .catch((err) => { Alert.alert(err); - }) - .finally(() => { this.setState({ isRefreshing: false }); }); }; diff --git a/src/screens/drafts/container/draftsContainer.js b/src/screens/drafts/container/draftsContainer.js index 69a766f74..1d0670fb5 100644 --- a/src/screens/drafts/container/draftsContainer.js +++ b/src/screens/drafts/container/draftsContainer.js @@ -45,12 +45,10 @@ class DraftsContainer extends Component { getSchedules(currentAccount.name) .then((data) => { - this.setState({ schedules: this._sortData(data) }); + this.setState({ schedules: this._sortData(data), isLoading: false }); }) .catch(() => { Alert.alert(intl.formatMessage({ id: 'drafts.load_error' })); - }) - .finally(() => { this.setState({ isLoading: false }); }); };