Skip to content

Commit

Permalink
♻️ Update UserAccount component add Sign and Verify message links
Browse files Browse the repository at this point in the history
  • Loading branch information
Osvaldo Vega committed Nov 29, 2019
1 parent dc79ec3 commit 529ae6f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 2 additions & 0 deletions i18n/locales/en/common.json
Expand Up @@ -387,6 +387,7 @@
"Sharing link": "Sharing link",
"Show": "Show",
"Show the QR code": "Show the QR code",
"Sign Message": "Sign Message",
"Sign a message": "Sign a message",
"Sign back in": "Sign back in",
"Sign in": "Sign in",
Expand Down Expand Up @@ -465,6 +466,7 @@
"Upvotes": "Upvotes",
"Use the sharing link to easily request any amount of LSK from Lisk users.": "Use the sharing link to easily request any amount of LSK from Lisk users.",
"Use this tool to verify the validity of a signed message. This allows you to ensure that the person who signed the message was in fact the account owner": "Use this tool to verify the validity of a signed message. This allows you to ensure that the person who signed the message was in fact the account owner",
"Verify Message": "Verify Message",
"Verify address": "Verify address",
"Verify message": "Verify message",
"Verify the address in your hardware wallet device.": "Verify the address in your hardware wallet device.",
Expand Down
22 changes: 22 additions & 0 deletions src/components/shared/header/topBar/accountMenu/userAccount.js
Expand Up @@ -135,6 +135,28 @@ class UserAccount extends React.Component {
<span>{t('Settings')}</span>
</Link>

<Link
id="signMessage"
to={routes.signMessage.path}
className={styles.dropdownOption}
onClick={this.toggleDropdown}
>
<Icon name="settings" className={styles.defaultIcon} />
<Icon name="settingsActive" className={styles.activeIcon} />
<span>{t('Sign Message')}</span>
</Link>

<Link
id="verifyMessage"
to={routes.verifyMMessage.path}
className={styles.dropdownOption}
onClick={this.toggleDropdown}
>
<Icon name="settings" className={styles.defaultIcon} />
<Icon name="settingsActive" className={styles.activeIcon} />
<span>{t('Verify Message')}</span>
</Link>

<Dropdown.Separator className={styles.separator} />

{
Expand Down
Expand Up @@ -42,7 +42,7 @@ describe('UserAccount', () => {
wrapper = mount(<UserAccount {...myProps} />);
expect(wrapper).toContainExactlyOneMatchingElement('Dropdown');
expect(wrapper).toContainExactlyOneMatchingElement('span.dropdownOption');
expect(wrapper).toContainMatchingElements(3, 'a.dropdownOption');
expect(wrapper).toContainMatchingElements(5, 'a.dropdownOption');
});

it('called properly onLogout when user click it', () => {
Expand Down

0 comments on commit 529ae6f

Please sign in to comment.