Skip to content

Commit

Permalink
rpc-v2/tx: Rename transaction to transactionWatch (paritytech#3040)
Browse files Browse the repository at this point in the history
This PR backports the changes from
paritytech/json-rpc-interface-spec#107.

The `transaction` class becomes `transactionWatch`, and the other
functionality remains the same.

// cc @paritytech/subxt-team

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
  • Loading branch information
lexnv authored Jan 25, 2024
1 parent 47e46d1 commit 5c79ed3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions prdoc/pr_3040.prdoc
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions substrate/client/rpc-spec-v2/src/transaction/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ pub trait TransactionApi<Hash: Clone> {
/// 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<Hash>,
)]
fn submit_and_watch(&self, bytes: Bytes);
Expand Down

0 comments on commit 5c79ed3

Please sign in to comment.