From 485fc69832ac9060547e8b272182cb9983045d74 Mon Sep 17 00:00:00 2001 From: Callum Waters Date: Thu, 18 Jan 2024 11:53:05 +1300 Subject: [PATCH] feat: allow empty public keys --- x/auth/tx/builder.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index 7cf3596f342b..d64c927e6524 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -287,11 +287,17 @@ func (w *wrapper) SetSignatures(signatures ...signing.SignatureV2) error { rawSigs := make([][]byte, n) for i, sig := range signatures { - var modeInfo *tx.ModeInfo + var ( + modeInfo *tx.ModeInfo + any *codectypes.Any + err error + ) modeInfo, rawSigs[i] = SignatureDataToModeInfoAndSig(sig.Data) - any, err := codectypes.NewAnyWithValue(sig.PubKey) - if err != nil { - return err + if sig.PubKey != nil { + any, err = codectypes.NewAnyWithValue(sig.PubKey) + if err != nil { + return err + } } signerInfos[i] = &tx.SignerInfo{ PublicKey: any,