Skip to content

Instantly share code, notes, and snippets.

@devonwesley
Last active December 20, 2017 02:30
Show Gist options
  • Save devonwesley/a6ba39c779592568f5990ec158429b91 to your computer and use it in GitHub Desktop.
Save devonwesley/a6ba39c779592568f5990ec158429b91 to your computer and use it in GitHub Desktop.
This function helps us pick which containers a prop is for.
function categorizeContractProps(params) {
const hashNames = {
'hash': 'hash',
'blockHash': 'blockHash',
'input': 'input',
'from': 'from',
}
if (hashNames[params.key]) {
return params.hashList
}
if (typeof params.value === 'function') {
return params.functionList
}
return params.propsList
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment