Skip to content

Commit

Permalink
fix: remove password from file for gtk
Browse files Browse the repository at this point in the history
  • Loading branch information
Ja7ad committed Dec 29, 2024
1 parent 7148bac commit 0fe8e1a
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions cmd/gtk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ import (
const appID = "com.github.pactus-project.pactus.pactus-gui"

var (
workingDirOpt *string
passwordOpt *string
passwordFromFileOpt *string
testnetOpt *bool
workingDirOpt *string
passwordOpt *string
testnetOpt *bool
)

func init() {
workingDirOpt = flag.String("working-dir", cmd.PactusDefaultHomeDir(), "working directory path")
passwordOpt = flag.String("password", "", "wallet password")
passwordFromFileOpt = flag.String("password-from-file", "", "file containing the wallet password")
testnetOpt = flag.Bool("testnet", false, "initializing for the testnet")
version.NodeAgent.AppType = "gui"

Expand Down Expand Up @@ -155,15 +153,6 @@ func newNode(workingDir string) (*node.Node, *wallet.Wallet, error) {
return *passwordOpt, true
}

if *passwordFromFileOpt != "" {
password, err := util.ReadFileContent(*passwordFromFileOpt)
if err != nil {
return "", false
}

return password, true
}

return getWalletPassword(wlt)
}
n, wlt, err := cmd.StartNode(workingDir, passwordFetcher)
Expand Down

0 comments on commit 0fe8e1a

Please sign in to comment.