Skip to content

Commit

Permalink
Simplification: Merge bridge_owner_account / deposit to optional …
Browse files Browse the repository at this point in the history
…`Deposit` struct (we will need because we don't want/have `Location::Here` converter)
  • Loading branch information
bkontur committed Oct 25, 2024
1 parent dbc3a8f commit b48b8a5
Show file tree
Hide file tree
Showing 5 changed files with 222 additions and 106 deletions.
7 changes: 1 addition & 6 deletions bridges/modules/xcm-bridge-hub/src/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ mod tests {
use bp_xcm_bridge_hub::{Bridge, BridgeLocations, BridgeState};
use frame_support::assert_ok;
use pallet_bridge_messages::InboundLaneStorage;
use xcm_executor::traits::ConvertLocation;

fn bridge() -> (Box<BridgeLocations>, TestLaneIdType) {
let origin = OpenBridgeOrigin::sibling_parachain_origin();
Expand Down Expand Up @@ -157,11 +156,7 @@ mod tests {
bridge.bridge_destination_universal_location().clone().into(),
),
state: BridgeState::Opened,
bridge_owner_account: LocationToAccountId::convert_location(
bridge.bridge_origin_relative_location(),
)
.expect("valid accountId"),
deposit: 0,
deposit: None,
lane_id,
},
);
Expand Down
11 changes: 3 additions & 8 deletions bridges/modules/xcm-bridge-hub/src/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ mod tests {
use frame_support::assert_ok;
use pallet_bridge_messages::InboundLaneStorage;
use xcm_builder::{NetworkExportTable, UnpaidRemoteExporter};
use xcm_executor::traits::{export_xcm, ConvertLocation};
use xcm_executor::traits::export_xcm;

fn universal_source() -> InteriorLocation {
SiblingUniversalLocation::get()
Expand Down Expand Up @@ -402,11 +402,7 @@ mod tests {
locations.bridge_destination_universal_location().clone().into(),
),
state: BridgeState::Opened,
bridge_owner_account: LocationToAccountId::convert_location(
locations.bridge_origin_relative_location(),
)
.expect("valid accountId"),
deposit: 0,
deposit: None,
lane_id,
},
);
Expand Down Expand Up @@ -618,8 +614,7 @@ mod tests {
locations.bridge_destination_universal_location().clone().into(),
),
state: BridgeState::Opened,
bridge_owner_account: [0u8; 32].into(),
deposit: 0,
deposit: None,
lane_id: expected_lane_id,
},
);
Expand Down
Loading

0 comments on commit b48b8a5

Please sign in to comment.