omg-js icon indicating copy to clipboard operation
omg-js copied to clipboard

Add metamask compliance tests

Open pnowosie opened this issue 4 years ago • 1 comments

We agreed on slack that testing metamask compliance regarding structural hash will be more maintainable in this repo than in omisego/elixir-omg.

Here is original message:


In elixir-omg we have metamask :fox_face: structural hash compliance test https://github.com/omisego/elixir-omg/blob/4d0e8b4c60efb2072dab1c8179c1644679a243f4/apps/omg/test/omg/typed_data_hash_test.exs#L178 which are just hard-coded hashes we've generated once playing with browser extension

I'm thinking of moving the test to omg-js because :fox_face: 's eth-sig-util looks promising https://github.com/MetaMask/eth-sig-util#typedsignaturehash-typeddata and it should be more natural to combine it in JS native env :slightly_smiling_face:

My idea is as follows: • omg-js talking to ch-ch (I've heard we have / planning e2e tests) so we can verify sigs js -> elixir • omg-js verifies signatures against metamask with above eth-sig-util: js -> metamask • elixir-omg integration tests or omg-js e2e talks to contract so we have elixir/js -> solidity verification

pnowosie avatar Oct 02 '19 05:10 pnowosie