File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -171,7 +171,10 @@ export class MigrationController {
171171 } ) ;
172172 }
173173
174- await this . processMigration ( migrationId ) ;
174+ // Fire and forget - don't block eID wallet UI
175+ this . processMigration ( migrationId ) . catch ( ( error ) => {
176+ console . error ( `Migration ${ migrationId } failed:` , error ) ;
177+ } ) ;
175178
176179 return res . status ( 200 ) . json ( {
177180 success : true ,
Original file line number Diff line number Diff line change @@ -414,7 +414,7 @@ export class MigrationService extends EventEmitter {
414414 migration : Migration ,
415415 ) : Promise < number > {
416416 const graphqlUrl = new URL ( "/graphql" , newEvaultUri ) . toString ( ) ;
417- const batchSize = 50 ; // Process in batches to avoid timeout
417+ const batchSize = 10 ; // Process in batches to avoid 413 payload too large
418418 let totalCreated = 0 ;
419419
420420 const mutation = `
Original file line number Diff line number Diff line change @@ -76,6 +76,15 @@ export class SigningService extends EventEmitter {
7676 return { success : false , error : "Session expired" } ;
7777 }
7878
79+ // Verify signer's w3id matches the migration owner's eName
80+ const expectedEName = session . data . eName as string ;
81+ if ( w3id !== expectedEName ) {
82+ return {
83+ success : false ,
84+ error : `Signer w3id (${ w3id } ) does not match migration owner (${ expectedEName } )` ,
85+ } ;
86+ }
87+
7988 // Verify signature (simplified - in production, use proper signature verification)
8089 // For now, we'll just check that signature exists
8190 if ( ! signature ) {
You can’t perform that action at this time.
0 commit comments