Skip to content

Commit

Permalink
move change controller prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
sukantoraymond committed Dec 5, 2024
1 parent b775332 commit 8e33753
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions cmd/blockchaincmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -580,15 +580,14 @@ func deployBlockchain(cmd *cobra.Command, args []string) error {
return err
}

if changeOwnerAddress == "" {
// use provided key as change owner unless already set
if pAddr, err := kc.PChainFormattedStrAddresses(); err == nil && len(pAddr) > 0 {
changeOwnerAddress = pAddr[0]
ux.Logger.PrintToUser("Using [%s] to be set as a change owner for leftover AVAX", changeOwnerAddress)
}
}

if sidecar.Sovereign {
if changeOwnerAddress == "" {
// use provided key as change owner unless already set
if pAddr, err := kc.PChainFormattedStrAddresses(); err == nil && len(pAddr) > 0 {
changeOwnerAddress = pAddr[0]
ux.Logger.PrintToUser("Using [%s] to be set as a change owner for leftover AVAX", changeOwnerAddress)
}
}
if !generateNodeID {
if network.Kind == models.Local {
if len(bootstrapEndpoints) == 0 {
Expand Down

0 comments on commit 8e33753

Please sign in to comment.