Skip to content

Commit b2c9681

Browse files
authored
Merge pull request #3177 from DFXswiss/develop
Release: develop -> main
2 parents ed8275a + bce00a2 commit b2c9681

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

src/config/config.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,15 @@ export class Configuration {
311311
fileTypes: [ContentType.PDF],
312312
},
313313
{
314-
name: (file: KycFileBlob) => `IdentDoc_${file.name.split('/').pop()?.split('.')[0] ?? 'unknown'}`,
314+
name: (file: KycFileBlob) => file.name.split('/').pop()?.split('.')[0] ?? 'IdentDoc',
315315
prefixes: (userData: UserData) => [`user/${userData.id}/Identification`],
316316
fileTypes: [ContentType.PNG, ContentType.JPEG, ContentType.JPG],
317+
filter: (file: KycFileBlob, userData: UserData) => {
318+
const latestIdent = userData.kycSteps
319+
.filter((s) => s.name === KycStepName.IDENT && s.isCompleted && s.transactionId)
320+
.sort((a, b) => b.id - a.id)[0];
321+
return latestIdent ? file.name.includes(latestIdent.transactionId) : false;
322+
},
317323
selectAll: true,
318324
handleFileNotFound: () => true,
319325
},
@@ -514,6 +520,20 @@ export class Configuration {
514520
},
515521
],
516522
},
523+
{
524+
id: 16,
525+
name: 'TMER',
526+
files: [
527+
{
528+
name: (file: KycFileBlob) => file.name.split('/').pop()?.split('.')[0] ?? 'TMER',
529+
prefixes: (userData: UserData) => [`user/${userData.id}/UserNotes`],
530+
fileTypes: [ContentType.PDF],
531+
filter: (file: KycFileBlob) => file.name.includes('-TMER-'),
532+
selectAll: true,
533+
handleFileNotFound: () => true,
534+
},
535+
],
536+
},
517537
];
518538

519539
support = {

0 commit comments

Comments
 (0)