mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 11:51:12 +00:00
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:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user