Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge queue: embarking main (d0f62b0) and #4061 together #4069

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/unreleased/bug-fixes/4061-dump-reveal-pk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- fix the cli command 'namada client reveal_pk' to respect the
'--dump-tx' and '--dump-wrapper-tx' flags when present. this
allows offline accounts to reveal their public keys to the network
([\#4061](https://github.com/anoma/namada/pull/4061))
17 changes: 12 additions & 5 deletions crates/apps_lib/src/client/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,12 +1203,19 @@ pub async fn submit_reveal_pk<N: Namada>(
where
<N::Client as namada_sdk::io::Client>::Error: std::fmt::Display,
{
let tx_data =
submit_reveal_aux(namada, &args.tx, &(&args.public_key).into()).await?;
if args.tx.dump_tx || args.tx.dump_wrapper_tx {
let tx_data =
tx::build_reveal_pk(namada, &args.tx, &args.public_key).await?;
tx::dump_tx(namada.io(), &args.tx, tx_data.0.clone())?;
} else {
let tx_data =
submit_reveal_aux(namada, &args.tx, &(&args.public_key).into())
.await?;

if let Some((mut tx, signing_data)) = tx_data {
sign(namada, &mut tx, &args.tx, signing_data).await?;
namada.submit(tx, &args.tx).await?;
if let Some((mut tx, signing_data)) = tx_data {
sign(namada, &mut tx, &args.tx, signing_data).await?;
namada.submit(tx, &args.tx).await?;
}
}

Ok(())
Expand Down