From bf4f45af450e3cd7ddc0a539193b33fa3b91cbe9 Mon Sep 17 00:00:00 2001 From: batphonghan Date: Wed, 25 Oct 2023 21:54:16 +0700 Subject: [PATCH] Update copies --- stader-cli/node/register.go | 3 ++- stader-cli/node/update-socialize-el.go | 24 ++++++++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/stader-cli/node/register.go b/stader-cli/node/register.go index 2cb379ec3..a84c2d1a4 100644 --- a/stader-cli/node/register.go +++ b/stader-cli/node/register.go @@ -32,9 +32,10 @@ func registerNode(c *cli.Context, operatorName string) error { operatorRewardAddressString := walletStatus.AccountAddress.String() - confirmText := "Would you wish to join the ETHx Socializing pool?\nType 'Y' to Opt-in or 'N' to Opt-out. \nNote: The Opt-In and Opt-Out of socializing pool will have a cool-off period of 56 days.\ni.e you will have to wait for 56 days to Opt-Out of the Socializing pool once you Opt-In and vice versa.\nLearn more about the ETHx Socializing Pool here:\nhttps://staderlabs.gitbook.io/ethereum/node-operator/permissionless-node-operator/ethx-rewards-for-permissionless-node-operators/socializing-pool\n" + confirmText := "Would you wish to join the ETHx Socializing pool?\nType 'Y' to Opt-in or 'N' to Opt-out. \nNote: The Opt-In and Opt-Out of socializing pool will have a cool-off period of 56 days.\ni.e you will have to wait for 56 days to Opt-Out of the Socializing pool once you Opt-In and vice versa.\nLearn more about the ETHx Socializing Pool here:\nhttps://www.staderlabs.com/docs-v1/Ethereum/Node-operator/permissionless-node-operator/ethx-rewards-for-permissionless-node-operators/socializing-pool\n" socializeEl := cliutils.Confirm(confirmText) + // Check node can be registered canRegister, err := staderClient.CanRegisterNode(operatorName, common.HexToAddress(operatorRewardAddressString), socializeEl) if err != nil { diff --git a/stader-cli/node/update-socialize-el.go b/stader-cli/node/update-socialize-el.go index ca744c986..199af7ba2 100644 --- a/stader-cli/node/update-socialize-el.go +++ b/stader-cli/node/update-socialize-el.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/gas" "github.com/urfave/cli" @@ -50,8 +51,19 @@ func UpdateSocializeEl(c *cli.Context, socializeEl bool) error { return err } - if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf( - "Are you sure you want to update socializing pool participation?"))) { + var confirmText string + + if socializeEl { + confirmText = ` +Note: There is a 56-day cool-off period for both Opt-In and Opt-Out of the socializing pool. For example, once you Opt-In, you will have to wait for 56 days to Opt-Out of the Socializing pool, and vice versa. +Are you sure you want to Opt-Into the socializing pool? ` + } else { + confirmText = ` +Note: There is a 56-day cool-off period for both Opt-In and Opt-Out of the socializing pool. For example, once you Opt-Out, you will have to wait for 56 days to Opt Into the Socializing pool, and vice versa. +Are you sure you want to Opt-Out of the socializing pool?` + } + + if !(c.Bool("yes") || cliutils.Confirm(confirmText)) { fmt.Println("Cancelled.") return nil } @@ -63,9 +75,9 @@ func UpdateSocializeEl(c *cli.Context, socializeEl bool) error { } if socializeEl { - fmt.Printf("Opting in for socializing pool...\n") + fmt.Printf("Opting into the socializing pool...\n") } else { - fmt.Printf("Opting out for socializing pool...\n") + fmt.Printf("Opting out of the socializing pool...\n") } cliutils.PrintTransactionHash(staderClient, response.TxHash) _, err = staderClient.WaitForTransaction(response.TxHash) @@ -74,9 +86,9 @@ func UpdateSocializeEl(c *cli.Context, socializeEl bool) error { } if socializeEl { - fmt.Printf("Opted in of socializing pool...\n") + fmt.Printf("Your request to Opt-In to the socializing pool is successful and will take effect after 3 epochs, approximately 20 minutes. \n") } else { - fmt.Printf("Opted out of socializing pool...\n") + fmt.Printf("Your request to Opt-Out of the socializing pool is successful and will take effect after 3 epochs, approximately 20 minutes. \n") } return nil