Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
haerdib committed Nov 28, 2023
1 parent b06d7dc commit e1d98f5
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/api/rpc_api/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,46 +334,3 @@ where
Err(Error::NoStream)
}
}

#[maybe_async::maybe_async(?Send)]
impl<T, Client> SubmitAndWatchUntilSuccess for Api<T, Client>
where
T: Config,
Client: Subscribe + Request,
{
type Client = Client;
type Hash = T::Hash;

async fn submit_and_watch_extrinsic_until_success<Address, Call, Signature, SignedExtra>(
&self,
extrinsic: UncheckedExtrinsicV4<Address, Call, Signature, SignedExtra>,
wait_for_finalized: bool,
) -> Result<ExtrinsicReport<Self::Hash>>
where
Address: Encode,
Call: Encode,
Signature: Encode,
SignedExtra: Encode,
{
let xt_status = match wait_for_finalized {
true => XtStatus::Finalized,
false => XtStatus::InBlock,
};

self.submit_and_watch_opaque_extrinsic_until(&extrinsic.encode().into(), xt_status)
.await
}

async fn submit_and_watch_opaque_extrinsic_until_success(
&self,
encoded_extrinsic: &Bytes,
wait_for_finalized: bool,
) -> Result<ExtrinsicReport<Self::Hash>> {
let xt_status = match wait_for_finalized {
true => XtStatus::Finalized,
false => XtStatus::InBlock,
};

self.submit_and_watch_opaque_extrinsic_until(encoded_extrinsic, xt_status).await
}
}

0 comments on commit e1d98f5

Please sign in to comment.