Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
correct relay network check
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Oct 30, 2023
1 parent ea063f7 commit 82c44e8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ impl ExportXcm for BridgeHubRococoOrBridgeHubWococoSwitchExporter {
destination: &mut Option<InteriorMultiLocation>,
message: &mut Option<Xcm<()>>,
) -> SendResult<Self::Ticket> {
let relay: NetworkId = RelayNetwork::get();
match network {
Rococo => ToBridgeHubRococoHaulBlobExporter::validate(
network,
Expand All @@ -435,7 +436,7 @@ impl ExportXcm for BridgeHubRococoOrBridgeHubWococoSwitchExporter {
message,
)
.map(|result| ((Wococo, result.0), result.1)),
location if location == EthereumNetwork::get() && network == Rococo => {
location if location == EthereumNetwork::get() && relay == Rococo => {
SnowbridgeExporter::validate(
network,
channel,
Expand All @@ -451,10 +452,11 @@ impl ExportXcm for BridgeHubRococoOrBridgeHubWococoSwitchExporter {

fn deliver(ticket: Self::Ticket) -> Result<XcmHash, SendError> {
let (network, ticket) = ticket;
let relay: NetworkId = RelayNetwork::get();
match network {
Rococo => ToBridgeHubRococoHaulBlobExporter::deliver(ticket),
Wococo => ToBridgeHubWococoHaulBlobExporter::deliver(ticket),
location if location == EthereumNetwork::get() && network == Rococo =>
location if location == EthereumNetwork::get() && relay == Rococo =>
SnowbridgeExporter::deliver(ticket),
_ => unimplemented!("Unsupported network: {:?}", network),
}
Expand Down

0 comments on commit 82c44e8

Please sign in to comment.