From feafbab1a9ef8b718031d3345cbb1d3d028a151c Mon Sep 17 00:00:00 2001 From: Thomas Niederberger <781000+Niederb@users.noreply.github.com> Date: Mon, 2 Sep 2024 07:43:14 +0200 Subject: [PATCH] - Change the file name as the calls are not unstable anymore (#798) - Given that the calls are stable we don't need to verify that they exist --- .github/workflows/ci.yml | 2 +- ..._rpc_api_calls.rs => new_json_rpc_api_calls.rs} | 14 -------------- 2 files changed, 1 insertion(+), 15 deletions(-) rename examples/async/examples/{unstable_rpc_api_calls.rs => new_json_rpc_api_calls.rs} (90%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f44e0b560..46c480ba7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -215,7 +215,7 @@ jobs: staking_batch_payout, subscribe_events, sudo, - unstable_rpc_api_calls, + new_json_rpc_api_calls, transfer_with_tungstenite_client, transfer_with_ws_client, author_tests, diff --git a/examples/async/examples/unstable_rpc_api_calls.rs b/examples/async/examples/new_json_rpc_api_calls.rs similarity index 90% rename from examples/async/examples/unstable_rpc_api_calls.rs rename to examples/async/examples/new_json_rpc_api_calls.rs index 46b32985a..e60df757d 100644 --- a/examples/async/examples/unstable_rpc_api_calls.rs +++ b/examples/async/examples/new_json_rpc_api_calls.rs @@ -48,25 +48,11 @@ async fn main() { let json_string = serde_json::to_string(&json_value).unwrap(); println!("Available methods: {json_string} \n"); - // Since it's an unstable api and might change anytime, we first check if our calls are still - // available: let chain_name_request = "chainSpec_v1_chainName"; let chain_genesis_hash_request = "chainSpec_v1_genesisHash"; let transaction_submit_watch = "transactionWatch_v1_submitAndWatch"; let transaction_unwatch = "transactionWatch_v1_unwatch"; - let request_vec = [ - chain_name_request, - chain_genesis_hash_request, - transaction_submit_watch, - transaction_unwatch, - ]; - for request in request_vec { - if !json_string.contains(request) { - panic!("Api has changed, please update the call {request}."); - } - } - // Submit the above defiend rpc requests: let chain_name: String = api.client().request(chain_name_request, rpc_params![]).await.unwrap(); println!("Our chain is called: {chain_name}");