Skip to content

Commit

Permalink
Stabilize transactionWatch methods (#1539)
Browse files Browse the repository at this point in the history
* Stabilize transactionWatch

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

* Keep consistency in naming method class

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
  • Loading branch information
lexnv and niklasad1 authored Apr 20, 2024
1 parent c57df08 commit 33a891b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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

0 comments on commit 33a891b

Please sign in to comment.