Skip to content
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 files via upload #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alongoldman
Copy link

I added QR code for the Seed, Key & Address

Copy link
Owner

@numtel numtel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I've requested some changes.

davidshimjs/qrcodejs has a smaller implementation of a QR code generator but it only outputs to an already rendered element so the way the output is rendered on this page would have to change significantly to save 20kb. Probably not worth it...

</script>
</body>
</html>
<html>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you do that caused the diff to be the entire file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why it did that, I just uploaded my modified index.html

<script src="nacl.js"></script>
<script src="blake2b.js"></script>
<script src="functions.js"></script>
<script type="text/javascript" src="qrcode.js"></script>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type attribute is not required here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qraddress.addData(pair.address);
qrseed.make();
qrkey.make();
qraddress.make();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of all this, put a qrcode property on the object list below and then in the map function so you can re-use the same code for each field:

.map(function(item) {
    return '<div><dt>' + item.label + ':</dt></div>' +
      '<div><dd>' +
      ('qrcode' in item ? qrcode(4, 'L').addData(item.qrcode).make().createImgTag() : '') +
      '<span class="dont-break-out">' + item.value + '</span>' +
      '</dd></div>';
  })

Put some CSS to make the image display decently. Maybe even special coloring around the seed/private key qrcodes than the account address qrcode so that people don't get them mixed up.

Also maybe a checkbox on the top of the page 'Generate QR Codes' or 'Generate QR Codes for Private Keys' that is by-default unchecked. Some people may not want their seed/private key easily scannable by somebody standing next to them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must admit that I'm clueless on web design, I just needed QR codes for my paper wallets and somehow I managed to do it without really knowing what I'm doing. I thought it might be useful to other people so I uploaded it but obviously you can do much better.

@@ -0,0 +1,2136 @@
//---------------------------------------------------------------------
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know how this entire file works so that we can be sure that it does not contain any exploits that reveal a user's private keys?

Copy link
Author

@alongoldman alongoldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the reference to the file from bitaddress.org.
Anyway, paper wallets should be generated on an offline computer, other than QR not same as text, no exploit can occur offline.

qraddress.addData(pair.address);
qrseed.make();
qrkey.make();
qraddress.make();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must admit that I'm clueless on web design, I just needed QR codes for my paper wallets and somehow I managed to do it without really knowing what I'm doing. I thought it might be useful to other people so I uploaded it but obviously you can do much better.

</script>
</body>
</html>
<html>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why it did that, I just uploaded my modified index.html

<script src="nacl.js"></script>
<script src="blake2b.js"></script>
<script src="functions.js"></script>
<script type="text/javascript" src="qrcode.js"></script>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@numtel
Copy link
Owner

numtel commented Feb 23, 2018

Ok, adding QR codes is not a huge priority for me but I may integrate this at some point. I'll leave this open so others can see it in the meantime or if you want to add more commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants