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

Remove optional input in decodePubkey from @cosmjs/proto-signing #1289

Closed
webmaster128 opened this issue Oct 13, 2022 · 0 comments · Fixed by #1345
Closed

Remove optional input in decodePubkey from @cosmjs/proto-signing #1289

webmaster128 opened this issue Oct 13, 2022 · 0 comments · Fixed by #1345
Milestone

Comments

@webmaster128
Copy link
Member

The signature export function decodePubkey(pubkey?: Any | null): Pubkey | null { is not very helpful since the caller always has to handle the null case even if the input is not optional.

Increas, caller code should be changed like this:

// now
const pubkey = decodePubkey(pubKey);

// better
const pubkey = pubKey ? decodePubkey(pubKey) : null;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant