[native] Refocus ConnectEthereum if registration fails due to expired nonce
Summary:
Prior to this diff stack, when registration fails due to an expired nonce we would dismiss the entire RegistrationNavigator.
This diff addresses ENG-4087 by making sure we refocus the ConnectEthereum screen when we get an expired nonce error.
I had to introduce RegistrationRouter here so that we could intelligently refocus ConnectEthereum, even if it's missing from the navigation stack.
Depends on D12018
Test Plan:
I tested this diff as follows:
- Be in a multi-keyserver environment, testing SIWE with iOS simulator
- Do a SIWE and then wait 2 minutes to let the nonce expire in the following screens:
- FullscreenSIWEPanel for an account that doesn't exist yet when the new registration flow is disabled
- FullscreenSIWEPanel for an account that doesn't exist yet when the new registration flow is enabled
- FullscreenSIWEPanel for an account that does exist
- New registration flow for an account that doesn't exist yet (RegistrationTerms)
- New registration flow for an account that does exist (ExistingEthereumAccount)
- Make sure there are no duplicate Alerts, that in all cases an Alert is shown, and that the "back" action activates when the user confirms the Alert
Reviewers: inka
Reviewed By: inka
Subscribers: tomek, varun
Differential Revision: https://phab.comm.dev/D12019