mirror of
https://github.com/selfxyz/self.git
synced 2026-01-07 22:04:03 -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: () => {
|
||||
// Use setTimeout to ensure modal dismisses before navigating
|
||||
setTimeout(() => {
|
||||
navigation.navigate('DocumentOnboarding');
|
||||
navigation.navigate('CountryPicker');
|
||||
}, 100);
|
||||
},
|
||||
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);
|
||||
|
||||
const { result } = renderHook(() =>
|
||||
@@ -162,7 +162,7 @@ describe('useEarnPointsFlow', () => {
|
||||
jest.advanceTimersByTime(100);
|
||||
});
|
||||
|
||||
expect(mockNavigate).toHaveBeenCalledWith('DocumentOnboarding');
|
||||
expect(mockNavigate).toHaveBeenCalledWith('CountryPicker');
|
||||
});
|
||||
|
||||
it('should clear referrer when identity verification modal is dismissed with referrer', async () => {
|
||||
|
||||
Reference in New Issue
Block a user