Skip to content

Commit 7086f71

Browse files
committed
hotfix: issue with eVault
1 parent e64574e commit 7086f71

File tree

1 file changed

+16
-6
lines changed
  • infrastructure/control-panel/src/routes/monitoring

1 file changed

+16
-6
lines changed

infrastructure/control-panel/src/routes/monitoring/+page.svelte

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@
216216
w3id: data.w3id
217217
});
218218
219+
// Skip visualization if no matching eVault found
220+
if (evaultIndex === -1) {
221+
console.log('Skipping visualization - no matching eVault found');
222+
return;
223+
}
224+
219225
// Step 1: Platform creates entry locally
220226
currentFlowStep = 1;
221227
flowMessages = [
@@ -496,9 +502,13 @@
496502
console.log('getEvaultIndex called with w3id:', w3id);
497503
console.log('selectedEVaults:', selectedEVaults);
498504
499-
// Since evaultId is the same as w3id, prioritize that match
505+
// Strip the @ symbol from w3id if present
506+
const cleanW3id = w3id.replace('@', '');
507+
console.log('Cleaned w3id:', cleanW3id);
508+
509+
// Since evaultId is the same as w3id (without @), prioritize that match
500510
const index = selectedEVaults.findIndex((e) => {
501-
const matches = e.evaultId === w3id;
511+
const matches = e.evaultId === cleanW3id;
502512
503513
if (matches) {
504514
console.log('Found matching eVault by evaultId:', e);
@@ -515,15 +525,15 @@
515525
516526
// If no match found, log all available evaultIds for debugging
517527
if (index === -1) {
518-
console.log('No match found for w3id:', w3id);
528+
console.log('No match found for cleaned w3id:', cleanW3id);
519529
console.log('Available evaultIds:');
520530
selectedEVaults.forEach((evault, i) => {
521531
console.log(`eVault ${i}: evaultId = "${evault.evaultId}"`);
522532
});
523533
524-
// Fall back to index 0 if no match found
525-
console.log('Falling back to index 0');
526-
return 0;
534+
// Return -1 to indicate no match found
535+
console.log('No matching eVault found, skipping visualization');
536+
return -1;
527537
}
528538
529539
return index;

0 commit comments

Comments
 (0)