You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2024. It is now read-only.
These 2 functions do a very similar thing. There is unnecessary code duplication, not only between these 2 functions, but also inside each of the functions in the way how they encode transaction params.
Also, the code would be more readable if the conditional was inverted to check if params are present and valid, rather than if params are missing or invalid.
The text was updated successfully, but these errors were encountered:
### What was the problem?
This PR resolves#9061
### How was it solved?
- Extracted common functionality to `encodeParams()` function
- Reverted the conditional for checking if params are valid
- Updated `validateTransaction()` to throws error instead of returning
an error
- Updated `encodeParams()` to default params schema to `emptySchema`
### How was it tested?
All existing tests have passed 👌🏻
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
These 2 functions do a very similar thing. There is unnecessary code duplication, not only between these 2 functions, but also inside each of the functions in the way how they encode transaction params.
Also, the code would be more readable if the conditional was inverted to check if params are present and valid, rather than if params are missing or invalid.
The text was updated successfully, but these errors were encountered: