Skip to content

Commit

Permalink
Declare with nBTC if declare amount is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
keppel committed Oct 13, 2023
1 parent 6f5b99c commit fae58f2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/bin/nomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fae58f2

Please sign in to comment.