INJIWEB-1683, Count down timer showing the remaining time for the temporary lock to be completed should be displayed.#513
Conversation
Signed-off-by: sanehema9 <sanehema9@gmail.com>
WalkthroughAdds a localized "Locked. Try again in" message in seven locales and implements a 1-hour temporary lockout countdown in the PasscodePage UI with state, timer, and display styling. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@inji-web/src/locales/hi.json`:
- Line 103: The value for the "lockedTryAgainIn" key in the Hindi locale is
currently French; update the string for the "lockedTryAgainIn" entry in hi.json
to a natural Hindi phrase placed before the appended time value (for example:
"लॉक किया गया। कृपया {time} बाद पुनः प्रयास करें" — validate/adjust with your
localization team), ensuring you only change the value for the
"lockedTryAgainIn" key and keep the placeholder/format used for the time intact.
In `@inji-web/src/pages/User/Passcode/PasscodePage.tsx`:
- Around line 71-77: The countdown effect currently recreates the interval on
every remainingTime change and never re-enables canUnlockWallet when the timer
reaches 0; update the useEffect (the effect that declares timer: NodeJS.Timeout
and calls setRemainingTime) so the interval is created once (use [] or
appropriate refs) and inside the interval callback use the functional updater
for setRemainingTime to compute next = prev>0?prev-1:0 and when next === 0 call
setCanUnlockWallet(true) and clearInterval(timer); ensure the effect cleanup
still clears the timer to avoid leaks.
Signed-off-by: sanehema9 <sanehema9@gmail.com>
|
| setCanUnlockWallet(false); | ||
| setPasscode(initialPasscodeArray); | ||
| setConfirmPasscode(initialPasscodeArray); | ||
| setRemainingTime(60*60); // 60 minutes in seconds |
There was a problem hiding this comment.
The countdown time has been hardcoded, would not recommend this change



Description
This PR resolves the issue where the countdown message displayed during a temporary wallet lock.
Changes made
Passcodepage.tsx , PasscodepageStyles.tsx ,and language files
Issue ticket number and Link
INJIWEB-1683(https://mosip.atlassian.net/browse/INJIWEB-1683)
Video
INJIWEB-1683.mp4
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.