From e99d7d3458d4f95b6369f01614f17c801d0903e1 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 19 Jan 2021 09:30:32 -0800 Subject: [PATCH] Require a notifier before affecting stake --- stake-o-matic/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stake-o-matic/src/main.rs b/stake-o-matic/src/main.rs index 1e0dcbc7f..9c2796e16 100644 --- a/stake-o-matic/src/main.rs +++ b/stake-o-matic/src/main.rs @@ -621,6 +621,11 @@ fn main() -> Result<(), Box> { let notifier = Notifier::default(); let rpc_client = RpcClient::new(config.json_rpc_url.clone()); + if !config.dry_run && notifier.is_empty() { + error!("A notifier must be active with --confirm"); + process::exit(1); + } + let source_stake_balance = validate_source_stake_account(&rpc_client, &config)?; let epoch_info = rpc_client.get_epoch_info()?;