How can I match on runtime Calls from my outer node? I essentially want to "trigger" the node once a type of extrinsic is submitted. It seems like I don't have an option to emit any kind of observable from WASM, so I'm attempting to watch the import_notification_stream
from the transaction pool. This works, but now I'm struggling to unwrap the underlying call in the transaction.
let mut commands_stream = Box::pin(cloned_pool.import_notification_stream());
while let Some(tx_hash) = commands_stream.next().await {
log::info!("got hash for tx: {:?}", tx_hash);
if let Some(tx) = cloned_pool.ready_transaction(&tx_hash) {
let uxt: Block::Extrinsic = tx.data().clone();
... how to now convert to call and match