diff --git a/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.debug.xcconfig b/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.debug.xcconfig index 0695013b2..d39c7d90b 100644 --- a/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.debug.xcconfig +++ b/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.debug.xcconfig @@ -9,3 +9,4 @@ PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage diff --git a/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.release.xcconfig b/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.release.xcconfig index 0695013b2..d39c7d90b 100644 --- a/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.release.xcconfig +++ b/ios/Pods/Target Support Files/Pods-esteem/Pods-esteem.release.xcconfig @@ -9,3 +9,4 @@ PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage diff --git a/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.debug.xcconfig b/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.debug.xcconfig index 1a1659871..e629a3239 100644 --- a/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.debug.xcconfig +++ b/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.debug.xcconfig @@ -8,3 +8,4 @@ PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage diff --git a/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.release.xcconfig b/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.release.xcconfig index 1a1659871..e629a3239 100644 --- a/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.release.xcconfig +++ b/ios/Pods/Target Support Files/Pods-esteemTests/Pods-esteemTests.release.xcconfig @@ -8,3 +8,4 @@ PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +USER_HEADER_SEARCH_PATHS = $(inherited) $(SRCROOT)/FLAnimatedImage/FLAnimatedImage diff --git a/src/components/wallet/container/walletContainer.js b/src/components/wallet/container/walletContainer.js index b9167bcda..9d0a90f60 100644 --- a/src/components/wallet/container/walletContainer.js +++ b/src/components/wallet/container/walletContainer.js @@ -139,7 +139,7 @@ class WalletContainer extends Component { render() { const { - currentAccount, selectedUser, isDarkTheme, setPinCodeState, + currentAccount, selectedUser, isDarkTheme, } = this.props; const { walletData, isClaiming, isRefreshing } = this.state; @@ -153,7 +153,6 @@ class WalletContainer extends Component { handleOnWalletRefresh={this._handleOnWalletRefresh} isRefreshing={isRefreshing} isDarkTheme={isDarkTheme} - setPinCodeState={setPinCodeState} /> ); } diff --git a/src/components/wallet/view/walletView.js b/src/components/wallet/view/walletView.js index 9f96b5b06..0cd8f0264 100644 --- a/src/components/wallet/view/walletView.js +++ b/src/components/wallet/view/walletView.js @@ -55,7 +55,6 @@ class WalletView extends PureComponent { selectedUsername, walletData, isDarkTheme, - setPinCodeState, } = this.props; return ( @@ -117,7 +116,6 @@ class WalletView extends PureComponent { diff --git a/src/components/walletDetails/container/walletDetailsContainer.js b/src/components/walletDetails/container/walletDetailsContainer.js index a311f121c..281e94742 100644 --- a/src/components/walletDetails/container/walletDetailsContainer.js +++ b/src/components/walletDetails/container/walletDetailsContainer.js @@ -27,7 +27,7 @@ class WalletContainer extends PureComponent { // Component Functions _navigate = async (transferType, fundType) => { - const { dispatch, setPinCodeState, walletData } = this.props; + const { dispatch, walletData } = this.props; let balance; switch (fundType) { @@ -41,11 +41,10 @@ class WalletContainer extends PureComponent { break; } - await setPinCodeState({ + dispatch(openPinCodeModal({ navigateTo: ROUTES.SCREENS.TRANSFER, navigateParams: { transferType, fundType, balance }, - }); - dispatch(openPinCodeModal()); + })); }; render() { diff --git a/src/redux/actions/applicationActions.js b/src/redux/actions/applicationActions.js index a97d51b94..694fb637e 100644 --- a/src/redux/actions/applicationActions.js +++ b/src/redux/actions/applicationActions.js @@ -43,7 +43,8 @@ export const isLoginDone = () => ({ type: IS_LOGIN_DONE, }); -export const openPinCodeModal = () => ({ +export const openPinCodeModal = payload => ({ + payload, type: OPEN_PIN_CODE_MODAL, }); diff --git a/src/redux/reducers/applicationReducer.js b/src/redux/reducers/applicationReducer.js index ea9b407a7..0cfe601d1 100644 --- a/src/redux/reducers/applicationReducer.js +++ b/src/redux/reducers/applicationReducer.js @@ -40,6 +40,7 @@ const initialState = { isLogingOut: false, isNotificationOpen: true, isPinCodeReqiure: false, + pinCodeNavigation: {}, language: 'en-US', loading: false, // It is lock to all screen and shows loading animation. notificationDetails: { @@ -85,6 +86,7 @@ export default function (state = initialState, action) { return { ...state, isPinCodeReqiure: true, + pinCodeNavigation: action.payload || {}, }; case CLOSE_PIN_CODE_MODAL: return { diff --git a/src/screens/drafts/container/draftsContainer.js b/src/screens/drafts/container/draftsContainer.js index fd396d85c..2f52257c2 100644 --- a/src/screens/drafts/container/draftsContainer.js +++ b/src/screens/drafts/container/draftsContainer.js @@ -93,7 +93,6 @@ class DraftsContainer extends Component { .then((res) => { const { schedules } = this.state; const newSchedules = [...schedules].filter(schedule => schedule._id !== id); - console.log(res); this.setState({ schedules: this._sortData(newSchedules, true) }); }) diff --git a/src/screens/login/container/loginContainer.js b/src/screens/login/container/loginContainer.js index d3a6745be..dc71cad9d 100644 --- a/src/screens/login/container/loginContainer.js +++ b/src/screens/login/container/loginContainer.js @@ -47,7 +47,7 @@ class LoginContainer extends PureComponent { // Component Functions _handleOnPressLogin = (username, password) => { - const { dispatch, setPinCodeState, intl } = this.props; + const { dispatch, intl } = this.props; this.setState({ isLoading: true }); @@ -56,8 +56,7 @@ class LoginContainer extends PureComponent { if (result) { dispatch(updateCurrentAccount({ ...result })); dispatch(addOtherAccount({ username: result.name })); - dispatch(openPinCodeModal()); - setPinCodeState({ navigateTo: ROUTES.DRAWER.MAIN }); + dispatch(openPinCodeModal({ navigateTo: ROUTES.DRAWER.MAIN })); dispatch(loginAction(true)); userActivity(result.name, 20); this._setPushToken(result.name); @@ -119,7 +118,7 @@ class LoginContainer extends PureComponent { render() { const { isLoading } = this.state; - const { navigation, setPinCodeState } = this.props; + const { navigation } = this.props; return ( ); } diff --git a/src/screens/login/screen/loginScreen.js b/src/screens/login/screen/loginScreen.js index 425c46d5e..9ba374111 100644 --- a/src/screens/login/screen/loginScreen.js +++ b/src/screens/login/screen/loginScreen.js @@ -63,7 +63,6 @@ class LoginScreen extends PureComponent { const { navigation, intl, - setPinCodeState, handleOnPressLogin, handleSignUp, isLoading, @@ -199,7 +198,6 @@ class LoginScreen extends PureComponent { > diff --git a/src/screens/pinCode/container/pinCodeContainer.js b/src/screens/pinCode/container/pinCodeContainer.js index bcd96ca58..17149599f 100644 --- a/src/screens/pinCode/container/pinCodeContainer.js +++ b/src/screens/pinCode/container/pinCodeContainer.js @@ -80,7 +80,7 @@ class PinCodeContainer extends Component { _resetPinCode = pin => new Promise((resolve, reject) => { const { - currentAccount, dispatch, accessToken, navigateTo, navigateParams, navigation, intl, + currentAccount, dispatch, pinCodeParams: { navigateTo, navigateParams, accessToken }, navigation, intl, } = this.props; const { isOldPinVerified, oldPinCode } = this.state; @@ -135,7 +135,7 @@ class PinCodeContainer extends Component { _setFirstPinCode = pin => new Promise((resolve) => { const { - currentAccount, dispatch, accessToken, navigateTo, navigateParams, navigation, + currentAccount, dispatch, pinCodeParams: { navigateTo, navigateParams, accessToken }, navigation, } = this.props; const pinData = { @@ -165,7 +165,7 @@ class PinCodeContainer extends Component { _verifyPinCode = pin => new Promise((resolve, reject) => { const { - currentAccount, dispatch, accessToken, navigateTo, navigateParams, navigation, intl, + currentAccount, dispatch, pinCodeParams: { navigateTo, navigateParams, accessToken }, navigation, intl, } = this.props; // If the user is exist, we are just checking to pin and navigating to home screen @@ -184,7 +184,6 @@ class PinCodeContainer extends Component { [_currentAccount.local] = realmData; dispatch(updateCurrentAccount({ ..._currentAccount })); dispatch(closePinCodeModal()); - console.log('navigateParams :', navigateParams); if (navigateTo) { navigation.navigate(navigateTo, navigateParams); } @@ -311,7 +310,7 @@ class PinCodeContainer extends Component { }; render() { - const { currentAccount, intl, isReset } = this.props; + const { currentAccount, intl, pinCodeParams: { isReset } } = this.props; const { informationText, isExistUser } = this.state; return ( @@ -332,6 +331,7 @@ const mapStateToProps = state => ({ currentAccount: state.account.currentAccount, applicationPinCode: state.account.pin, otherAccounts: state.account.otherAccounts, + pinCodeParams: state.application.pinCodeNavigation, }); export default injectIntl(connect(mapStateToProps)(PinCodeContainer)); diff --git a/src/screens/profile/container/profileContainer.js b/src/screens/profile/container/profileContainer.js index 36276adce..0d4f572dd 100644 --- a/src/screens/profile/container/profileContainer.js +++ b/src/screens/profile/container/profileContainer.js @@ -352,7 +352,7 @@ class ProfileContainer extends Component { username, } = this.state; const { - isDarkTheme, isLoggedIn, currency, navigation, setPinCodeState, + isDarkTheme, isLoggedIn, currency, navigation, } = this.props; const activePage = (navigation.state.params && navigation.state.params.activePage) || 0; @@ -382,7 +382,6 @@ class ProfileContainer extends Component { selectedQuickProfile={selectedQuickProfile} selectedUser={user} username={username} - setPinCodeState={setPinCodeState} /> ); } diff --git a/src/screens/profile/screen/profileScreen.js b/src/screens/profile/screen/profileScreen.js index 2f4cd63bf..19b065418 100644 --- a/src/screens/profile/screen/profileScreen.js +++ b/src/screens/profile/screen/profileScreen.js @@ -84,7 +84,6 @@ class ProfileScreen extends PureComponent { selectedUser, username, activePage, - setPinCodeState, } = this.props; const { @@ -250,7 +249,6 @@ class ProfileScreen extends PureComponent { ) : ( diff --git a/src/screens/root/container/rootContainer.js b/src/screens/root/container/rootContainer.js index 6ba1a1165..2a516e54e 100644 --- a/src/screens/root/container/rootContainer.js +++ b/src/screens/root/container/rootContainer.js @@ -24,7 +24,6 @@ const RootContainer = () => (WrappedComponent) => { constructor(props) { super(props); this.state = { - pinCodeStates: null, wrappedComponentStates: null, appState: AppState.currentState, }; @@ -157,10 +156,6 @@ const RootContainer = () => (WrappedComponent) => { }, 1 * 60 * 1000); }; - _setPinCodeState = async (data) => { - return this.setState({ pinCodeStates: { ...data } }); - }; - _setWrappedComponentState = (data) => { this.setState({ wrappedComponentStates: { ...data } }); }; @@ -203,7 +198,7 @@ const RootContainer = () => (WrappedComponent) => { render() { const { isPinCodeReqiure, navigation } = this.props; - const { pinCodeStates, wrappedComponentStates } = this.state; + const { wrappedComponentStates } = this.state; return ( @@ -214,7 +209,6 @@ const RootContainer = () => (WrappedComponent) => { backButtonClose={false} > @@ -222,7 +216,6 @@ const RootContainer = () => (WrappedComponent) => { {Platform.OS === 'android' && } diff --git a/src/screens/settings/container/settingsContainer.js b/src/screens/settings/container/settingsContainer.js index d5ec992d4..438407f5b 100644 --- a/src/screens/settings/container/settingsContainer.js +++ b/src/screens/settings/container/settingsContainer.js @@ -205,11 +205,10 @@ class SettingsContainer extends Component { }; _handleButtonPress = (actionType) => { - const { dispatch, setPinCodeState } = this.props; + const { dispatch } = this.props; switch (actionType) { case 'pincode': - setPinCodeState({ isReset: true }); - dispatch(openPinCodeModal()); + dispatch(openPinCodeModal({ isReset: true })); break; case 'feedback': diff --git a/src/screens/steem-connect/steemConnect.js b/src/screens/steem-connect/steemConnect.js index 079e62b3e..ecc1da885 100644 --- a/src/screens/steem-connect/steemConnect.js +++ b/src/screens/steem-connect/steemConnect.js @@ -24,7 +24,7 @@ class SteemConnect extends PureComponent { _onNavigationStateChange = (event) => { let code; const { - dispatch, setPinCodeState, handleOnModalClose, intl, + dispatch, handleOnModalClose, intl, } = this.props; const { isLoading } = this.state; if (event.url.indexOf('?code=') > -1) { @@ -44,9 +44,7 @@ class SteemConnect extends PureComponent { dispatch(updateCurrentAccount({ ...result })); dispatch(addOtherAccount({ username: result.name })); dispatch(loginAction(true)); - dispatch(openPinCodeModal()); - // TODO: return accesstoken - setPinCodeState({ accessToken: result.accessToken, navigateTo: ROUTES.DRAWER.MAIN }); + dispatch(openPinCodeModal({ accessToken: result.accessToken, navigateTo: ROUTES.DRAWER.MAIN })); } else { // TODO: Error alert (Toast Message) }