Last active
December 20, 2017 02:30
-
-
Save devonwesley/a6ba39c779592568f5990ec158429b91 to your computer and use it in GitHub Desktop.
This function helps us pick which containers a prop is for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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