Skip to content

Commit

Permalink
clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeddes committed Nov 13, 2023
1 parent 7406b35 commit 50540cd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions parachain/primitives/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ use scale_info::TypeInfo;
use sp_core::H256;
use sp_io::hashing::keccak_256;
use sp_runtime::{traits::AccountIdConversion, RuntimeDebug};
use sp_std::prelude::*;
use xcm::prelude::{Junction::Parachain, Junctions::X1, MultiLocation};

/// The ID of an agent contract
Expand Down Expand Up @@ -67,8 +68,7 @@ fn derive_channel_id_for_sibling(para_id: ParaId) -> ChannelId {
let para_id: u32 = para_id.into();
let para_id_bytes: [u8; 4] = para_id.to_be_bytes();
let prefix: [u8; 4] = *b"para";
let preimage: Vec<u8> =
prefix.into_iter().chain(para_id_bytes.into_iter()).map(|v| v).collect();
let preimage: Vec<u8> = prefix.into_iter().chain(para_id_bytes.into_iter()).collect();
keccak_256(&preimage).into()
}

Expand All @@ -80,7 +80,7 @@ impl ChannelId {

impl From<ParaId> for ChannelId {
fn from(value: ParaId) -> Self {
derive_channel_id_for_sibling(value.into())
derive_channel_id_for_sibling(value)
}
}

Expand Down
7 changes: 6 additions & 1 deletion smoketest/tests/send_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ async fn send_token() {
// Lock tokens into vault
let amount: u128 = U256::from(value).low_u128();
let receipt = gateway
.send_token(weth.address(), 1000.into(), FERDIE, amount)
.send_token_with_token_and_destination_chain_and_destination_address(
weth.address(),
1000,
FERDIE,
amount,
)
.value(1000)
.send()
.await
Expand Down
4 changes: 2 additions & 2 deletions smoketest/tests/set_token_transfer_fees.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ethers::prelude::Address;
use snowbridge_smoketest::{
constants::*,
contracts::{i_gateway, i_gateway::SetTokenTransferFeesFilter},
contracts::{i_gateway, i_gateway::TokenTransferFeesChangedFilter},
helper::*,
parachains::bridgehub::api::{
ethereum_control::events::SetTokenTransferFees,
Expand Down Expand Up @@ -32,7 +32,7 @@ async fn set_token_transfer_fees() {

wait_for_bridgehub_event::<SetTokenTransferFees>(&test_clients.bridge_hub_client).await;

wait_for_ethereum_event::<SetTokenTransferFeesFilter>(&test_clients.ethereum_client).await;
wait_for_ethereum_event::<TokenTransferFeesChangedFilter>(&test_clients.ethereum_client).await;

let fees = gateway.token_transfer_fees().await.expect("get fees");
println!("asset fees {:?}", fees);
Expand Down

0 comments on commit 50540cd

Please sign in to comment.