diff --git a/src/txes/processor.rs b/src/txes/processor.rs index 5b16eff..46add5e 100644 --- a/src/txes/processor.rs +++ b/src/txes/processor.rs @@ -1,4 +1,4 @@ -use std::ops::Div; + use std::sync::Arc; use crate::subxt::utils::H256; @@ -246,28 +246,30 @@ async fn handle_substrate_native_tx( let tx_hash = tx_result.extrinsic_hash(); - let events = tx_result - .wait_for_finalized_success() - .await - .map_err(|e| Error::Custom(e.to_string()))?; - let block_hash = events.block_hash(); + println!("Tranasction sent with TxHash: {:?}", tx_hash); - // Find a Transfer event and print it. - let transfer_event = events - .find_first::() - .map_err(|e| Error::Custom(e.to_string()))?; - if let Some(event) = transfer_event { - let from = event.from; - let to = event.to; - let amount = event.amount.div(10u128.pow(18)); - println!("Transfered {amount} tokens {from} -> {to}"); - } + // let events = tx_result + // .wait_for_finalized_success() + // .await + // .map_err(|e| Error::Custom(e.to_string()))?; + // let block_hash = events.block_hash(); + + // // Find a Transfer event and print it. + // let transfer_event = events + // .find_first::() + // .map_err(|e| Error::Custom(e.to_string()))?; + // if let Some(event) = transfer_event { + // let from = event.from; + // let to = event.to; + // let amount = event.amount.div(10u128.pow(18)); + // println!("Transfered {amount} tokens {from} -> {to}"); + // } // Return the transaction hash. result_sender .send(Ok(TxResult::Substrate { tx_hash, - block_hash, + block_hash: tx_hash, })) .map_err(|e| { Error::Custom(format!("Failed to send tx_hash: {:?}", e))