Skip to content

Commit

Permalink
fix: change default confirm value to false for all interactions (#921)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs authored Sep 12, 2024
1 parent bcf59eb commit c5d3912
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- id: release-please
name: Create release notes from conventional commits
uses: google-github-actions/release-please-action@v3
uses: google-github-actions/release-please-action@v4
with:
pull-request-header: ":loop: New roller Release"
release-type: go
Expand Down
9 changes: 5 additions & 4 deletions cmd/relayer/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,11 @@ func Cmd() *cobra.Command {
for _, k := range keys {
k.Print(utils.WithName())
}
interactiveContinue, _ := pterm.DefaultInteractiveConfirm.WithDefaultText(
"Press enter when the keys are funded: ",
).WithDefaultValue(true).Show()
if !interactiveContinue {
proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(false).
WithDefaultText(
"press 'y' when the wallets are funded funded",
).Show()
if !proceed {
return
}

Expand Down
15 changes: 7 additions & 8 deletions cmd/rollapp/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import (
cosmossdktypes "github.com/cosmos/cosmos-sdk/types"
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
dymensionseqtypes "github.com/dymensionxyz/dymension/v3/x/sequencer/types"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"

initconfig "github.com/dymensionxyz/roller/cmd/config/init"
"github.com/dymensionxyz/roller/cmd/consts"
initrollapp "github.com/dymensionxyz/roller/cmd/rollapp/init"
Expand All @@ -34,6 +30,9 @@ import (
"github.com/dymensionxyz/roller/utils/errorhandling"
"github.com/dymensionxyz/roller/utils/rollapp"
sequencerutils "github.com/dymensionxyz/roller/utils/sequencer"
"github.com/pterm/pterm"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
)

// TODO: Test sequencing on 35-C and update the price
Expand Down Expand Up @@ -238,9 +237,9 @@ func Cmd() *cobra.Command {
pterm.DefaultSection.WithIndentCharacter("🔔").
Println("Please fund the addresses below to register and run the sequencer.")
seqAddrInfo.Print(utils.WithName())
proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(true).
proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(false).
WithDefaultText(
"press enter when funded",
"press 'y' when the wallets are funded funded",
).Show()

if !proceed {
Expand Down Expand Up @@ -305,9 +304,9 @@ func Cmd() *cobra.Command {
pterm.DefaultSection.WithIndentCharacter("🔔").
Println("Please fund the addresses below to register and run the sequencer.")
seqAddrInfo.Print(utils.WithName())
proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(true).
proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(false).
WithDefaultText(
"press enter when funded",
"press 'y' when funded",
).Show()

if !proceed {
Expand Down
5 changes: 3 additions & 2 deletions cmd/utils/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ func PrintInsufficientBalancesIfAny(
Println("Please fund the addresses below to register and run the sequencer.")
printAddresses()

proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(true).
// TODO: to util
proceed, _ := pterm.DefaultInteractiveConfirm.WithDefaultValue(false).
WithDefaultText(
"press enter when funded",
"press 'y' when the wallets are funded funded",
).Show()
if !proceed {
pterm.Info.Println("exiting")
Expand Down
1 change: 1 addition & 0 deletions utils/sequencer/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
cosmossdkmath "cosmossdk.io/math"
cosmossdktypes "github.com/cosmos/cosmos-sdk/types"
dymensionseqtypes "github.com/dymensionxyz/dymension/v3/x/sequencer/types"

"github.com/dymensionxyz/roller/cmd/consts"
"github.com/dymensionxyz/roller/cmd/utils"
"github.com/dymensionxyz/roller/utils/bash"
Expand Down

0 comments on commit c5d3912

Please sign in to comment.