Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Show private/view keys as QR Codes
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Apr 9, 2021
1 parent fa3953d commit ada6d78
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/components/Receive.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ const AddressBlock = ({
<div>
<div className={[cstyles.sublight].join(' ')}>Private Key</div>
<div
className={[cstyles.breakword, cstyles.padtopsmall, cstyles.fixedfont].join(' ')}
className={[cstyles.breakword, cstyles.padtopsmall, cstyles.fixedfont, cstyles.flex].join(' ')}
style={{ maxWidth: '600px' }}
>
{privateKey}
<QRCode value={privateKey} className={[styles.receiveQrcode].join(' ')} />
<div>{privateKey}</div>
</div>
</div>
)}
Expand All @@ -89,10 +90,11 @@ const AddressBlock = ({
<div>
<div className={[cstyles.sublight].join(' ')}>Viewing Key</div>
<div
className={[cstyles.breakword, cstyles.padtopsmall, cstyles.fixedfont].join(' ')}
className={[cstyles.breakword, cstyles.padtopsmall, cstyles.fixedfont, cstyles.flex].join(' ')}
style={{ maxWidth: '600px' }}
>
{viewKey}
<QRCode value={viewKey} className={[styles.receiveQrcode].join(' ')} />
<div>{viewKey}</div>
</div>
</div>
)}
Expand Down
1 change: 1 addition & 0 deletions app/components/Receive.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
.receiveQrcode {
padding: 8px;
background-color: white;
margin-right: 5px;
}
1 change: 1 addition & 0 deletions app/utils/uris.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ test('Plain URI', () => {
expect(targets[0].memoString).toBeUndefined();
expect(targets[0].memoBase64).toBeUndefined();
});

test('bad uris', () => {
// bad protocol
let error = parseZcashURI('badprotocol:tmEZhbWHTpdKMw5it8YDspUXSMGQyFwovpU?amount=123.456');
Expand Down

0 comments on commit ada6d78

Please sign in to comment.