mirror of
https://github.com/status-im/status-go.git
synced 2026-08-31 09:01:16 +00:00
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.
13 lines
551 B
Go
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"}
|
|
)
|