Closed al-rosenthal closed 1 month ago
I wonder if it's worth consolidating some of the very similar code in the RootStack into this component, so both types of lockout are handled from the same place. @jleach thoughts?
Will also need to add this wrapper to the Bifold example app (so either in RootStack.tsx
or in something like packages/legacy/app/App.tsx
depending on how you implement it)
Will also need to add this wrapper to the Bifold example app (so either in
RootStack.tsx
or in something likepackages/legacy/app/App.tsx
depending on how you implement it)
I've added the wrapper to the App.tsx
@al-rosenthal You can use yarn run lint
in bifold
and yarn run typecheck:core
to cache code quality issues quicker or use husky on push
.
This looks great but you may want to check with Kim / Clecio if an actual settings option (where the user can switch between the different lockout times) was part of the ticket.
A new settings page has been added to configure the timeout
Issues
5 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
1.2% Duplication on New Code
Summary of Changes
Created a new component:
InactivityWrapper.tsx
. This component is intended to wrap the app view to track user interactions (clicks, swipes, ect.). When an interaction is detected a timer internal to the component resets, if no interactions in a set time are made while the app is open, the user is logged out and is sent back to the pin entry screen.Related Issues
bc-wallet-mobile: 2136
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.
Signed-off-by
line (we use the DCO GitHub app to enforce this);If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓
PR template adapted from the Python attrs project.