mirror of
https://github.com/selfxyz/self.git
synced 2026-01-08 22:28:11 -05:00
chore: fix earn points redirect; restore account feedback (#1400)
* redirect to country picker * fix button restoring state * fix earn points flow and account recovery feedback * redirect to the country picker * fix test * clean up
This commit is contained in:
@@ -49,7 +49,7 @@ export const useEarnPointsFlow = ({
|
|||||||
onButtonPress: () => {
|
onButtonPress: () => {
|
||||||
// Use setTimeout to ensure modal dismisses before navigating
|
// Use setTimeout to ensure modal dismisses before navigating
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
navigation.navigate('DocumentOnboarding');
|
navigation.navigate('CountryPicker');
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
onModalDismiss: () => {
|
onModalDismiss: () => {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ describe('useEarnPointsFlow', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should navigate to DocumentOnboarding when identity verification modal button is pressed', async () => {
|
it('should navigate to CountryPicker when identity verification modal button is pressed', async () => {
|
||||||
mockHasUserAnIdentityDocumentRegistered.mockResolvedValue(false);
|
mockHasUserAnIdentityDocumentRegistered.mockResolvedValue(false);
|
||||||
|
|
||||||
const { result } = renderHook(() =>
|
const { result } = renderHook(() =>
|
||||||
@@ -162,7 +162,7 @@ describe('useEarnPointsFlow', () => {
|
|||||||
jest.advanceTimersByTime(100);
|
jest.advanceTimersByTime(100);
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(mockNavigate).toHaveBeenCalledWith('DocumentOnboarding');
|
expect(mockNavigate).toHaveBeenCalledWith('CountryPicker');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should clear referrer when identity verification modal is dismissed with referrer', async () => {
|
it('should clear referrer when identity verification modal is dismissed with referrer', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user