feat: add transaction output after pinata call

This commit is contained in:
Daniil Polyakov 2025-11-30 02:37:43 +03:00
parent a8abec196b
commit 2cf60fff10

View File

@ -1,7 +1,6 @@
use anyhow::Result; use anyhow::Result;
use clap::Subcommand; use clap::Subcommand;
use common::{PINATA_BASE58, transaction::NSSATransaction}; use common::{PINATA_BASE58, transaction::NSSATransaction};
use log::info;
use crate::{ use crate::{
WalletCore, WalletCore,
@ -125,7 +124,19 @@ impl WalletSubcommand for PinataProgramSubcommandPublic {
solution, solution,
) )
.await?; .await?;
info!("Results of tx send is {res:#?}");
println!("Results of tx send is {res:#?}");
let tx_hash = res.tx_hash;
let transfer_tx = wallet_core
.poll_native_token_transfer(tx_hash.clone())
.await?;
println!("Transaction data is {transfer_tx:?}");
let path = wallet_core.store_persistent_data().await?;
println!("Stored persistent accounts at {path:#?}");
Ok(SubcommandReturnValue::Empty) Ok(SubcommandReturnValue::Empty)
} }
@ -151,13 +162,15 @@ impl WalletSubcommand for PinataProgramSubcommandPrivate {
.claim_private_owned_account(pinata_account_id, winner_account_id, solution) .claim_private_owned_account(pinata_account_id, winner_account_id, solution)
.await?; .await?;
info!("Results of tx send is {res:#?}"); println!("Results of tx send is {res:#?}");
let tx_hash = res.tx_hash; let tx_hash = res.tx_hash;
let transfer_tx = wallet_core let transfer_tx = wallet_core
.poll_native_token_transfer(tx_hash.clone()) .poll_native_token_transfer(tx_hash.clone())
.await?; .await?;
println!("Transaction data is {transfer_tx:?}");
if let NSSATransaction::PrivacyPreserving(tx) = transfer_tx { if let NSSATransaction::PrivacyPreserving(tx) = transfer_tx {
let acc_decode_data = vec![(secret_winner, winner_account_id)]; let acc_decode_data = vec![(secret_winner, winner_account_id)];