status-im / ens-usernames

DApp to register usernames for Status Network
MIT License
19 stars 11 forks source link

Fix edit code flow for certain Whisper IDs #79

Open rachelhamlin opened 5 years ago

rachelhamlin commented 5 years ago

It appears that an issue on status-go side is making it impossible for certain users to edit their contact code.

Contact codes are possibly being incorrectly generated.

bgits commented 5 years ago

I think this contract code is not properly generated: 0x04beb846a66a820bf7c2ecee595ce9cf7850ac3449029639e93462815c7391868402e0998c5e3bd6cf35769d74a06400811c100404ae70ee3e2ca796b7949fd4de - when trying to extract the x,y coordinates the y coordinate is shorter than the x. As a result this address will not be able to register their contact code.

It's also possible we are not properly extracting the XY coordinates on the client side, but would need to confirm this with someone. Not sure who is involved with the contact code generation process in the Status client.

function for extracting X,Y points from pubKey here: https://github.com/status-im/ens-usernames/blob/invalid-names-handling/app/utils/ecdsa.js#L5