MetaMask / eth-method-registry

A JS library for getting Solidity method data from a four-byte method signature
ISC License
21 stars 13 forks source link

Parse fails on functions without arguments #2

Closed vicnaum closed 5 years ago

vicnaum commented 6 years ago

Any function like drain() will throw an exception - cause args match can't get [0] of null.

Also a () fallback function will throw an exception - cause name match can't get [0] of null.

vicnaum commented 6 years ago

Side-note: The issue prevents MetaMask from displaying names of functions without arguments (displays "Unknown Function" instead - even for functions registered in Parity Signature Registry).

Tested a custom MetaMask build with this fix - then it displays the names of zero-argument functions, as well as the ones with arguments.