From fae58f23929396ca4a91372bb764badf3a8e8da6 Mon Sep 17 00:00:00 2001 From: Judd Keppel Date: Fri, 13 Oct 2023 12:17:47 -0500 Subject: [PATCH] Declare with nBTC if declare amount is 0 --- src/bin/nomic.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/bin/nomic.rs b/src/bin/nomic.rs index f7c8f6eb..c70ca1eb 100644 --- a/src/bin/nomic.rs +++ b/src/bin/nomic.rs @@ -884,6 +884,19 @@ impl DeclareCmd { min_self_delegation: self.min_self_delegation.into(), }; + // declare with nBTC if amount is 0 + if self.amount == 0 { + return Ok(self + .config + .client() + .with_wallet(wallet()) + .call( + |app| build_call!(app.declare_with_nbtc(declaration.clone())), + |app| build_call!(app.app_noop()), + ) + .await?); + } + Ok(self .config .client()