Skip to content

Commit

Permalink
pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradStaniec committed Jan 8, 2025
1 parent 5df4ab9 commit a1a6e84
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions cmd/stakercli/pop/pop.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/babylonlabs-io/btc-staker/cmd/stakercli/helpers"
"github.com/babylonlabs-io/btc-staker/staker"
"github.com/babylonlabs-io/btc-staker/types"
ut "github.com/babylonlabs-io/btc-staker/utils"
"github.com/babylonlabs-io/btc-staker/walletcontroller"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/urfave/cli"
)
Expand Down Expand Up @@ -107,7 +107,7 @@ var generatePopCmd = cli.Command{
func generatePop(c *cli.Context) error {
network := c.String(btcNetworkFlag)

networkParams, err := parseNetwork(network)
networkParams, err := ut.GetBtcNetworkParams(network)
if err != nil {
return err
}
Expand Down Expand Up @@ -163,20 +163,3 @@ func generatePop(c *cli.Context) error {

return nil
}

func parseNetwork(n string) (*chaincfg.Params, error) {
switch n {
case "mainnet":
return &chaincfg.MainNetParams, nil
case "testnet3":
return &chaincfg.TestNet3Params, nil
case "regtest":
return &chaincfg.RegressionNetParams, nil
case "simnet":
return &chaincfg.SimNetParams, nil
case "signet":
return &chaincfg.SigNetParams, nil
default:
return nil, fmt.Errorf("unknown network: %s", n)
}
}

0 comments on commit a1a6e84

Please sign in to comment.