Skip to content

Commit

Permalink
change PASSPHRASE to const
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanut Lertwarachai authored and Tanut Lertwarachai committed Nov 27, 2024
1 parent 404195a commit 18f9d3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion relayer/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const (
configFolderName = "config"
configFileName = "config.toml"
passphraseFileName = "passphrase.hash"
passphraseEnvKey = "PASSPHRASE"
)

// App is the main application struct.
Expand Down Expand Up @@ -525,7 +526,7 @@ func (a *App) loadEnvPassphrase() string {
} else {
a.Log.Debug("Loaded .env file successfully, attempting to use variable from .env file")
}
return os.Getenv("PASSPHRASE")
return os.Getenv(passphraseEnvKey)
}

// validatePassphrase checks if the provided passphrase (from the environment)
Expand Down

0 comments on commit 18f9d3e

Please sign in to comment.