Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize transactionWatch methods #1539

Merged
merged 4 commits into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion subxt/src/backend/unstable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for UnstableBackend<T> {
// Then, submit the transaction.
let mut tx_progress = self
.methods
.transaction_unstable_submit_and_watch(extrinsic)
.transactionwatch_v1_submit_and_watch(extrinsic)
.await?;

let mut seen_blocks = HashMap::new();
Expand Down
6 changes: 3 additions & 3 deletions subxt/src/backend/unstable/rpc_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,16 +263,16 @@ impl<T: Config> UnstableRpcMethods<T> {
}

/// Attempt to submit a transaction, returning events about its progress.
pub async fn transaction_unstable_submit_and_watch(
pub async fn transactionwatch_v1_submit_and_watch(
&self,
tx: &[u8],
) -> Result<TransactionSubscription<T::Hash>, Error> {
let sub = self
.client
.subscribe(
"transactionWatch_unstable_submitAndWatch",
"transactionWatch_v1_submitAndWatch",
rpc_params![to_hex(tx)],
"transactionWatch_unstable_unwatch",
"transactionWatch_v1_unwatch",
)
.await?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ async fn chainspec_v1_properties() {

#[cfg(fullclient)]
#[subxt_test]
async fn transaction_unstable_submit_and_watch() {
async fn transactionwatch_v1_submit_and_watch() {
let ctx = test_context().await;
let rpc = ctx.unstable_rpc_methods().await;

Expand All @@ -274,7 +274,7 @@ async fn transaction_unstable_submit_and_watch() {

// Test submitting it:
let mut sub = rpc
.transaction_unstable_submit_and_watch(&tx_bytes)
.transactionwatch_v1_submit_and_watch(&tx_bytes)
.await
.unwrap();

Expand Down
Loading