Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@trezor/connect: improve validateParams function #5297

Closed
szymonlesisz opened this issue Apr 29, 2022 · 0 comments · Fixed by #10280
Closed

@trezor/connect: improve validateParams function #5297

szymonlesisz opened this issue Apr 29, 2022 · 0 comments · Fixed by #10280
Labels
code Code improvements connect Connect API related (ie. fee calculation)

Comments

@szymonlesisz
Copy link
Contributor

validateParams function should be generic and return paramsobject is <Shape>
example:

validateParams(output, [
    { name: 'address', type: 'string', required: true },
]);
// @ts-expect-error `address` is validated above
validateAddress(output.address);
@szymonlesisz szymonlesisz added code Code improvements connect Connect API related (ie. fee calculation) labels Apr 29, 2022
@trezor-ci trezor-ci added this to 📥 Inbox in Backlog 🗂 via automation Apr 29, 2022
@hynek-jina hynek-jina moved this from 📥 Inbox to 💻 Code in Backlog 🗂 Apr 29, 2022
This was referenced Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code improvements connect Connect API related (ie. fee calculation)
Projects
Archived in project
Backlog 🗂
💻 Code
Development

Successfully merging a pull request may close this issue.

1 participant