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
Add LockID feature - Closes #496 #523
Conversation
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.
I think 'Lock ID' button should change to 'logout' because it actually covers logout functionality.
There will be a dedicated "Logout" button done in a separate issue: #540 |
src/constants/account.js
Outdated
@@ -1,4 +1,10 @@ | |||
const account = { | |||
lockDuration: 600000, // lock duration time is 10 minutes in milliSecond | |||
genesis: { |
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.
Please use /test/constants/accounts.js
for this kind of purpose
e.stopPropagation(); | ||
|
||
const { savedAccounts } = this.props; | ||
const savedActiveAccount = savedAccounts.find(acc => `${acc.network} ${acc.network}` === `${account.network} ${account.network}`); |
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.
This doesn't look right. What if there are two accounts on the same network?
There should be some tests with multiple unlocked accounts that catch it.
step('Given I\'m on "account switcher" with accounts: "genesis,delegate,empty account"', setupStep); | ||
step('Then I should see 3 instances of "saved account card"', () => helper.shouldSeeCountInstancesOf(1, 'strong.unlocked')); | ||
step('When I click "Lock ID"', () => helper.clickOnElement('strong.unlocked')); | ||
step('Then I should see 2 instances of "saved account card"', () => helper.shouldSeeCountInstancesOf(0, 'strong.unlocked')); |
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.
"Lock ID" should not remove the account, so there should still be 3 instances. I don't see how this test can pass.
test/constants/networks.js
Outdated
}, | ||
}; | ||
|
||
module.exports = networks; |
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.
This file should be removed as a duplicate of src/constants/networks.js
<FontIcon value='unlocked' /> | ||
{t('Unlocked')} | ||
{t('Lock ID')} |
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.
There is one new requirement. When clicked, "Lock ID" should change to "Your ID is now secured!" and disappear only after ~3 seconds.
&:hover { | ||
& span { | ||
transform: scale(1.1); | ||
transform-origin: 100%; |
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.
The hover effect would be smoother with transition: transform ease-in-out 500ms;
e8a2ca5
to
f326c98
Compare
eee0f2f
to
654c378
Compare
654c378
to
b41d11e
Compare
What was the problem?
Lack of LockID feature
How did I fix it?
Added LockID feature
How to test it?
Login to your account, go to switch accounts and click on
Lock ID
Review checklist