Skip to content

Commit

Permalink
FIX: Changing Relays (#1707)
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoPlays authored Feb 20, 2024
1 parent 6459408 commit 51ea60d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions launcher/src/components/UI/services-modal/MevboostModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,20 @@ export default {
ControlService.getServiceConfig(this.mevService.config.serviceID)
.then((service) => {
if (service && service.entrypoint) {
this.serviceConfig = service;
const relayEntryPointIndex = service.entrypoint.findIndex((e) => e === "-relays");
if (relayEntryPointIndex !== -1 && relayEntryPointIndex + 1 < service.entrypoint.length) {
const relayURLs = service.entrypoint[relayEntryPointIndex + 1].split(",");
relayURLs.forEach((relay) => {
let relayData = this.relaysList.find((r) => r[this.currentNetwork.network.toLowerCase()] === relay);
if (relayData) this.checkedRelays.push(relayData);
});
if (service.entrypoint[relayEntryPointIndex + 1]) {
const relayURLs = service.entrypoint[relayEntryPointIndex + 1].split(",");
relayURLs.forEach((relay) => {
let relayData = this.relaysList.find((r) => r[this.currentNetwork.network.toLowerCase()] === relay);
if (relayData) this.checkedRelays.push(relayData);
});
}
} else {
console.error("Invalid or missing -relays entry in service entrypoint");
// Handle the error or add appropriate fallback logic.
}
this.serviceConfig = service;
} else {
console.error("Invalid service or missing entrypoint");
// Handle the error or add appropriate fallback logic.
Expand Down Expand Up @@ -179,6 +181,9 @@ export default {
this.$emit("closeWindow");
}, 2000);
});
} else {
this.loading = false;
console.error("Invalid service or missing entrypoint");
}
},
closeWindow() {
Expand Down

0 comments on commit 51ea60d

Please sign in to comment.