cosmjs icon indicating copy to clipboard operation
cosmjs copied to clipboard

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

Open webmaster128 opened this issue 3 years ago • 0 comments

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;

webmaster128 avatar Oct 13 '22 12:10 webmaster128