From 5c79ed37dc6485d2b3f4fc69b8cf8456b86b4e17 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile <60601340+lexnv@users.noreply.github.com> Date: Thu, 25 Jan 2024 19:07:44 +0200 Subject: [PATCH] rpc-v2/tx: Rename `transaction` to `transactionWatch` (#3040) This PR backports the changes from https://github.com/paritytech/json-rpc-interface-spec/pull/107. The `transaction` class becomes `transactionWatch`, and the other functionality remains the same. // cc @paritytech/subxt-team --------- Signed-off-by: Alexandru Vasile --- prdoc/pr_3040.prdoc | 14 ++++++++++++++ .../client/rpc-spec-v2/src/transaction/api.rs | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 prdoc/pr_3040.prdoc diff --git a/prdoc/pr_3040.prdoc b/prdoc/pr_3040.prdoc new file mode 100644 index 000000000000..01f3d731c69c --- /dev/null +++ b/prdoc/pr_3040.prdoc @@ -0,0 +1,14 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Rename transaction to transactionWatch + +doc: + - audience: Node Dev + description: | + Renamed `transaction_unstable_submitAndWatch` to `transactionWatch_unstable_submitAndWatch`, + `transaction_unstable_watchEvent` to `transactionWatch_unstable_watchEvent` and + `transaction_unstable_unwatch` to `transactionWatch_unstable_unwatch`. + +crates: +- name: sc-rpc-spec-v2 diff --git a/substrate/client/rpc-spec-v2/src/transaction/api.rs b/substrate/client/rpc-spec-v2/src/transaction/api.rs index 3eb6cb204f24..53c83b662a35 100644 --- a/substrate/client/rpc-spec-v2/src/transaction/api.rs +++ b/substrate/client/rpc-spec-v2/src/transaction/api.rs @@ -29,8 +29,8 @@ pub trait TransactionApi { /// See [`TransactionEvent`](crate::transaction::event::TransactionEvent) for details on /// transaction life cycle. #[subscription( - name = "transaction_unstable_submitAndWatch" => "transaction_unstable_watchEvent", - unsubscribe = "transaction_unstable_unwatch", + name = "transactionWatch_unstable_submitAndWatch" => "transactionWatch_unstable_watchEvent", + unsubscribe = "transactionWatch_unstable_unwatch", item = TransactionEvent, )] fn submit_and_watch(&self, bytes: Bytes);