Files
Igor Sirotin d1e9ae5225 refactor: extract a networks service (#7748)
The network manager lived in internal/rpc and was constructed, started
and stopped by rpc.Client, which reached back into it to route calls by
chain. It is now a service of its own at pkg/services/networks.

StatusNode owns the manager and hands it to rpc.Client through
ClientConfig, so the client depends on ManagerInterface rather than the
concrete type. The service owns the manager lifecycle.

The four live network RPC methods are registered under the networks_
namespace. The wallet_ ones are left in place so nothing breaks before
the app migrates; they are removed at the end of the stack.
2026-08-26 18:05:03 +01:00

13 lines
551 B
Go

package networks
import (
"github.com/status-im/status-go/internal/errors"
)
// Abbreviation `NET` for the error code stands for Networks
var (
ErrNetworkNotDeactivatable = &errors.ErrorResponse{Code: errors.ErrorCode("NET-001"), Details: "network is not deactivatable"}
ErrActiveNetworksLimitReached = &errors.ErrorResponse{Code: errors.ErrorCode("NET-002"), Details: "maximum number of active networks reached"}
ErrUnsupportedChainId = &errors.ErrorResponse{Code: errors.ErrorCode("NET-003"), Details: "chainID is not supported"}
)