Stabilize transactionWatch methods (#1539)

* 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>
This commit is contained in:
Alexandru Vasile
2024-04-20 15:31:05 +03:00
committed by GitHub
parent c57df0845c
commit 33a891b9da
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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();
+3 -3
View File
@@ -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?;
@@ -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;
@@ -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();