diff --git a/command/rootchain/deploy/params.go b/command/rootchain/deploy/params.go index a412558320..c1e95576ad 100644 --- a/command/rootchain/deploy/params.go +++ b/command/rootchain/deploy/params.go @@ -51,9 +51,5 @@ func (ip *deployParams) validateFlags() error { return errors.New("stake token address is not provided") } - if err := helper.ValidateProxyContractsAdmin(ip.proxyContractsAdmin); err != nil { - return err - } - - return nil + return helper.ValidateProxyContractsAdmin(ip.proxyContractsAdmin) } diff --git a/command/rootchain/supernet/stakemanager/params.go b/command/rootchain/supernet/stakemanager/params.go index 3a686927ba..a7c086ded2 100644 --- a/command/rootchain/supernet/stakemanager/params.go +++ b/command/rootchain/supernet/stakemanager/params.go @@ -30,10 +30,9 @@ func (s *stakeManagerDeployParams) validateFlags() error { // validate jsonrpc address _, err := helper.ParseJSONRPCAddress(s.jsonRPC) - - if err := helper.ValidateProxyContractsAdmin(s.proxyContractsAdmin); err != nil { + if err != nil { return err } - return err + return helper.ValidateProxyContractsAdmin(s.proxyContractsAdmin) }