Skip to content

Commit

Permalink
Disable Peer GUI launch button when not using a local network
Browse files Browse the repository at this point in the history
  • Loading branch information
mikera committed Jan 16, 2025
1 parent 3a2d898 commit 347150c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import convex.core.Coin;
import convex.core.crypto.AKeyPair;
import convex.core.exceptions.TODOException;
import convex.core.init.Init;
import convex.core.util.Utils;
import convex.gui.components.ActionButton;
import convex.gui.components.ActionPanel;
Expand Down Expand Up @@ -70,7 +71,11 @@ public ServerListPanel(PeerGUI manager) {
ConvexLocal convex=manager.getDefaultConvex();
manager.launchExtraPeer(convex);
});
btnLaunch.setToolTipText("Launch an extra peer for the network. Allocates some stake from genesis account");
btnLaunch.setToolTipText("Launch an extra peer when running a local network. Allocates some stake from genesis peer controller account.");
if (!Init.GENESIS_PEER_ADDRESS.equals (manager.getDefaultConvex().getAddress())) {
// Disable if we are not the genesis peer
btnLaunch.setEnabled(false);
}
toolBar.add(btnLaunch);

// TODO: We probably want to restore this, but semantics not obvious
Expand Down

0 comments on commit 347150c

Please sign in to comment.