Skip to content

Commit

Permalink
remove from + refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
gui1117 committed Aug 5, 2024
1 parent 46e26c7 commit fd01c34
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 16 deletions.
6 changes: 0 additions & 6 deletions cumulus/pallets/weight-reclaim-tx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ impl<T, S> StorageWeightReclaim<T, S> {
}
}

impl<T, S> From<S> for StorageWeightReclaim<T, S> {
fn from(s: S) -> Self {
Self(s, core::marker::PhantomData)
}
}

impl<T, S: core::fmt::Debug> core::fmt::Debug for StorageWeightReclaim<T, S> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
#[cfg(feature = "std")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ mod tests {
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),
bridge_to_bulletin_config::OnBridgeHubRococoRefundRococoBulletinMessages::default(),
),
)).into();
));

// for BridgeHubRococo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ fn construct_extrinsic(
bridge_to_westend_config::OnBridgeHubRococoRefundBridgeHubWestendMessages::default(),
bridge_to_bulletin_config::OnBridgeHubRococoRefundRococoBulletinMessages::default(),
),
))
.into();
));
let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), tx_ext)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1274,7 +1274,7 @@ mod tests {
(
bridge_to_rococo_config::OnBridgeHubWestendRefundBridgeHubRococoMessages::default(),
),
)).into();
));

{
let bh_indirect_payload = bp_bridge_hub_westend::TransactionExtension::from_params(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ fn construct_extrinsic(
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(0),
BridgeRejectObsoleteHeadersAndMessages::default(),
(bridge_to_rococo_config::OnBridgeHubWestendRefundBridgeHubRococoMessages::default(),),
))
.into();
));
let payload = SignedPayload::new(call.clone(), tx_ext.clone()).unwrap();
let signature = payload.using_encoded(|e| sender.sign(e));
UncheckedExtrinsic::new_signed(call, account_id.into(), Signature::Sr25519(signature), tx_ext)
Expand Down
3 changes: 1 addition & 2 deletions cumulus/test/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ pub fn generate_extrinsic_with_pair(
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
))
.into();
));

let function = function.into();

Expand Down
3 changes: 1 addition & 2 deletions cumulus/test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,7 @@ pub fn construct_extrinsic(
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
frame_system::CheckWeight::<runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(tip),
))
.into();
));
let raw_payload = runtime::SignedPayload::from_raw(
function.clone(),
tx_ext.clone(),
Expand Down

0 comments on commit fd01c34

Please sign in to comment.