Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ export class MigrationController {
});
}

await this.processMigration(migrationId);
// Fire and forget - don't block eID wallet UI
this.processMigration(migrationId).catch((error) => {
console.error(`Migration ${migrationId} failed:`, error);
});

return res.status(200).json({
success: true,
Expand Down
2 changes: 1 addition & 1 deletion platforms/emover-api/src/services/MigrationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export class MigrationService extends EventEmitter {
migration: Migration,
): Promise<number> {
const graphqlUrl = new URL("/graphql", newEvaultUri).toString();
const batchSize = 50; // Process in batches to avoid timeout
const batchSize = 10; // Process in batches to avoid 413 payload too large
let totalCreated = 0;

const mutation = `
Expand Down
9 changes: 9 additions & 0 deletions platforms/emover-api/src/services/SigningService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ export class SigningService extends EventEmitter {
return { success: false, error: "Session expired" };
}

// Verify signer's w3id matches the migration owner's eName
const expectedEName = session.data.eName as string;
if (w3id !== expectedEName) {
return {
success: false,
error: `Signer w3id (${w3id}) does not match migration owner (${expectedEName})`,
};
}

// Verify signature (simplified - in production, use proper signature verification)
// For now, we'll just check that signature exists
if (!signature) {
Expand Down