New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding periodic reminder modal for backing up recovery phrase #11021
Conversation
34a6225
to
41bf2da
Compare
41bf2da
to
1ee7b23
Compare
Builds ready [1ee7b23]
Page Load Metrics (582 ± 40 ms)
|
1ee7b23
to
aec9e88
Compare
cd0bb14
to
4d7e18e
Compare
@@ -17,6 +17,7 @@ const Popover = ({ | |||
showArrow, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the designs, there is no 'X' button (closure happens upon clicking "Got it!" at the bottom of the popup), and the title is centered.
d2f98f1
to
64ae808
Compare
Builds ready [64ae808]
Page Load Metrics (555 ± 43 ms)
|
@@ -0,0 +1,5 @@ | |||
export const MILLISECOND = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After merge I'll put up a change to use these across the codebase where applicable
app/scripts/controllers/app-state.js
Outdated
} | ||
|
||
// Capture the current timestamp | ||
const currentTime = new Date().getTime(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we could move this var declaration above if (recoveryPhraseReminderLastShown === 0) {
and then use it on line 181.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, i can update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
64ae808
to
2962484
Compare
Builds ready [2962484]
Page Load Metrics (578 ± 37 ms)
|
2962484
to
603e651
Compare
There might be a way that this can be simplified so that fewer background code additions are needed and no migration is required. What I'm thinking is:
With this, I think we can greatly reduce the amount of background code added with this PR, and remove the need for a migration. Let me know what you think. |
603e651
to
91c5de6
Compare
c4d1ca9
to
2f73ba8
Compare
Builds ready [2f73ba8]
Page Load Metrics (578 ± 30 ms)
|
2f73ba8
to
664acf8
Compare
Builds ready [664acf8]
Page Load Metrics (723 ± 60 ms)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My major suggestion involved the refactor to simplify controller logic. Those changes look good and this PR looks good overall to me. Nice work!
* Adding recurring recovery phrase reminder modal * Refactoring per PR feedback
The goal is to display this reminder two days after wallet creation/import (or in the case of an update, two days from that point). After the user dismisses the reminder, it will subsequently appear every 90 days.
Manual Test Plan
app/scripts/controllers/app-state.js
, setREMINDER_CHECK_INTERVAL
to equaltime.SECOND * 30
(30 seconds),INITIAL_REMINDER_FREQUENCY
to equaltime.MINUTE * 2
(2 minutes), andFOLLOWUP_REMINDER_FREQUENCY
to equaltime.MINUTE * 4
(4 minutes)Appearance
(User has not backed up their seed phrase)
(User has backed up their seed phrase)