From e6848eb7ccba38ed5bac6838c7ef70e94ef5c80e Mon Sep 17 00:00:00 2001 From: fyInALT Date: Mon, 1 Apr 2024 15:18:01 +0800 Subject: [PATCH] fix RegisterOperatorWithAvs failed by not use env config --- cli/actions/register_operator_with_avs.go | 2 +- operator/operator.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cli/actions/register_operator_with_avs.go b/cli/actions/register_operator_with_avs.go index 4c983e6..0b57d74 100644 --- a/cli/actions/register_operator_with_avs.go +++ b/cli/actions/register_operator_with_avs.go @@ -39,7 +39,7 @@ func RegisterOperatorWithAvs(ctx *cli.Context) error { log.Printf("OPERATOR_ECDSA_KEY_PASSWORD env var not set. using empty string") } operatorEcdsaPrivKey, err := sdkecdsa.ReadKey( - nodeConfig.EcdsaPrivateKeyStorePath, + operator.Config().EcdsaPrivateKeyStorePath, ecdsaKeyPassword, ) if err != nil { diff --git a/operator/operator.go b/operator/operator.go index 9041dd4..8ac9366 100644 --- a/operator/operator.go +++ b/operator/operator.go @@ -448,3 +448,7 @@ func (o *Operator) SignTaskResponse(taskResponse *message.AlertTaskInfo) (*messa o.logger.Debug("Signed task response", "signedTaskResponse", signedTaskResponse) return signedTaskResponse, nil } + +func (o Operator) Config() config.NodeConfig { + return o.config +}