Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ ${BIN_DIR}/rocketpool-cli-$1-$2: ${bin_deps}
ifndef NO_DOCKER
docker run --rm -v ./:/src --user $(shell id -u):$(shell id -g) -e CGO_ENABLED=0 \
-e GOARCH=$2 -e GOOS=$1 --workdir /src -v ~/.cache:/.cache rocketpool/smartnode-builder:${VERSION} \
go build -o $$@ rocketpool-cli/rocketpool-cli.go
go build -o $$@ ./rocketpool-cli/
else
CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -o $$@ ./rocketpool-cli/rocketpool-cli.go
CGO_ENABLED=0 GOOS=$1 GOARCH=$2 go build -o $$@ ./rocketpool-cli/
endif
endef

Expand Down
4 changes: 2 additions & 2 deletions rocketpool-cli/auction/bid-lot.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func bidOnLot(c *cli.Context) error {
maxAmount.Quo(&tmp, eth.EthToWei(1))

// Prompt for maximum amount
if prompt.Confirm(fmt.Sprintf("Would you like to bid the maximum amount of ETH (%.6f ETH)?", math.RoundDown(eth.WeiToEth(&maxAmount), 6))) {
if prompt.Confirm("Would you like to bid the maximum amount of ETH (%.6f ETH)?", math.RoundDown(eth.WeiToEth(&maxAmount), 6)) {
amountWei = &maxAmount
} else {

Expand Down Expand Up @@ -145,7 +145,7 @@ func bidOnLot(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to bid %.6f ETH on lot %d? Bids are final and non-refundable.", math.RoundDown(eth.WeiToEth(amountWei), 6), selectedLot.Details.Index))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to bid %.6f ETH on lot %d? Bids are final and non-refundable.", math.RoundDown(eth.WeiToEth(amountWei), 6), selectedLot.Details.Index)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/auction/claim-lot.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func claimFromLot(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to claim %d lots?", len(selectedLots)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to claim %d lots?", len(selectedLots))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/auction/recover-lot.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func recoverRplFromLot(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to recover %d lots?", len(selectedLots)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to recover %d lots?", len(selectedLots))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/claims/claim-all.go
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ func claimAll(c *cli.Context, statusOnly bool) error {
if autoConfirm {
fmt.Printf(" %sContinuing with remaining %d claim(s)...%s\n", colorYellow, remaining, colorReset)
} else {
if !prompt.Confirm(fmt.Sprintf(" The above claim failed. Continue with the remaining %d claim(s)?", remaining)) {
if !prompt.Confirm(" The above claim failed. Continue with the remaining %d claim(s)?", remaining) {
skippedCount = remaining
fmt.Println(" Aborting remaining claims.")
break
Expand Down
6 changes: 3 additions & 3 deletions rocketpool-cli/megapool/deposit.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func nodeMegapoolDeposit(c *cli.Context) error {
fmt.Printf("The total bond requirement is %.2f ETH.\n", totalBondRequirementEth)
fmt.Println()

if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("%sNOTE: You are about to create %d new megapool validator(s), requiring a total of: %.2f ETH).%s\nWould you like to continue?", colorYellow, count, totalBondRequirementEth, colorReset))) {
if !(c.Bool("yes") || prompt.Confirm("%sNOTE: You are about to create %d new megapool validator(s), requiring a total of: %.2f ETH).%s\nWould you like to continue?", colorYellow, count, totalBondRequirementEth, colorReset)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down Expand Up @@ -272,13 +272,13 @@ func nodeMegapoolDeposit(c *cli.Context) error {

// Prompt for confirmation

if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf(
if !(c.Bool("yes") || prompt.Confirm(
"You are about to deposit %.6f ETH to create %d new megapool validator(s).\n"+
"%sARE YOU SURE YOU WANT TO DO THIS? %s\n",
math.RoundDown(eth.WeiToEth(totalBondRequirement), 6),
count,
colorYellow,
colorReset))) {
colorReset)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/megapool/dissolve-validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func dissolveValidator(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to DISSOLVE megapool validator ID: %d?", validatorId))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to DISSOLVE megapool validator ID: %d?", validatorId)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/megapool/exit-queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func exitQueue(c *cli.Context) error {
}

// Ask for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to exit %d validator(s) from the megapool queue?", len(canExitResponses)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to exit %d validator(s) from the megapool queue?", len(canExitResponses))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/megapool/exit-validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func exitValidator(c *cli.Context) error {
fmt.Printf("Once your funds have been withdrawn, you can run `rocketpool megapool notify-validator-exit` to distribute them to your withdrawal address.\n\n%s", colorReset)

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to EXIT validator id %d?", validatorId))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to EXIT validator id %d?", validatorId)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/megapool/notify-final-balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func notifyFinalBalance(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to notify the final balance for validator id %d exit?", validatorId))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to notify the final balance for validator id %d exit?", validatorId)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/megapool/notify-validator-exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func notifyValidatorExit(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to notify about the validator id %d exit?", validatorId))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to notify about the validator id %d exit?", validatorId)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions rocketpool-cli/megapool/reduce-bond.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func reduceBond(c *cli.Context) error {
if megapoolDetails.Megapool.NodeBond.Cmp(megapoolDetails.Megapool.BondRequirement) > 0 {
maxAmountInEth := eth.WeiToEth(megapoolDetails.Megapool.NodeBond.Sub(megapoolDetails.Megapool.NodeBond, megapoolDetails.Megapool.BondRequirement))
fmt.Printf("You have %.6f of excess bond.\n", maxAmountInEth)
if prompt.Confirm(fmt.Sprintf("Do you want to reduce %.6f ETH of your node bond?", maxAmountInEth)) {
if prompt.Confirm("Do you want to reduce %.6f ETH of your node bond?", maxAmountInEth) {
// Convert maxAmountInEth to string
amount = maxAmountInEth
} else {
Expand Down Expand Up @@ -74,7 +74,7 @@ func reduceBond(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to reduce %.6f of the megapool bond?", math.RoundDown(eth.WeiToEth(amountWei), 6)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to reduce %.6f of the megapool bond?", math.RoundDown(eth.WeiToEth(amountWei), 6))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/megapool/repay-debt.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func repayDebt(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to repay %.6f ETH of megapool debt?", math.RoundDown(eth.WeiToEth(amountWei), 6)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to repay %.6f ETH of megapool debt?", math.RoundDown(eth.WeiToEth(amountWei), 6))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions rocketpool-cli/megapool/stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func stake(c *cli.Context) error {
}

// Warning reg the time necessary to build the proof
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("The stake operation will construct a beacon state proof that the deposit for validator ID %d was correct. This will take several seconds to finish.\nDo you want to continue?", validatorId))) {
if !(c.Bool("yes") || prompt.Confirm("The stake operation will construct a beacon state proof that the deposit for validator ID %d was correct. This will take several seconds to finish.\nDo you want to continue?", validatorId)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down Expand Up @@ -96,7 +96,7 @@ func stake(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to stake validator id %d", validatorId))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to stake validator id %d", validatorId)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
12 changes: 6 additions & 6 deletions rocketpool-cli/minipool/close.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ func closeMinipools(c *cli.Context) error {

// Post a warning about express ticket provisioning
if !details.ExpressTicketsProvisioned {
if !prompt.Confirm(fmt.Sprintf("%sWARNING: The node has unprovisioned express queue ticket(s). Closing minipool(s) without provisioning will reduce the number of express queue tickets the node is eligible for. Please enter `yes` if you've understood this message.%s`", colorRed, colorReset)) {
if !prompt.Confirm("%sWARNING: The node has unprovisioned express queue ticket(s). Closing minipool(s) without provisioning will reduce the number of express queue tickets the node is eligible for. Please enter `yes` if you've understood this message.%s`", colorRed, colorReset) {
fmt.Println("Cancelled.")
return nil
}
if c.Bool("yes") || prompt.Confirm(fmt.Sprintf("%sWould you like to provision express queue tickets for the node?%s", colorYellow, colorReset)) {
if c.Bool("yes") || prompt.Confirm("%sWould you like to provision express queue tickets for the node?%s", colorYellow, colorReset) {
// Check if the node can provision express tickets
canProvision, err := rp.CanProvisionExpressTickets()
if err != nil {
Expand Down Expand Up @@ -212,7 +212,7 @@ func closeMinipools(c *cli.Context) error {
fmt.Printf("\n%sIf you are *sure* you want to close the minipool anyway, rerun this command with the `--confirm-slashing` flag. Doing so WILL RESULT in both your ETH bond and your RPL collateral being slashed.%s\n", colorRed, colorReset)
return nil
}
if !prompt.ConfirmWithIAgree(fmt.Sprintf("\n%sYou have the `--confirm-slashing` flag enabled. Closing this minipool WILL RESULT in the complete loss of your initial ETH bond and enough of your RPL stake to cover the losses to the staking pool. Please confirm you understand this and want to continue closing the minipool.%s", colorRed, colorReset)) {
if !prompt.ConfirmWithIAgree("\n%sYou have the `--confirm-slashing` flag enabled. Closing this minipool WILL RESULT in the complete loss of your initial ETH bond and enough of your RPL stake to cover the losses to the staking pool. Please confirm you understand this and want to continue closing the minipool.%s", colorRed, colorReset) {
fmt.Println("Cancelled.")
return nil
}
Expand All @@ -222,7 +222,7 @@ func closeMinipools(c *cli.Context) error {

if distributableBalance.Cmp(yellowThreshold) < 0 {
// More than the user deposit balance but less than 31.5, ETH will be slashed with a red warning
if !prompt.ConfirmWithIAgree(fmt.Sprintf("%sWARNING: Minipool %s has a distributable balance of %.6f ETH. Closing it in this state WILL RESULT in a loss of ETH. You will only receive %.6f ETH back. Please confirm you understand this and want to continue closing the minipool.%s", colorRed, minipool.Address.Hex(), math.RoundDown(eth.WeiToEth(distributableBalance), 6), math.RoundDown(eth.WeiToEth(minipool.NodeShare), 6), colorReset)) {
if !prompt.ConfirmWithIAgree("%sWARNING: Minipool %s has a distributable balance of %.6f ETH. Closing it in this state WILL RESULT in a loss of ETH. You will only receive %.6f ETH back. Please confirm you understand this and want to continue closing the minipool.%s", colorRed, minipool.Address.Hex(), math.RoundDown(eth.WeiToEth(distributableBalance), 6), math.RoundDown(eth.WeiToEth(minipool.NodeShare), 6), colorReset) {
fmt.Println("Cancelled.")
return nil
}
Expand All @@ -231,7 +231,7 @@ func closeMinipools(c *cli.Context) error {
}
if distributableBalance.Cmp(thirtyTwo) < 0 {
// More than 31.5 but less than 32, ETH will be slashed with a yellow warning
if !prompt.Confirm(fmt.Sprintf("%sWARNING: Minipool %s has a distributable balance of %.6f ETH. Closing it in this state WILL RESULT in a loss of ETH. You will only receive %.6f ETH back. Please confirm you understand this and want to continue closing the minipool.%s", colorYellow, minipool.Address.Hex(), math.RoundDown(eth.WeiToEth(distributableBalance), 6), math.RoundDown(eth.WeiToEth(minipool.NodeShare), 6), colorReset)) {
if !prompt.Confirm("%sWARNING: Minipool %s has a distributable balance of %.6f ETH. Closing it in this state WILL RESULT in a loss of ETH. You will only receive %.6f ETH back. Please confirm you understand this and want to continue closing the minipool.%s", colorYellow, minipool.Address.Hex(), math.RoundDown(eth.WeiToEth(distributableBalance), 6), math.RoundDown(eth.WeiToEth(minipool.NodeShare), 6), colorReset) {
fmt.Println("Cancelled.")
return nil
}
Expand All @@ -257,7 +257,7 @@ func closeMinipools(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to close %d minipools?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to close %d minipools?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func delegateUpgradeMinipools(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to upgrade %d minipools?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to upgrade %d minipools?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/dissolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func dissolveMinipools(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to dissolve %d minipool(s)? This action cannot be undone!", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to dissolve %d minipool(s)? This action cannot be undone!", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/distribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func distributeBalance(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to distribute the ETH balance of %d minipools?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to distribute the ETH balance of %d minipools?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func exitMinipools(c *cli.Context) error {
fmt.Printf("Once your funds have been withdrawn, you can run `rocketpool minipool close` to distribute them to your withdrawal address and close the minipool.\n\n%s", colorReset)

// Prompt for confirmation
if !(c.Bool("yes") || prompt.ConfirmWithIAgree(fmt.Sprintf("Are you sure you want to exit %d minipool(s)? This action cannot be undone!", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.ConfirmWithIAgree("Are you sure you want to exit %d minipool(s)? This action cannot be undone!", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/promote.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func promoteMinipools(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to promote %d minipools?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to promote %d minipools?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/reduce-bond.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func reduceBondAmount(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to reduce the bond for %d minipools from 16 ETH to 8 ETH?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to reduce the bond for %d minipools from 16 ETH to 8 ETH?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/refund.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func refundMinipools(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to refund %d minipools?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to refund %d minipools?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/rescue-dissolved.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func rescueDissolved(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to deposit %.6f ETH to rescue minipool %s?", math.RoundDown(depositAmountFloat, 6), selectedMinipool.Address.Hex()))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to deposit %.6f ETH to rescue minipool %s?", math.RoundDown(depositAmountFloat, 6), selectedMinipool.Address.Hex())) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/minipool/stake.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func stakeMinipools(c *cli.Context) error {
fmt.Println()

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to stake %d minipools?", len(selectedMinipools)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to stake %d minipools?", len(selectedMinipools))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/node/allow-lock-rpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func setRPLLockingAllowed(c *cli.Context, allowedToLock bool) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(allowString)) {
if !(c.Bool("yes") || prompt.Confirm("%s", allowString)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion rocketpool-cli/node/claim-unclaimed-rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func claimUnclaimedRewards(c *cli.Context) error {
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to claim %.6f ETH in unclaimed rewards?", math.RoundDown(eth.WeiToEth(status.UnclaimedRewards), 6)))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to claim %.6f ETH in unclaimed rewards?", math.RoundDown(eth.WeiToEth(status.UnclaimedRewards), 6))) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions rocketpool-cli/node/primary-withdrawal-address.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func setPrimaryWithdrawalAddress(c *cli.Context, withdrawalAddressOrENS string)
return err
}

if !prompt.Confirm(fmt.Sprintf("Please confirm you want to send %f ETH to %s.", testAmount, withdrawalAddressString)) {
if !prompt.Confirm("Please confirm you want to send %f ETH to %s.", testAmount, withdrawalAddressString) {
fmt.Println("Cancelled.")
return nil
}
Expand All @@ -110,7 +110,7 @@ func setPrimaryWithdrawalAddress(c *cli.Context, withdrawalAddressOrENS string)
}

// Prompt for confirmation
if !(c.Bool("yes") || prompt.Confirm(fmt.Sprintf("Are you sure you want to set your node's primary withdrawal address to %s?", withdrawalAddressString))) {
if !(c.Bool("yes") || prompt.Confirm("Are you sure you want to set your node's primary withdrawal address to %s?", withdrawalAddressString)) {
fmt.Println("Cancelled.")
return nil
}
Expand Down
Loading
Loading