cosmjs
cosmjs copied to clipboard
Remove optional input in decodePubkey from @cosmjs/proto-signing
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;