Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Roznovjak committed Dec 18, 2024
1 parent 4b6fec2 commit 2563a14
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 33 deletions.
12 changes: 10 additions & 2 deletions integration-tests/src/kusama_test_net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub mod rococo {
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
use sp_consensus_babe::AuthorityId as BabeId;
use sp_consensus_beefy::ecdsa_crypto::AuthorityId as BeefyId;
use sp_core::{Pair, Public, sr25519};
use sp_core::{sr25519, Pair, Public};

/// Helper function to generate a crypto pair from seed
fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
Expand Down Expand Up @@ -201,7 +201,15 @@ pub mod rococo {

pub fn get_authority_keys_from_seed_no_beefy(
seed: &str,
) -> (AccountId, AccountId, BabeId, GrandpaId, ValidatorId, AssignmentId, AuthorityDiscoveryId) {
) -> (
AccountId,
AccountId,
BabeId,
GrandpaId,
ValidatorId,
AssignmentId,
AuthorityDiscoveryId,
) {
(
get_account_id_from_seed::<sr25519::Public>(&format!("{}//stash", seed)),
get_account_id_from_seed::<sr25519::Public>(seed),
Expand Down
7 changes: 1 addition & 6 deletions node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,7 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.prometheus_config(default_listen_port, chain_spec)
}

fn init<F>(
&self,
_support_url: &String,
_impl_version: &String,
_logger_hook: F,
) -> Result<()>
fn init<F>(&self, _support_url: &String, _impl_version: &String, _logger_hook: F) -> Result<()>
where
F: FnOnce(&mut sc_cli::LoggerBuilder),
{
Expand Down
6 changes: 1 addition & 5 deletions node/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ where
use substrate_state_trie_migration_rpc::{StateMigration, StateMigrationApiServer};

let mut module = RpcExtension::new(());
let FullDeps {
client,
pool,
backend,
} = deps;
let FullDeps { client, pool, backend } = deps;

module.merge(System::new(client.clone(), pool).into_rpc())?;
module.merge(TransactionPayment::new(client.clone()).into_rpc())?;
Expand Down
2 changes: 1 addition & 1 deletion node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async fn start_node_impl(

let params = new_partial(&parachain_config)?;
let (block_import, mut telemetry, telemetry_worker_handle) = params.other;

let prometheus_registry = parachain_config.prometheus_registry().cloned();
let net_config = sc_network::config::FullNetworkConfiguration::<_, _, sc_network::NetworkWorker<Block, Hash>>::new(
&parachain_config.network,
Expand Down
8 changes: 4 additions & 4 deletions pallets/xyk-liquidity-mining/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ impl hydradx_traits::liquidity_mining::Mutate<AccountId, AssetId, BlockNumber> f
}

fn update_global_farm(
_global_farm_id: GlobalFarmId,
_planned_yielding_periods: Self::Period,
_yield_per_period: Perquintill,
_min_deposit: Self::Balance
_global_farm_id: GlobalFarmId,
_planned_yielding_periods: Self::Period,
_yield_per_period: Perquintill,
_min_deposit: Self::Balance,
) -> Result<(), Self::Error> {
Err(sp_runtime::DispatchError::Other("Not implemented"))
}
Expand Down
26 changes: 11 additions & 15 deletions runtime/basilisk/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ use crate::governance::origins::GeneralAdmin;
use crate::system::NativeAssetId;

use hydradx_traits::{
AMM, AssetKind,
router::{inverse_route, AmmTradeWeights, PoolType, Trade},
AssetPairAccountIdFor, LockedBalance, OnTradeHandler, OraclePeriod, Source,
fee::{InspectTransactionFeeCurrency, SwappablePaymentAssetTrader},
router::{inverse_route, AmmTradeWeights, PoolType, Trade},
AssetKind, AssetPairAccountIdFor, LockedBalance, OnTradeHandler, OraclePeriod, Source, AMM,
};
use pallet_currencies::fungibles::FungibleCurrencies;
use pallet_currencies::BasicCurrencyAdapter;
Expand All @@ -38,7 +37,9 @@ use primitives::constants::{

use frame_support::{
parameter_types,
sp_runtime::{ArithmeticError, DispatchError, DispatchResult, app_crypto::sp_core::crypto::UncheckedFrom, traits::Zero},
sp_runtime::{
app_crypto::sp_core::crypto::UncheckedFrom, traits::Zero, ArithmeticError, DispatchError, DispatchResult,
},
traits::{
AsEnsureOriginWithArg, Contains, Currency, Defensive, EitherOf, EnsureOrigin, Get, Imbalance, LockIdentifier,
NeverEnsureOrigin, OnUnbalanced,
Expand All @@ -47,7 +48,7 @@ use frame_support::{
};
use frame_system::{EnsureRoot, RawOrigin};
use orml_tokens::CurrencyAdapter;
use orml_traits::{MultiCurrency, currency::MutationHooks};
use orml_traits::{currency::MutationHooks, MultiCurrency};

pub struct RelayChainAssetId;
impl Get<AssetId> for RelayChainAssetId {
Expand Down Expand Up @@ -166,12 +167,11 @@ impl hydradx_traits::registry::BoundErc20 for NoEvmSupport {
}
}
// impl orml_traits::MultiCurrency<AccountId> {
//
//
//
//
// }

impl MultiCurrency<AccountId> for NoEvmSupport
{
impl MultiCurrency<AccountId> for NoEvmSupport {
type CurrencyId = EvmAddress;
type Balance = Balance;

Expand Down Expand Up @@ -212,11 +212,7 @@ impl MultiCurrency<AccountId> for NoEvmSupport
Err(DispatchError::Other("EVM not supported"))
}

fn withdraw(
_contract: Self::CurrencyId,
_who: &AccountId,
_amount: Self::Balance,
) -> sp_runtime::DispatchResult {
fn withdraw(_contract: Self::CurrencyId, _who: &AccountId, _amount: Self::Balance) -> sp_runtime::DispatchResult {
Err(DispatchError::Other("EVM not supported"))
}

Expand Down Expand Up @@ -908,4 +904,4 @@ impl SwappablePaymentAssetTrader<AccountId, AssetId, Balance> for XykPaymentAsse
dest,
)
}
}
}

0 comments on commit 2563a14

Please sign in to comment.