Skip to content

signTyped Data is wrong on Trust wallet #623

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

Open
williamchong opened this issue Jul 13, 2018 · 0 comments
Open

signTyped Data is wrong on Trust wallet #623

williamchong opened this issue Jul 13, 2018 · 0 comments
Labels

Comments

@williamchong
Copy link
Member

now we disabled sending p2p in Trust wallet, because it generate different sign of our signTypedData payload vs Metamask

after investigating, 2 problems were found

  1. signing uint256 of 1 000 and 1000 generates different result in Trust , but same is Metamask. Not sure spec favor which behaviour, but a quick fix would be detect Trust and remove spacings

  2. cannot sign { type: 'uint256', name: 'nonce', value: nonce }, correctly, but in fact we put a hex string into this field
    https://github.com/likecoin/likecoin-store/blob/9f2a60a10e45169ef5bd18fd9623e3d851a8d713/util/EthHelper.js#L372
    maybe it should be a random number with dec based toString() instead?

after fixing above problem, we can re-enabled p2p LIKE sending in at least ios Trust wallet

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

No branches or pull requests

1 participant