gochain / wallet

GoChain Wallet
https://wallet.gochain.io
5 stars 5 forks source link

Append requisite 0x on private key entry from MEW format #7

Closed cryptolarity closed 6 years ago

cryptolarity commented 6 years ago

When generating an ETH private key from MEW it omits the '0x' and results in generating a different public address when inputting into the 'Send tx' portion of the GO wallet.

jmank88 commented 6 years ago

This is likely as simple as checking for the 0x prefix before trimming the first two chars. These screenshots demonstrate that replacing the first chars yields the same account, so it seems like those first two chars are being trimmed no matter what they are. screenshot from 2018-05-30 10-10-54 screenshot from 2018-05-30 10-11-01 We should probably validate the length of the key too (are they fixed?), and the characters themselves. It accepts all sorts of random stuff, like just 0x12 for example: screenshot from 2018-05-30 10-14-06 Or random non-hex chars: screenshot from 2018-05-30 10-15-48

ralyodio commented 6 years ago

What needs to be done on the UI here? Do I just search for 0x and remove it? or do I add it if its not there?

treeder commented 6 years ago

We want to make sure:

treeder commented 6 years ago

Where is this one at?

ralyodio commented 6 years ago

I haven't started on this one yet.

ralyodio commented 6 years ago

I'm looking into this one now.