Update to jsonrpsee 0.7 and impl Stream on TransactionProgress (#380)

* Update to jsonrpsee 0.7 and impl Stream on TransactionProgress

* Fix doc links after rename to next_item

* Add another doc comment
This commit is contained in:
James Wilson
2022-01-04 15:05:53 +00:00
committed by GitHub
parent 3fb4c7089a
commit 26258c84cc
8 changed files with 126 additions and 100 deletions
+3 -1
View File
@@ -22,6 +22,7 @@
//! polkadot --dev --tmp
//! ```
use futures::StreamExt;
use sp_keyring::AccountKeyring;
use subxt::{
ClientBuilder,
@@ -144,7 +145,8 @@ async fn handle_transfer_events() -> Result<(), Box<dyn std::error::Error>> {
.sign_and_submit_then_watch(&signer)
.await?;
while let Some(ev) = balance_transfer_progress.next().await? {
while let Some(ev) = balance_transfer_progress.next().await {
let ev = ev?;
use subxt::TransactionStatus::*;
// Made it into a block, but not finalized.