Skip to content

Commit

Permalink
Fixed chenks
Browse files Browse the repository at this point in the history
  • Loading branch information
zktony committed Dec 14, 2023
1 parent 3e5538f commit 77cd28f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions rpc/swap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,13 @@ use jsonrpsee::{
types::error::{CallError, ErrorObject},
};
pub use pallet_asset_conversion::AssetConversionApi;
use pallet_asset_conversion::{NativeOrAssetId, NativeOrAssetIdConverter};
use parity_scale_codec::{Codec, Decode};
use polkadex_primitives::AssetId;
use sc_rpc_api::DenyUnsafe;
use sp_api::{ApiExt, ProvideRuntimeApi};
use sp_api::ProvideRuntimeApi;
use sp_blockchain::HeaderBackend;
use sp_core::offchain::{storage::OffchainDb, OffchainDbExt, OffchainStorage};
use sp_runtime::traits::Block as BlockT;
use std::sync::Arc;

const RUNTIME_ERROR: i32 = 1;
const RETRIES: u8 = 3;

#[rpc(client, server)]
pub trait PolkadexSwapRpcApi<BlockHash> {
Expand Down Expand Up @@ -99,7 +94,7 @@ where
amount: u128,
include_fee: bool,
) -> RpcResult<Option<u128>> {
let mut api = self.client.runtime_api();
let api = self.client.runtime_api();
let at = match at {
Some(at) => at,
None => self.client.info().best_hash,
Expand All @@ -118,7 +113,7 @@ where
amount: u128,
include_fee: bool,
) -> RpcResult<Option<u128>> {
let mut api = self.client.runtime_api();
let api = self.client.runtime_api();
let at = match at {
Some(at) => at,
None => self.client.info().best_hash,
Expand Down

0 comments on commit 77cd28f

Please sign in to comment.