Skip to content

Commit

Permalink
chore: remove unneeded validate params functions in base rpc api
Browse files Browse the repository at this point in the history
  • Loading branch information
j4m1ef0rd committed Nov 12, 2024
1 parent ef9e3a7 commit 7533846
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions engine/src/state_chain_observer/client/base_rpc_api.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use async_trait::async_trait;
use cf_primitives::BlockNumber;
use jsonrpsee::core::client::{ClientT, Subscription, SubscriptionClientT};
use sc_transaction_pool_api::TransactionStatus;
use sp_core::{
Expand Down Expand Up @@ -168,19 +167,6 @@ pub trait BaseRpcApi {
params: Option<Box<RawValue>>,
unsub: &str,
) -> RpcResult<Subscription<Box<RawValue>>>;

async fn validate_refund_params(
&self,
retry_duration: BlockNumber,
block_hash: Option<state_chain_runtime::Hash>,
) -> RpcResult<()>;

async fn validate_dca_params(
&self,
number_of_chunks: u32,
chunk_interval: u32,
block_hash: Option<state_chain_runtime::Hash>,
) -> RpcResult<()>;
}

pub struct BaseRpcClient<RawRpcClient> {
Expand Down Expand Up @@ -318,25 +304,6 @@ impl<RawRpcClient: RawRpcApi + Send + Sync> BaseRpcApi for BaseRpcClient<RawRpcC
) -> RpcResult<Subscription<Box<RawValue>>> {
self.raw_rpc_client.subscribe(sub, Params(params), unsub).await
}

async fn validate_refund_params(
&self,
retry_duration: BlockNumber,
block_hash: Option<state_chain_runtime::Hash>,
) -> RpcResult<()> {
self.raw_rpc_client.cf_validate_refund_params(retry_duration, block_hash).await
}

async fn validate_dca_params(
&self,
number_of_chunks: u32,
chunk_interval: u32,
block_hash: Option<state_chain_runtime::Hash>,
) -> RpcResult<()> {
self.raw_rpc_client
.cf_validate_dca_params(number_of_chunks, chunk_interval, block_hash)
.await
}
}

struct Params(Option<Box<RawValue>>);
Expand Down

0 comments on commit 7533846

Please sign in to comment.