Skip to content

Commit

Permalink
Merge pull request #1177 from cmgustavo/bug/logout-bitpay-id-02
Browse files Browse the repository at this point in the history
Fix: do not show error after logout BitPay ID and redirect Home
  • Loading branch information
JohnathanWhite committed May 28, 2024
2 parents 5446086 + 9d84110 commit 22594ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/navigation/bitpay-id/BitpayIdGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const BitpayIdGroup: React.FC<BitpayIdProps> = ({BitpayId}) => {
dispatch(ShopEffects.startFetchCatalog());

navigationRef.navigate('Tabs', {
screen: 'Settings',
screen: 'Home',
});
}}>
{t('Log Out')}
Expand Down
6 changes: 4 additions & 2 deletions src/navigation/bitpay-id/screens/ProfileSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ export const ProfileSettingsScreen = ({route}: ProfileProps) => {

useEffect(() => {
dispatch(BitPayIdEffects.startFetchSession());
dispatch(BitPayIdEffects.startFetchSecuritySettings());
dispatch(BitPayIdEffects.startFetchBasicInfo(apiToken));
if (apiToken) {
dispatch(BitPayIdEffects.startFetchSecuritySettings());
dispatch(BitPayIdEffects.startFetchBasicInfo(apiToken));
}
}, [apiToken, dispatch]);

const hasName = user?.givenName || user?.familyName;
Expand Down

0 comments on commit 22594ce

Please sign in to comment.