Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Refactor Chain actions arguments #2991

Closed
2snEM6 opened this issue Feb 27, 2019 · 0 comments · Fixed by #3065
Closed

Refactor Chain actions arguments #2991

2snEM6 opened this issue Feb 27, 2019 · 0 comments · Fixed by #3065
Assignees

Comments

@2snEM6
Copy link
Contributor

2snEM6 commented Feb 27, 2019

Expected behavior

  • Use named parameters instead of an array for better readability. For example:
    this calculateSupply: action => blockReward.calcSupply(action.height), instead of this calculateSupply: action => blockReward.calcSupply(action.params[0])
  • Improve redundant code on modules/chain.index.js for actions declaration.

Actual behavior

Chain actions currently present the following issues:
Arguments are passed from actions interface to logic in form of an array which is confusing for the developer.
Actions declaration code on modules/chain/index.js seems redundant.

Steps to reproduce

Which version(s) does this affect? (Environment, OS, etc...)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants