From 5653e628b66cc67513f6becba8145116849a9e85 Mon Sep 17 00:00:00 2001 From: Madhur Shrimal Date: Mon, 28 Oct 2024 21:49:31 -0400 Subject: [PATCH] fix: bug in delegation approval when no signer provided (#235) --- pkg/operator/get_delegation_approval.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/operator/get_delegation_approval.go b/pkg/operator/get_delegation_approval.go index aee09013..98dfb291 100644 --- a/pkg/operator/get_delegation_approval.go +++ b/pkg/operator/get_delegation_approval.go @@ -194,7 +194,12 @@ func getApprovalConfig(cCtx *cli.Context) (*ApprovalConfig, error) { privateKeyHex := cCtx.String(flags.EcdsaPrivateKeyFlag.Name) keystoreFilePath := cCtx.String(flags.PathToKeyStoreFlag.Name) if privateKeyHex == "" && keystoreFilePath == "" { - return nil, fmt.Errorf("either private key or keystore file path is required. other signer not supported") + return &ApprovalConfig{ + OperatorConfigFilePath: configurationFilePath, + StakerAddress: stakerAddress, + Expiry: expirySeconds, + SignerConfig: types.SignerConfig{}, + }, nil } if privateKeyHex != "" {