Skip to content
Unverified Commit e2d6fae4 authored by Dominique's avatar Dominique Committed by GitHub
Browse files

feat: add /accounts/:accountId/convert endpoint (#1007)



* Added the `convert` endpoint
- Controller, service, response type

* Removed getPair

* SS58 Address from Public key (hex)
- Using the query param `publicKey` to output the SS58 address if the input/parameter that is given by the user is a Public Key (hex) and not an accountID.

* Changes in validation code & Adding tests
- Added specific types that the `RequestHandler` can accept.
- Cleaned the code that validates the query params (and sets default values) in the Controller.
- Added tests with different valid or invalid endpoints to check.

* Updated the Docs
- Updated the docs with the `convert` endpoint functionality &  path & query params.

* Changes in the docs based on Tarik's feedback
- Keeping the "AccountId" written with the same format.
- Other minor changes in formatting.

* Changes in code & formatting based on Tarik's feedback

* Minor change in the docstrings

* refactor controller to use validateBoolean

Co-authored-by: default avatartarikgul <[email protected]>
parent bc79dc56
Pipeline #216226 passed with stages
in 18 minutes and 19 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment