Skip to content

Commit

Permalink
Add stakers ui url
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Dec 30, 2024
1 parent e361509 commit a4d18b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/application/services/relaysChecker.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ import (
)

type RelayCronService struct {
stakersUiUrl string
relaysAllowedPort ports.RelaysAllowedPort
relaysUsedPort ports.RelaysUsedPort
notifierPort ports.NotifierPort
servicePrefix string
}

func NewRelayCronService(
stakersUiUrl string,
relaysAllowedPort ports.RelaysAllowedPort,
relaysUsedPort ports.RelaysUsedPort,
notifierPort ports.NotifierPort,
) *RelayCronService {
return &RelayCronService{
stakersUiUrl: stakersUiUrl,
relaysAllowedPort: relaysAllowedPort,
relaysUsedPort: relaysUsedPort,
notifierPort: notifierPort,
Expand Down Expand Up @@ -134,6 +137,7 @@ func (rcs *RelayCronService) buildMissingMandatoryNotification(allowedRelays []d
for _, relay := range allowedRelays {
message += fmt.Sprintf("\n- `%s`", relay.Uri)
}
message += "\n\nEdit your relays in the Stakers UI to use at least one mandatory relay." + rcs.stakersUiUrl
return message
}

Expand All @@ -142,6 +146,6 @@ func (rcs *RelayCronService) buildBlacklistNotification(blacklistedRelays []stri
for _, relay := range blacklistedRelays {
message += fmt.Sprintf("- `%s`\n", relay)
}
message += "\nPlease review and address these issues promptly."
message += "\nPlease edit your relays in the Stakers UI to use only allowed relays." + rcs.stakersUiUrl
return message
}
3 changes: 3 additions & 0 deletions internal/config/config_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Config struct {
EtherscanURL string
BeaconchainURL string
CSMUIURL string
StakersUiUrl string
ApiPort uint64

CORS []string
Expand Down Expand Up @@ -154,6 +155,7 @@ func LoadNetworkConfig() (Config, error) {
EtherscanURL: "https://holesky.etherscan.io",
BeaconchainURL: beaconchainURL,
CSMUIURL: "https://csm.testnet.fi",
StakersUiUrl: "http://my.dappnode/stakers/holesky",
ApiPort: apiPort,
CORS: parseCORS(corsEnv, []string{"http://ui.lido-csm-holesky.dappnode", "http://my.dappnode"}),
CSAccountingAddress: common.HexToAddress("0x4562c3e63c2e586cD1651B958C22F88135aCAd4f"),
Expand Down Expand Up @@ -192,6 +194,7 @@ func LoadNetworkConfig() (Config, error) {
EtherscanURL: "https://etherscan.io",
BeaconchainURL: beaconchainURL,
CSMUIURL: "https://csm.lido.fi",
StakersUiUrl: "http://my.dappnode/stakers/ethereum",
ApiPort: apiPort,
CORS: parseCORS(corsEnv, []string{"http://ui.lido-csm-mainnet.dappnode", "http://my.dappnode"}),
CSAccountingAddress: common.HexToAddress("0xdA7dE2ECdDfccC6c3AF10108Db212ACBBf9EA83F"),
Expand Down

0 comments on commit a4d18b4

Please sign in to comment.