A lot of things to improve here, mainly the generation of the { v, r, s } arguments. Right now a valid combination of arguments is hardcoded, and all the tests must be in their own contract block (so that they run in a "fresh" contract). I think the best approach would be to require the same module that the server uses to generate those arguments, web-dapp/server-lib/sign.js, and use it to build valid arguments.
Add some tests for the smart contract, see #15.
A lot of things to improve here, mainly the generation of the
{ v, r, s }
arguments. Right now a valid combination of arguments is hardcoded, and all the tests must be in their owncontract
block (so that they run in a "fresh" contract). I think the best approach would be to require the same module that the server uses to generate those arguments,web-dapp/server-lib/sign.js
, and use it to build valid arguments.