Git Product home page Git Product logo

Comments (4)

MareoRaft avatar MareoRaft commented on May 17, 2024

It seems in my case the key was already Hex-encoded 32-byte, and simply ommitted the "0x" characters at the beginning. In that case, it could be helpful to the user to automatically prepend the "0x" under the condition that it's 64 characters long and only uses characters 0-9 a-f. But this could be dangerous if there is a possibility that a key is not hex-encoded and just so happens to be in the right format to look like it is. I don't know much about etherium private keys, so I don't know if this "dangerous" scenario would happen or not.

from send-tokens.

MareoRaft avatar MareoRaft commented on May 17, 2024

So this leads to the question of whether we need to worry about non-32-byte keys. Do etherium private keys that are, for example, 64 bytes instead of 32 bytes exist?

from send-tokens.

merklejerk avatar merklejerk commented on May 17, 2024

Yeah, it's usually not a good idea to be too permissive in crypto as you really want the user to be very conscious of what they're doing.

If I may make a suggestion, and if you haven't done so already, you might consider displaying an "ethereum blockie" image for address fields as a visual check.

Private keys are always 32 bytes. Anything more or less shouldn't work.

from send-tokens.

MareoRaft avatar MareoRaft commented on May 17, 2024

Okay, that makes sense. Yes, I'll try to add in blockies. I'll try out

https://github.com/ethereum/blockies

unless you have one to recommend

from send-tokens.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.