@procivis/one-react-native-components 0.3.86 → 0.3.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/lib/commonjs/components/credential/credential.js +2 -8
  2. package/lib/commonjs/components/credential/credential.js.map +1 -1
  3. package/lib/commonjs/components/entity/entity-attributes.js +3 -1
  4. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -1
  6. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  7. package/lib/commonjs/components/proof-request/v1/select-credential.js +2 -8
  8. package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
  9. package/lib/commonjs/components/proof-request/v1/share-credential.js +2 -8
  10. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
  11. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js +2 -6
  12. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
  13. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +2 -6
  14. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  15. package/lib/commonjs/utils/hooks/core/cache.js +4 -1
  16. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  17. package/lib/commonjs/utils/hooks/core/credentials.js +1 -7
  18. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  19. package/lib/commonjs/utils/hooks/core/proofs.js +2 -5
  20. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  21. package/lib/commonjs/utils/hooks/core/wallet-unit.js +28 -37
  22. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  23. package/lib/commonjs/utils/index.js +0 -12
  24. package/lib/commonjs/utils/index.js.map +1 -1
  25. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +4 -4
  26. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  27. package/lib/commonjs/utils/parsers/credential-sharing.js +6 -6
  28. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  29. package/lib/commonjs/utils/parsers/credential.js +9 -25
  30. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  31. package/lib/module/components/credential/credential.js +2 -8
  32. package/lib/module/components/credential/credential.js.map +1 -1
  33. package/lib/module/components/entity/entity-attributes.js +3 -1
  34. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  35. package/lib/module/components/entity/entity-details-with-buttons.js +2 -1
  36. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  37. package/lib/module/components/proof-request/v1/select-credential.js +2 -8
  38. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  39. package/lib/module/components/proof-request/v1/share-credential.js +2 -8
  40. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  41. package/lib/module/components/proof-request/v2/select-credential-v2.js +3 -7
  42. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  43. package/lib/module/components/proof-request/v2/share-credential-v2.js +3 -7
  44. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  45. package/lib/module/utils/hooks/core/cache.js +4 -1
  46. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  47. package/lib/module/utils/hooks/core/credentials.js +1 -7
  48. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  49. package/lib/module/utils/hooks/core/proofs.js +2 -5
  50. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  51. package/lib/module/utils/hooks/core/wallet-unit.js +26 -35
  52. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  53. package/lib/module/utils/index.js +0 -1
  54. package/lib/module/utils/index.js.map +1 -1
  55. package/lib/module/utils/parsers/credential-sharing-v2.js +4 -4
  56. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  57. package/lib/module/utils/parsers/credential-sharing.js +6 -6
  58. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  59. package/lib/module/utils/parsers/credential.js +10 -26
  60. package/lib/module/utils/parsers/credential.js.map +1 -1
  61. package/lib/typescript/components/entity/entity-attributes.d.ts +1 -0
  62. package/lib/typescript/utils/hooks/core/credentials.d.ts +1 -0
  63. package/lib/typescript/utils/hooks/core/proofs.d.ts +0 -3
  64. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +7 -7
  65. package/lib/typescript/utils/index.d.ts +0 -1
  66. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +2 -3
  67. package/lib/typescript/utils/parsers/credential-sharing.d.ts +3 -4
  68. package/lib/typescript/utils/parsers/credential.d.ts +6 -10
  69. package/package.json +4 -4
  70. package/src/components/credential/credential.tsx +1 -5
  71. package/src/components/entity/entity-attributes.tsx +3 -0
  72. package/src/components/entity/entity-details-with-buttons.tsx +1 -0
  73. package/src/components/proof-request/v1/select-credential.tsx +1 -5
  74. package/src/components/proof-request/v1/share-credential.tsx +1 -5
  75. package/src/components/proof-request/v2/select-credential-v2.tsx +2 -9
  76. package/src/components/proof-request/v2/share-credential-v2.tsx +2 -11
  77. package/src/utils/hooks/core/cache.ts +3 -0
  78. package/src/utils/hooks/core/credentials.ts +3 -2
  79. package/src/utils/hooks/core/proofs.ts +4 -10
  80. package/src/utils/hooks/core/wallet-unit.ts +31 -37
  81. package/src/utils/index.ts +0 -1
  82. package/src/utils/parsers/credential-sharing-v2.tsx +0 -5
  83. package/src/utils/parsers/credential-sharing.tsx +34 -35
  84. package/src/utils/parsers/credential.ts +3 -30
  85. package/lib/commonjs/utils/wallet-unit.js +0 -30
  86. package/lib/commonjs/utils/wallet-unit.js.map +0 -1
  87. package/lib/module/utils/wallet-unit.js +0 -22
  88. package/lib/module/utils/wallet-unit.js.map +0 -1
  89. package/lib/typescript/utils/wallet-unit.d.ts +0 -8
  90. package/src/utils/wallet-unit.ts +0 -30
@@ -1 +1 @@
1
- {"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","WalletStorageType","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","WUAState","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","credentialDetailFromCredential","wuaState","labels","_formatDateTimeLocali","_credential$issuanceD","layoutProperties","walletStorageType","EUDI_COMPLIANT","credentialDetailPrimary","wuaRevoked","credentialDetailErrorColor","credentialDetailTestID","statusIcon","suspendEndDate","suspendedUntil","suspended","revoked","Expired","wuaExpired","validityIssues","issuanceDate","createdDate","credentialDetailSecondary","primary","primaryAttribute","secondary","secondaryAttribute","cardHeaderFromCredential","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","String","date","Picture","SwiyuPicture","_typeConfig$params","params","showAs","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInParent","join","nestAttributeInDummyParent","pathParts","listValue","disabled","_parent$attributes","nextParent","_parent$values","_parent$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n WalletStorageType,\n} from '@procivis/react-native-one-core';\nimport { FC } from 'react';\nimport { SvgProps } from 'react-native-svg';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { WUAState } from '../wallet-unit';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n wuaExpired: string;\n wuaRevoked: string;\n};\n\nconst credentialDetailFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n wuaState: WUAState | undefined,\n testID: string,\n labels: CardHeaderLabels,\n): {\n credentialDetailPrimary?: string;\n credentialDetailSecondary?: string;\n credentialDetailErrorColor?: boolean;\n credentialDetailTestID?: string;\n statusIcon?: FC<SvgProps>;\n} => {\n const { layoutProperties } = credential.schema;\n\n if (credential.schema.walletStorageType === WalletStorageType.EUDI_COMPLIANT && wuaState === WUAState.Revoked) {\n return {\n credentialDetailPrimary: labels.wuaRevoked,\n credentialDetailErrorColor: true,\n credentialDetailTestID: concatTestID(testID, 'wua', 'revoked'),\n statusIcon: CredentialErrorIcon,\n };\n }\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n return {\n credentialDetailPrimary: credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended,\n credentialDetailTestID: concatTestID(testID, 'suspended'),\n statusIcon: CredentialWarningIcon,\n };\n case CredentialStateEnum.REVOKED:\n return {\n credentialDetailPrimary: labels.revoked,\n credentialDetailErrorColor: true,\n credentialDetailTestID: concatTestID(testID, 'revoked'),\n statusIcon: CredentialErrorIcon,\n };\n }\n\n if (credential.schema.walletStorageType === WalletStorageType.EUDI_COMPLIANT && wuaState === WUAState.Expired) {\n return {\n credentialDetailPrimary: labels.wuaExpired,\n credentialDetailTestID: concatTestID(testID, 'wua', 'suspended'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n if (hasMsoValidityIssues(credential)) {\n return {\n credentialDetailPrimary: labels.validityIssues,\n credentialDetailTestID: concatTestID(testID, 'validity-issue'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n let credentialDetailPrimary =\n formatDateTimeLocalized(new Date(credential.issuanceDate ?? credential.createdDate)) ?? '';\n let credentialDetailSecondary: string | undefined;\n\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n return {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID: concatTestID(testID, 'detail'),\n };\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n wuaState: WUAState | undefined,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n const {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailErrorColor,\n credentialDetailTestID,\n statusIcon,\n } = credentialDetailFromCredential(credential, claims, config, wuaState, testID, labels);\n const { layoutProperties } = credential.schema;\n\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n wuaState: WUAState | undefined,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, wuaState, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: (claim.value || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n if (!claim.value) {\n // Don't try to parse empty values (which will return \"Invalid Date\")\n return { testID: testID, value: String(claim.value) };\n }\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.Picture: // fallback\n case DataTypeEnum.SwiyuPicture: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {\n card: Omit<CredentialCardProps, 'width'>;\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n wuaState: WUAState | undefined,\n testID: string,\n labels: CardLabels,\n): CredentialDetailsCardPropsWithoutWidth => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, wuaState, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n wuaState: WUAState | undefined,\n testID: string,\n labels: CardLabels,\n): CredentialDetailsCardPropsWithoutWidth => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n wuaState,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInParent({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyParent(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyParent = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n if (attribute.listValue) {\n return {\n values: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n } else {\n return {\n attributes: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n }\n};\n\n// Recursively insert an attribute into an parent\n// Will create nested parents if necessary\nconst insertAttributeInParent = (attribute: CredentialAttribute, parent: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = parent.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n if (attribute.listValue) {\n parent.values?.push(nestAttributeInDummyParent(attribute));\n } else {\n parent.attributes?.push(nestAttributeInDummyParent(attribute));\n }\n } else {\n insertAttributeInParent({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.image),\n },\n },\n };\n}\n"],"mappings":"AAAA,SAMEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,EACjBC,iBAAiB,QACZ,iCAAiC;AAYxC,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB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AAA,EAAAC,sBAAA;EACnF,OAAO;IACL,GAAGJ,gBAAgB;IACnB9F,gBAAgB,EAAE;MAChB,GAAG8F,gBAAgB,CAAC9F,gBAAgB;MACpC+C,UAAU,EAAE;QACV,KAAAgD,qBAAA,GAAGD,gBAAgB,CAAC9F,gBAAgB,cAAA+F,qBAAA,uBAAjCA,qBAAA,CAAmChD,UAAU;QAChDf,KAAK,EAAE4D,gBAAgB,EAAAI,sBAAA,GAACF,gBAAgB,CAAC9F,gBAAgB,cAAAgG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCjD,UAAU,cAAAiD,sBAAA,uBAA7CA,sBAAA,CAA+ChE,KAAK;MAC9E,CAAC;MACDL,IAAI,EAAE;QACJ,KAAAsE,sBAAA,GAAGH,gBAAgB,CAAC9F,gBAAgB,cAAAiG,sBAAA,uBAAjCA,sBAAA,CAAmCtE,IAAI;QAC1CK,KAAK,EAAE4D,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAAC9F,gBAAgB,cAAAkG,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCvE,IAAI,cAAAuE,sBAAA,uBAAvCA,sBAAA,CAAyClE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["CredentialStateEnum","DataTypeEnum","FormatFeatureEnum","CredentialErrorIcon","CredentialNoticeWarningIcon","CredentialWarningIcon","formatDateLocalized","formatDateTimeLocalized","concatTestID","getCarouselImagesFromClaims","ValidityState","getValidityState","credential","state","REVOKED","Revoked","SUSPENDED","Suspended","Valid","supportsSelectiveDisclosure","config","_formatConfig$capabil","formatConfig","format","schema","Boolean","capabilities","features","includes","SelectiveDisclosure","undefined","findClaimByPathParts","path","claims","length","first","second","rest","claim","find","c","key","dataType","Object","value","findClaimByPath","split","formatCredentialDetail","testID","_attributeValue$value","attributeValue","detailsCardAttributeValueFromClaim","hasMsoValidityIssues","mdocMsoValidity","mdocMsoValidityIssue","nextUpdate","Date","credentialDetailFromCredential","labels","_formatDateTimeLocali","_credential$issuanceD","layoutProperties","credentialDetailPrimary","suspendEndDate","suspendedUntil","suspended","credentialDetailTestID","statusIcon","revoked","credentialDetailErrorColor","validityIssues","issuanceDate","createdDate","credentialDetailSecondary","primary","primaryAttribute","secondary","secondaryAttribute","cardHeaderFromCredential","_layoutProperties$log","_layoutProperties$log2","_layoutProperties$log3","color","logo","backgroundColor","credentialName","name","icon","image","imageSource","uri","iconLabelColor","fontColor","getCredentialCardPropsFromCredential","notice","_layoutProperties$bac","_layoutProperties$bac2","text","validityIssuesNotice","noticeIcon","result","cardCarouselImages","cardImage","background","header","detailsCardAttributeFromClaim","id","pop","typeConfig","datatype","array","values","map","arrayValue","index","toString","type","Array","isArray","attributes","nestedClaim","_formatDateLocalized","String","date","Picture","SwiyuPicture","_typeConfig$params","params","showAs","detailsCardFromCredential","detailsCardFromCredentialWithClaims","card","nestAttributes","attribute","attributePath","push","parent","a","insertAttributeInParent","join","nestAttributeInDummyParent","pathParts","listValue","disabled","_parent$attributes","nextParent","_parent$values","_parent$attributes2","parseBase64Image","getCredentialSchemaWithoutImages","credentialSchema","_credentialSchema$lay","_credentialSchema$lay2","_credentialSchema$lay3","_credentialSchema$lay4"],"sources":["credential.ts"],"sourcesContent":["import {\n Claim,\n Config,\n CredentialDetail,\n CredentialListItem,\n CredentialSchema,\n CredentialStateEnum,\n DataTypeEnum,\n FormatFeatureEnum,\n} from '@procivis/react-native-one-core';\nimport { FC } from 'react';\nimport { SvgProps } from 'react-native-svg';\n\nimport {\n CredentialAttribute,\n CredentialAttributeValue,\n CredentialCardProps,\n CredentialDetailsCardProps,\n CredentialHeaderProps,\n} from '../../ui-components/credential';\nimport { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';\nimport { CredentialErrorIcon, CredentialNoticeWarningIcon, CredentialWarningIcon } from '../../ui-components/icons';\nimport { formatDateLocalized, formatDateTimeLocalized } from '../date';\nimport { concatTestID } from '../testID';\nimport { getCarouselImagesFromClaims } from './credential-images';\n\nexport enum ValidityState {\n Revoked = 'revoked',\n Suspended = 'suspended',\n Valid = 'valid',\n}\n\nexport const getValidityState = (credential: CredentialListItem | undefined) => {\n if (credential?.state === CredentialStateEnum.REVOKED) {\n return ValidityState.Revoked;\n }\n if (credential?.state === CredentialStateEnum.SUSPENDED) {\n return ValidityState.Suspended;\n }\n return ValidityState.Valid;\n};\n\nexport const supportsSelectiveDisclosure = (credential: CredentialListItem | undefined, config: Config | undefined) => {\n const formatConfig = credential && config?.format[credential.schema.format];\n return formatConfig\n ? Boolean(formatConfig.capabilities?.features?.includes(FormatFeatureEnum.SelectiveDisclosure))\n : undefined;\n};\n\nconst findClaimByPathParts = (path: string[], claims?: Claim[]): Claim | undefined => {\n if (!claims?.length) {\n return undefined;\n }\n const [first, second, ...rest] = path;\n const claim = claims.find((c) => c.key === first);\n if (claim === undefined || second === undefined || claim.dataType !== DataTypeEnum.Object) {\n return claim;\n }\n\n return findClaimByPathParts([`${first}/${second}`, ...rest], claim.value as Claim[]);\n};\n\nexport const findClaimByPath = (path: string | undefined, claims: Claim[] | undefined) =>\n path ? findClaimByPathParts(path.split('/'), claims) : undefined;\n\nconst formatCredentialDetail = (claim: Claim, config: Config, testID: string): string => {\n const attributeValue = detailsCardAttributeValueFromClaim(claim, config, testID);\n return attributeValue.value ?? '';\n};\n\nexport const hasMsoValidityIssues = (credential: CredentialDetail): boolean => {\n const mdocMsoValidity: { nextUpdate: string } | undefined =\n 'mdocMsoValidity' in credential ? (credential.mdocMsoValidity as { nextUpdate: string }) : undefined;\n\n const mdocMsoValidityIssue = Boolean(\n mdocMsoValidity?.nextUpdate && new Date(mdocMsoValidity.nextUpdate) < new Date(),\n );\n\n return mdocMsoValidityIssue;\n};\n\nexport type CardHeaderLabels = {\n validityIssues: string;\n revoked: string;\n suspended: string;\n suspendedUntil: (date: string) => string;\n};\n\nconst credentialDetailFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): {\n credentialDetailPrimary?: string;\n credentialDetailSecondary?: string;\n credentialDetailErrorColor?: boolean;\n credentialDetailTestID?: string;\n statusIcon?: FC<SvgProps>;\n} => {\n const { layoutProperties } = credential.schema;\n\n switch (credential.state) {\n case CredentialStateEnum.SUSPENDED:\n return {\n credentialDetailPrimary: credential.suspendEndDate\n ? labels.suspendedUntil(formatDateTimeLocalized(new Date(credential.suspendEndDate))!)\n : labels.suspended,\n credentialDetailTestID: concatTestID(testID, 'suspended'),\n statusIcon: CredentialWarningIcon,\n };\n case CredentialStateEnum.REVOKED:\n return {\n credentialDetailPrimary: labels.revoked,\n credentialDetailErrorColor: true,\n credentialDetailTestID: concatTestID(testID, 'revoked'),\n statusIcon: CredentialErrorIcon,\n };\n }\n\n if (hasMsoValidityIssues(credential)) {\n return {\n credentialDetailPrimary: labels.validityIssues,\n credentialDetailTestID: concatTestID(testID, 'validity-issue'),\n statusIcon: CredentialWarningIcon,\n };\n }\n\n let credentialDetailPrimary =\n formatDateTimeLocalized(new Date(credential.issuanceDate ?? credential.createdDate)) ?? '';\n let credentialDetailSecondary: string | undefined;\n\n const primary = findClaimByPath(layoutProperties?.primaryAttribute, claims);\n\n if (primary) {\n credentialDetailPrimary = formatCredentialDetail(primary, config, concatTestID(testID, 'primary'));\n }\n\n const secondary = findClaimByPath(layoutProperties?.secondaryAttribute, claims);\n\n if (secondary) {\n credentialDetailSecondary = formatCredentialDetail(secondary, config, concatTestID(testID, 'secondary'));\n }\n\n return {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID: concatTestID(testID, 'detail'),\n };\n};\n\nexport const cardHeaderFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n testID: string,\n labels: CardHeaderLabels,\n): Omit<CredentialHeaderProps, 'style'> => {\n const {\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailErrorColor,\n credentialDetailTestID,\n statusIcon,\n } = credentialDetailFromCredential(credential, claims, config, testID, labels);\n const { layoutProperties } = credential.schema;\n\n return {\n color: layoutProperties?.logo?.backgroundColor,\n credentialDetailErrorColor,\n credentialDetailPrimary,\n credentialDetailSecondary,\n credentialDetailTestID,\n credentialName: credential.schema.name,\n icon: layoutProperties?.logo?.image\n ? {\n imageSource: {\n uri: layoutProperties.logo.image,\n },\n }\n : undefined,\n iconLabelColor: layoutProperties?.logo?.fontColor,\n statusIcon,\n testID,\n };\n};\n\nexport type CardLabels = CardHeaderLabels & {\n validityIssuesNotice: string;\n};\n\nexport const getCredentialCardPropsFromCredential = (\n credential: CredentialDetail,\n claims: Claim[] = [],\n config: Config,\n notice: CredentialCardNotice | undefined,\n testID: string,\n labels: CardLabels,\n): Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> => {\n const { layoutProperties } = credential.schema;\n\n if (hasMsoValidityIssues(credential)) {\n notice = {\n text: labels.validityIssuesNotice,\n noticeIcon: CredentialNoticeWarningIcon,\n };\n }\n\n const result: Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'> = {\n cardCarouselImages: getCarouselImagesFromClaims(claims, layoutProperties, concatTestID(testID, 'carousel')),\n cardImage: layoutProperties?.background?.image\n ? { imageSource: { uri: layoutProperties.background.image } }\n : undefined,\n color: layoutProperties?.background?.color,\n header: cardHeaderFromCredential(credential, claims, config, concatTestID(testID, 'header'), labels),\n testID,\n notice,\n };\n\n return result;\n};\n\nexport const detailsCardAttributeFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttribute => {\n const value = detailsCardAttributeValueFromClaim(claim, config, testID);\n return {\n id: claim.id,\n name: claim.key.split('/').pop(),\n path: claim.key,\n ...value,\n };\n};\n\nconst detailsCardAttributeValueFromClaim = (claim: Claim, config: Config, testID: string): CredentialAttributeValue => {\n const typeConfig = config?.datatype[claim.dataType];\n\n if (claim.array) {\n return {\n values: (claim.value || []).map((arrayValue, index) => {\n return detailsCardAttributeFromClaim(\n {\n ...arrayValue,\n id: `${arrayValue.id}/${index}`,\n },\n config,\n concatTestID(testID, index.toString()),\n );\n }),\n };\n } else {\n switch (typeConfig?.type) {\n case DataTypeEnum.Object: {\n if (!Array.isArray(claim.value)) {\n return { attributes: [] };\n }\n return {\n attributes: (claim.value as Claim[]).map((nestedClaim, index) =>\n detailsCardAttributeFromClaim(nestedClaim, config, concatTestID(testID, index.toString())),\n ),\n };\n }\n case DataTypeEnum.Date: {\n if (!claim.value) {\n // Don't try to parse empty values (which will return \"Invalid Date\")\n return { testID: testID, value: String(claim.value) };\n }\n const date = claim.value as string;\n return {\n testID: testID,\n value: formatDateLocalized(new Date(date)) ?? date,\n };\n }\n case DataTypeEnum.Picture: // fallback\n case DataTypeEnum.SwiyuPicture: {\n if (typeConfig.params?.showAs === 'IMAGE') {\n return { image: { uri: claim.value as string }, testID: testID };\n } else {\n return { testID: testID, value: claim.value as string };\n }\n }\n default:\n return { testID: testID, value: String(claim.value) };\n }\n }\n};\n\nexport type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {\n card: Omit<CredentialCardProps, 'width'>;\n};\n\nexport const detailsCardFromCredential = (\n credential: CredentialDetail,\n config: Config,\n testID: string,\n labels: CardLabels,\n): CredentialDetailsCardPropsWithoutWidth => {\n return detailsCardFromCredentialWithClaims(credential, credential.claims, config, testID, labels);\n};\n\nexport const detailsCardFromCredentialWithClaims = (\n credential: CredentialDetail,\n claims: Claim[],\n config: Config,\n testID: string,\n labels: CardLabels,\n): CredentialDetailsCardPropsWithoutWidth => {\n const attributes: CredentialAttribute[] = claims.map((claim, index) =>\n detailsCardAttributeFromClaim(claim, config, concatTestID(testID, 'attribute', index.toString())),\n );\n\n const card = getCredentialCardPropsFromCredential(\n credential,\n claims,\n config,\n undefined,\n concatTestID(testID, 'card'),\n labels,\n );\n\n return {\n attributes,\n card,\n };\n};\n\n// Converts a flat list of attributes into a nested structure\n// modifies the names to not include slashes\nexport const nestAttributes = (attributes: CredentialAttribute[]): CredentialAttribute[] => {\n const result: CredentialAttribute[] = [];\n\n for (const attribute of attributes) {\n const attributePath = attribute.path.split('/');\n if (attributePath.length === 0) {\n result.push(attribute);\n } else {\n const [first, ...rest] = attributePath;\n const parent = result.find((a) => a.name === first);\n if (parent) {\n insertAttributeInParent({ ...attribute, path: rest.join('/') }, parent);\n } else {\n result.push(nestAttributeInDummyParent(attribute));\n }\n }\n }\n\n return result;\n};\n\n// We nest the leaf node in a (one or more) nested object(s)\n// to make sure the tree structure is correctly rendered in proof request screens.\nconst nestAttributeInDummyParent = (attribute: CredentialAttribute): CredentialAttribute => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n if (!rest.length) {\n return attribute;\n }\n\n // The dummy object is not selectable, and contains a placeholder ID\n // the user can't interact with it.\n if (attribute.listValue) {\n return {\n values: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n } else {\n return {\n attributes: [nestAttributeInDummyParent({ ...attribute, path: rest.join('/') })],\n disabled: true,\n id: `${attribute.id}/${first}`,\n name: first,\n path: first,\n };\n }\n};\n\n// Recursively insert an attribute into an parent\n// Will create nested parents if necessary\nconst insertAttributeInParent = (attribute: CredentialAttribute, parent: CredentialAttribute) => {\n const pathParts = attribute.path.split('/');\n const [first, ...rest] = pathParts;\n\n const nextParent = parent.attributes?.find((a) => a.name === first);\n\n if (!nextParent) {\n if (attribute.listValue) {\n parent.values?.push(nestAttributeInDummyParent(attribute));\n } else {\n parent.attributes?.push(nestAttributeInDummyParent(attribute));\n }\n } else {\n insertAttributeInParent({ ...attribute, path: rest.join('/') }, nextParent);\n }\n};\n\nfunction parseBase64Image(image: string | undefined) {\n return image ? '__BASE64IMAGE__' : '';\n}\n\nexport function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema) {\n return {\n ...credentialSchema,\n layoutProperties: {\n ...credentialSchema.layoutProperties,\n background: {\n ...credentialSchema.layoutProperties?.background,\n image: parseBase64Image(credentialSchema.layoutProperties?.background?.image),\n },\n logo: {\n ...credentialSchema.layoutProperties?.logo,\n image: parseBase64Image(credentialSchema.layoutProperties?.logo?.image),\n },\n },\n };\n}\n"],"mappings":"AAAA,SAMEA,mBAAmB,EACnBC,YAAY,EACZC,iBAAiB,QACZ,iCAAiC;AAYxC,SAASC,mBAAmB,EAAEC,2BAA2B,EAAEC,qBAAqB,QAAQ,2BAA2B;AACnH,SAASC,mBAAmB,EAAEC,uBAAuB,QAAQ,SAAS;AACtE,SAASC,YAAY,QAAQ,WAAW;AACxC,SAASC,2BAA2B,QAAQ,qBAAqB;AAEjE,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAMzB,OAAO,MAAMC,gBAAgB,GAAIC,UAA0C,IAAK;EAC9E,IAAI,CAAAA,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACc,OAAO,EAAE;IACrD,OAAOJ,aAAa,CAACK,OAAO;EAC9B;EACA,IAAI,CAAAH,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEC,KAAK,MAAKb,mBAAmB,CAACgB,SAAS,EAAE;IACvD,OAAON,aAAa,CAACO,SAAS;EAChC;EACA,OAAOP,aAAa,CAACQ,KAAK;AAC5B,CAAC;AAED,OAAO,MAAMC,2BAA2B,GAAGA,CAACP,UAA0C,EAAEQ,MAA0B,KAAK;EAAA,IAAAC,qBAAA;EACrH,MAAMC,YAAY,GAAGV,UAAU,KAAIQ,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEG,MAAM,CAACX,UAAU,CAACY,MAAM,CAACD,MAAM,CAAC;EAC3E,OAAOD,YAAY,GACfG,OAAO,EAAAJ,qBAAA,GAACC,YAAY,CAACI,YAAY,cAAAL,qBAAA,gBAAAA,qBAAA,GAAzBA,qBAAA,CAA2BM,QAAQ,cAAAN,qBAAA,uBAAnCA,qBAAA,CAA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EAAE4D,gBAAgB,EAAAM,sBAAA,GAACJ,gBAAgB,CAACzF,gBAAgB,cAAA6F,sBAAA,gBAAAA,sBAAA,GAAjCA,sBAAA,CAAmCvE,IAAI,cAAAuE,sBAAA,uBAAvCA,sBAAA,CAAyClE,KAAK;MACxE;IACF;EACF,CAAC;AACH","ignoreList":[]}
@@ -9,6 +9,7 @@ interface EntityAttributesProps {
9
9
  labels: AttributesLabels;
10
10
  onCopyToClipboard: (value: string) => void;
11
11
  entityType: EntityType;
12
+ testID?: string;
12
13
  }
13
14
  declare const _default: React.NamedExoticComponent<EntityAttributesProps>;
14
15
  export default _default;
@@ -12,6 +12,7 @@ export declare const useCredentialAccept: () => import("react-query").UseMutatio
12
12
  interactionId: string;
13
13
  keyId?: string | undefined;
14
14
  txCode?: string | undefined;
15
+ holderWalletUnitId?: string | undefined;
15
16
  }, unknown>;
16
17
  export declare const useCredentialReject: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
17
18
  export declare const useCredentialRevocationCheck: (forceRefresh: boolean) => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").CredentialRevocationCheckResponse[], unknown, string[], unknown>;
@@ -15,10 +15,7 @@ type ProofUrlHookParams = {
15
15
  export declare const useProofUrl: () => import("react-query").UseMutationResult<string, unknown, ProofUrlHookParams, unknown>;
16
16
  export declare const useProofAccept: () => import("react-query").UseMutationResult<void, unknown, {
17
17
  credentials: Record<string, PresentationSubmitCredentialRequest>;
18
- didId?: string | undefined;
19
- identifierId?: string | undefined;
20
18
  interactionId: string;
21
- keyId?: string | undefined;
22
19
  }, unknown>;
23
20
  export declare const useProofReject: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
24
21
  export declare enum IssuanceProtocol {
@@ -1,9 +1,9 @@
1
- import { WalletProvider } from '@procivis/react-native-one-core';
2
- export declare const ATTESTATION_QUERY_KEY = "wallet-unit-attestation";
3
- export declare const useWalletUnitAttestation: (active?: boolean) => import("react-query").UseQueryResult<import("@procivis/react-native-one-core").HolderAttestationWalletUnitResponse, unknown>;
4
- export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<import("@procivis/react-native-one-core").HolderRegisterWalletUnitResponse, unknown, WalletProvider, unknown>;
5
- export declare const useRefreshWalletUnit: () => import("react-query").UseMutationResult<void, unknown, boolean, unknown>;
6
- export declare const useWalletUnitCheck: (appIntegrityCheckRequired: boolean) => {
1
+ import { HolderWalletUnitDetail, WalletProvider } from '@procivis/react-native-one-core';
2
+ export declare const WALLET_UNIT_QUERY_KEY = "wallet-unit";
3
+ export declare const useWalletUnitDetail: (walletUnitId: HolderWalletUnitDetail['id'] | undefined, active?: boolean) => import("react-query").UseQueryResult<HolderWalletUnitDetail | undefined, unknown>;
4
+ export declare const useRegisterWalletUnit: () => import("react-query").UseMutationResult<string, unknown, WalletProvider, unknown>;
5
+ export declare const useWalletUnitStatus: () => import("react-query").UseMutationResult<void, unknown, string, unknown>;
6
+ export declare const useWalletUnitCheck: (walletUnitId: HolderWalletUnitDetail['id'] | undefined) => {
7
7
  isLoading: boolean;
8
- walletUnitAttestation: import("@procivis/react-native-one-core").HolderAttestationWalletUnitResponse | undefined;
8
+ walletUnitDetail: HolderWalletUnitDetail | undefined;
9
9
  };
@@ -16,4 +16,3 @@ export * from './string';
16
16
  export * from './url';
17
17
  export * from './useMemoAsync';
18
18
  export * from './uuid';
19
- export * from './wallet-unit';
@@ -1,11 +1,10 @@
1
1
  import { Config, FailureHint, PresentationDefinitionV2CredentialClaim, PresentationDefinitionV2CredentialDetail } from '@procivis/react-native-one-core';
2
2
  import { CredentialAttribute, CredentialCardNotice, CredentialCardProps } from '../../ui-components';
3
- import { WUAState } from '../wallet-unit';
4
3
  import { CredentialDetailsCardPropsWithoutWidth } from '.';
5
4
  import { ShareCredentialCardLabels } from './credential-sharing';
6
5
  export declare const shareCredentialCardAttributeFromV2Claim: (claim: PresentationDefinitionV2CredentialClaim, selection: string[] | undefined, parentShared: boolean, parentUserSelected: boolean, config: Config, testID: string, nested?: boolean, listValue?: boolean) => CredentialAttribute;
7
6
  export declare const missingCredentialCardFromFailureHint: (failureHint: FailureHint['failureHint'] | undefined, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
8
- export declare const shareCredentialCardFromV2PresentationCredential: (credential: PresentationDefinitionV2CredentialDetail | undefined, failureHint: FailureHint['failureHint'] | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, selectedFields: string[] | undefined, config: Config, wuaState: WUAState | undefined, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
9
- export declare const selectCredentialCardFromV2Credential: (credential: PresentationDefinitionV2CredentialDetail, selected: boolean, multiple: boolean, config: Config, wuaState: WUAState | undefined, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
7
+ export declare const shareCredentialCardFromV2PresentationCredential: (credential: PresentationDefinitionV2CredentialDetail | undefined, failureHint: FailureHint['failureHint'] | undefined, expanded: boolean, multipleCredentialsAvailable: boolean, selectedFields: string[] | undefined, config: Config, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
8
+ export declare const selectCredentialCardFromV2Credential: (credential: PresentationDefinitionV2CredentialDetail, selected: boolean, multiple: boolean, config: Config, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
10
9
  export declare const getV2CredentialClaimAllSubpaths: (claim: PresentationDefinitionV2CredentialClaim) => string[];
11
10
  export declare const getV2CredentialAvailablePaths: (credential: PresentationDefinitionV2CredentialDetail) => string[];
@@ -1,9 +1,8 @@
1
1
  import { Claim, Config, CredentialDetail, PresentationDefinitionField, PresentationDefinitionRequestedCredential } from '@procivis/react-native-one-core';
2
2
  import { CredentialAttribute, CredentialCardProps } from '../../ui-components/credential';
3
3
  import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
4
- import { WUAState } from '../wallet-unit';
5
4
  import { CardLabels, CredentialDetailsCardPropsWithoutWidth } from './credential';
6
- export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, invalidLVVC: boolean, expanded: boolean, multipleCredentialsAvailable: boolean, config: Config, wuaState: WUAState | undefined, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
5
+ export declare const validityCheckedCardFromCredential: (credential: CredentialDetail, invalidLVVC: boolean, expanded: boolean, multipleCredentialsAvailable: boolean, config: Config, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'testID' | 'width'>;
7
6
  export declare const missingCredentialCardFromRequest: (request: PresentationDefinitionRequestedCredential, notice: CredentialCardNotice | undefined, testID: string, labels: ShareCredentialCardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
8
7
  type FlatClaim = Claim & {
9
8
  path: string;
@@ -16,7 +15,7 @@ export type ShareCredentialCardLabels = CardLabels & {
16
15
  missingCredential: string;
17
16
  multipleCredentials: string;
18
17
  };
19
- export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, invalidLVVC: boolean, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: Config, wuaState: WUAState | undefined, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
18
+ export declare const shareCredentialCardFromCredential: (credential: CredentialDetail | undefined, invalidLVVC: boolean, expanded: boolean, multipleCredentialsAvailable: boolean, request: PresentationDefinitionRequestedCredential, selectedFields: string[] | undefined, config: Config, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
20
19
  export declare const selectCredentialCardAttributeFromClaim: (id: string, config: Config, testID: string, labels: ShareCredentialCardLabels, claim?: FlatClaim, field?: PresentationDefinitionField) => CredentialAttribute;
21
- export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: Config, wuaState: WUAState | undefined, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
20
+ export declare const selectCredentialCardFromCredential: (credential: CredentialDetail, selected: boolean, request: PresentationDefinitionRequestedCredential, config: Config, testID: string, labels: ShareCredentialCardLabels) => CredentialDetailsCardPropsWithoutWidth;
22
21
  export {};
@@ -1,7 +1,6 @@
1
- import { Claim, Config, CredentialDetail, CredentialListItem, CredentialSchema, DataTypeEnum, WalletStorageType } from '@procivis/react-native-one-core';
1
+ import { Claim, Config, CredentialDetail, CredentialListItem, CredentialSchema, DataTypeEnum } from '@procivis/react-native-one-core';
2
2
  import { CredentialAttribute, CredentialCardProps, CredentialDetailsCardProps, CredentialHeaderProps } from '../../ui-components/credential';
3
3
  import { CredentialCardNotice } from '../../ui-components/credential/card/credential-card';
4
- import { WUAState } from '../wallet-unit';
5
4
  export declare enum ValidityState {
6
5
  Revoked = "revoked",
7
6
  Suspended = "suspended",
@@ -37,20 +36,18 @@ export type CardHeaderLabels = {
37
36
  revoked: string;
38
37
  suspended: string;
39
38
  suspendedUntil: (date: string) => string;
40
- wuaExpired: string;
41
- wuaRevoked: string;
42
39
  };
43
- export declare const cardHeaderFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: Config, wuaState: WUAState | undefined, testID: string, labels: CardHeaderLabels) => Omit<CredentialHeaderProps, 'style'>;
40
+ export declare const cardHeaderFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: Config, testID: string, labels: CardHeaderLabels) => Omit<CredentialHeaderProps, 'style'>;
44
41
  export type CardLabels = CardHeaderLabels & {
45
42
  validityIssuesNotice: string;
46
43
  };
47
- export declare const getCredentialCardPropsFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: Config, wuaState: WUAState | undefined, notice: CredentialCardNotice | undefined, testID: string, labels: CardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
44
+ export declare const getCredentialCardPropsFromCredential: (credential: CredentialDetail, claims: Claim[] | undefined, config: Config, notice: CredentialCardNotice | undefined, testID: string, labels: CardLabels) => Omit<CredentialCardProps, 'onHeaderPress' | 'style' | 'width'>;
48
45
  export declare const detailsCardAttributeFromClaim: (claim: Claim, config: Config, testID: string) => CredentialAttribute;
49
46
  export type CredentialDetailsCardPropsWithoutWidth = Omit<CredentialDetailsCardProps, 'expanded' | 'card'> & {
50
47
  card: Omit<CredentialCardProps, 'width'>;
51
48
  };
52
- export declare const detailsCardFromCredential: (credential: CredentialDetail, config: Config, wuaState: WUAState | undefined, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
53
- export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: Config, wuaState: WUAState | undefined, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
49
+ export declare const detailsCardFromCredential: (credential: CredentialDetail, config: Config, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
50
+ export declare const detailsCardFromCredentialWithClaims: (credential: CredentialDetail, claims: Claim[], config: Config, testID: string, labels: CardLabels) => CredentialDetailsCardPropsWithoutWidth;
54
51
  export declare const nestAttributes: (attributes: CredentialAttribute[]) => CredentialAttribute[];
55
52
  export declare function getCredentialSchemaWithoutImages(credentialSchema: CredentialSchema): {
56
53
  layoutProperties: {
@@ -74,9 +71,8 @@ export declare function getCredentialSchemaWithoutImages(credentialSchema: Crede
74
71
  name: string;
75
72
  format: string;
76
73
  revocationMethod: string;
77
- walletStorageType?: WalletStorageType | undefined;
74
+ keyStorageSecurity?: import("@procivis/react-native-one-core").KeyStorageSecurity | undefined;
78
75
  schemaId: string;
79
76
  importedSourceUrl: string;
80
- schemaType: string;
81
77
  layoutType?: import("@procivis/react-native-one-core").LayoutType | undefined;
82
78
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@procivis/one-react-native-components",
3
- "version": "0.3.86",
3
+ "version": "0.3.91",
4
4
  "author": "Procivis AG (https://procivis.ch)",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Common Procivis ONE UI components for react-native",
@@ -51,7 +51,7 @@
51
51
  "@babel/runtime": "^7.25.0",
52
52
  "@commitlint/config-conventional": "^11.0.0",
53
53
  "@gorhom/bottom-sheet": "^5.1.2",
54
- "@procivis/react-native-one-core": "1.67952.1",
54
+ "@procivis/react-native-one-core": "1.72811.0",
55
55
  "@procivis/react-native-picker": "5.0.3",
56
56
  "@react-native-async-storage/async-storage": "^1.17.3",
57
57
  "@react-native-community/blur": "^4.4.0",
@@ -140,7 +140,7 @@
140
140
  "vite": "^6.2.2"
141
141
  },
142
142
  "peerDependencies": {
143
- "@procivis/react-native-one-core": "^1.67952.1",
143
+ "@procivis/react-native-one-core": "^1.72811.0",
144
144
  "@procivis/react-native-picker": "*",
145
145
  "@react-native-community/blur": "*",
146
146
  "@react-native-community/netinfo": "^11.4.1",
@@ -293,4 +293,4 @@
293
293
  "react-native-web": "patches/react-native-web.patch"
294
294
  }
295
295
  }
296
- }
296
+ }
@@ -6,9 +6,7 @@ import { CredentialDetailsCardListItem, CredentialHeaderProps } from '../../ui-c
6
6
  import { concatTestID } from '../../utils';
7
7
  import { useCoreConfig } from '../../utils/hooks/core/core-config';
8
8
  import { useCredentialDetail } from '../../utils/hooks/core/credentials';
9
- import { useWalletUnitAttestation } from '../../utils/hooks/core/wallet-unit';
10
9
  import { CardLabels, detailsCardFromCredentialWithClaims } from '../../utils/parsers/credential';
11
- import { walletUnitAttestationState } from '../../utils/wallet-unit';
12
10
 
13
11
  export interface CredentialDetailsProps {
14
12
  claims?: Claim[];
@@ -33,10 +31,9 @@ export const CredentialDetails: FC<CredentialDetailsProps> = ({
33
31
  }) => {
34
32
  const { data: credential } = useCredentialDetail(credentialId);
35
33
  const { data: config } = useCoreConfig();
36
- const { data: walletUnitAttestation, isLoading: isLoadingWUA } = useWalletUnitAttestation();
37
34
  const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
38
35
 
39
- if (!credential || !config || isLoadingWUA) {
36
+ if (!credential || !config) {
40
37
  return null;
41
38
  }
42
39
  const testID = concatTestID('Credential.credential', credential.id);
@@ -45,7 +42,6 @@ export const CredentialDetails: FC<CredentialDetailsProps> = ({
45
42
  credential,
46
43
  claims ?? credential.claims,
47
44
  config,
48
- walletUnitAttestationState(walletUnitAttestation),
49
45
  testID,
50
46
  labels,
51
47
  );
@@ -14,6 +14,7 @@ interface EntityAttributesProps {
14
14
  labels: AttributesLabels;
15
15
  onCopyToClipboard: (value: string) => void;
16
16
  entityType: EntityType;
17
+ testID?: string;
17
18
  }
18
19
 
19
20
  const EntityAttributes: FC<EntityAttributesProps> = ({
@@ -23,6 +24,7 @@ const EntityAttributes: FC<EntityAttributesProps> = ({
23
24
  trusted,
24
25
  labels,
25
26
  entityType,
27
+ testID,
26
28
  onCopyToClipboard,
27
29
  }) => {
28
30
  const didSections = did?.split(':') ?? [];
@@ -62,6 +64,7 @@ const EntityAttributes: FC<EntityAttributesProps> = ({
62
64
  {...attribute}
63
65
  labels={labels}
64
66
  onCopyToClipboard={onCopyToClipboard}
67
+ testID={testID}
65
68
  />
66
69
  ))}
67
70
  </View>
@@ -66,6 +66,7 @@ const EntityDetailsWithButtons: FC<EntityDetailsWithButtonsProps> = ({
66
66
  labels={attributesLabels}
67
67
  onCopyToClipboard={onCopyToClipboard}
68
68
  entityType={entityType}
69
+ testID={testID}
69
70
  />
70
71
  </View>
71
72
  );
@@ -5,12 +5,10 @@ import { Dimensions, ImageSourcePropType } from 'react-native';
5
5
  import { CredentialDetailsCardListItem } from '../../../ui-components';
6
6
  import { useCoreConfig } from '../../../utils/hooks/core/core-config';
7
7
  import { useCredentialDetail } from '../../../utils/hooks/core/credentials';
8
- import { useWalletUnitAttestation } from '../../../utils/hooks/core/wallet-unit';
9
8
  import {
10
9
  selectCredentialCardFromCredential,
11
10
  ShareCredentialCardLabels,
12
11
  } from '../../../utils/parsers/credential-sharing';
13
- import { walletUnitAttestationState } from '../../../utils/wallet-unit';
14
12
 
15
13
  export const SelectCredential: FC<{
16
14
  credentialId: string;
@@ -24,10 +22,9 @@ export const SelectCredential: FC<{
24
22
  }> = ({ credentialId, labels, lastItem, onImagePreview, onPress, request, selected, testID }) => {
25
23
  const { data: credential } = useCredentialDetail(credentialId);
26
24
  const { data: config } = useCoreConfig();
27
- const { data: walletUnitAttestation, isLoading: isLoadingWUA } = useWalletUnitAttestation();
28
25
  const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
29
26
 
30
- if (!credential || !config || isLoadingWUA) {
27
+ if (!credential || !config) {
31
28
  return null;
32
29
  }
33
30
 
@@ -36,7 +33,6 @@ export const SelectCredential: FC<{
36
33
  selected,
37
34
  request,
38
35
  config,
39
- walletUnitAttestationState(walletUnitAttestation),
40
36
  testID,
41
37
  labels,
42
38
  );
@@ -11,13 +11,11 @@ import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } fro
11
11
  import { CredentialDetailsCardListItem, useAppColorScheme } from '../../../ui-components';
12
12
  import { concatTestID } from '../../../utils';
13
13
  import { useCoreConfig } from '../../../utils/hooks/core/core-config';
14
- import { useWalletUnitAttestation } from '../../../utils/hooks/core/wallet-unit';
15
14
  import { getValidityState, ValidityState } from '../../../utils/parsers/credential';
16
15
  import {
17
16
  shareCredentialCardFromCredential,
18
17
  ShareCredentialCardLabels,
19
18
  } from '../../../utils/parsers/credential-sharing';
20
- import { walletUnitAttestationState } from '../../../utils/wallet-unit';
21
19
  import { SelectShareCredentialCardNotice } from '../select-share-credential-card-notice';
22
20
  import { ShareCredentialCardNotice } from '../share-credential-card-notice';
23
21
 
@@ -61,7 +59,6 @@ export const ShareCredential: FunctionComponent<{
61
59
  const colorScheme = useAppColorScheme();
62
60
  const credential = allCredentials.find((c) => c.id === selectedCredentialId);
63
61
  const { data: config } = useCoreConfig();
64
- const { data: walletUnitAttestation, isLoading: isLoadingWUA } = useWalletUnitAttestation();
65
62
  const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
66
63
 
67
64
  const selectionOptions = useMemo(
@@ -131,7 +128,7 @@ export const ShareCredential: FunctionComponent<{
131
128
  }
132
129
  }, [expanded, invalid, labels, multipleCredentialsAvailable, onSelectCredential, testID, validityState]);
133
130
 
134
- if (!config || isLoadingWUA) {
131
+ if (!config) {
135
132
  return null;
136
133
  }
137
134
 
@@ -143,7 +140,6 @@ export const ShareCredential: FunctionComponent<{
143
140
  request,
144
141
  selectedFields,
145
142
  config,
146
- walletUnitAttestationState(walletUnitAttestation),
147
143
  testID,
148
144
  labels,
149
145
  );
@@ -3,12 +3,7 @@ import React, { FC, useCallback, useMemo } from 'react';
3
3
  import { Dimensions, ImageSourcePropType } from 'react-native';
4
4
 
5
5
  import { CredentialDetailsCardListItem } from '../../../ui-components';
6
- import {
7
- ShareCredentialCardLabels,
8
- useCoreConfig,
9
- useWalletUnitAttestation,
10
- walletUnitAttestationState,
11
- } from '../../../utils';
6
+ import { ShareCredentialCardLabels, useCoreConfig } from '../../../utils';
12
7
  import { selectCredentialCardFromV2Credential } from '../../../utils/parsers/credential-sharing-v2';
13
8
 
14
9
  export const SelectCredentialV2: FC<{
@@ -22,14 +17,13 @@ export const SelectCredentialV2: FC<{
22
17
  testID: string;
23
18
  }> = ({ credential, labels, lastItem, multiple, onImagePreview, onSelected, selected, testID }) => {
24
19
  const { data: config } = useCoreConfig();
25
- const { data: walletUnitAttestation, isLoading: isLoadingWUA } = useWalletUnitAttestation();
26
20
  const cardWidth = useMemo(() => Dimensions.get('window').width - 32, []);
27
21
 
28
22
  const onHeaderPress = useCallback(() => {
29
23
  onSelected?.(credential.id, !selected);
30
24
  }, [credential.id, onSelected, selected]);
31
25
 
32
- if (!credential || !config || isLoadingWUA) {
26
+ if (!credential || !config) {
33
27
  return null;
34
28
  }
35
29
 
@@ -38,7 +32,6 @@ export const SelectCredentialV2: FC<{
38
32
  selected,
39
33
  multiple,
40
34
  config,
41
- walletUnitAttestationState(walletUnitAttestation),
42
35
  testID,
43
36
  labels,
44
37
  );
@@ -7,14 +7,7 @@ import React, { FunctionComponent, useCallback, useMemo } from 'react';
7
7
  import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
8
8
 
9
9
  import { CredentialDetailsCardListItem, useAppColorScheme } from '../../../ui-components';
10
- import {
11
- concatTestID,
12
- getValidityState,
13
- useCoreConfig,
14
- useWalletUnitAttestation,
15
- ValidityState,
16
- walletUnitAttestationState,
17
- } from '../../../utils';
10
+ import { concatTestID, getValidityState, useCoreConfig, ValidityState } from '../../../utils';
18
11
  import { shareCredentialCardFromV2PresentationCredential } from '../../../utils/parsers/credential-sharing-v2';
19
12
  import { SelectShareCredentialCardNotice } from '../select-share-credential-card-notice';
20
13
  import { ShareCredentialCardNotice } from '../share-credential-card-notice';
@@ -67,7 +60,6 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
67
60
  const failureHint = 'failureHint' in credentialQuery ? credentialQuery.failureHint : undefined;
68
61
  const credential = applicableCredentials?.find((c) => c.id === selectedCredentialId) ?? applicableCredentials?.[0];
69
62
  const { data: config } = useCoreConfig();
70
- const { data: walletUnitAttestation, isLoading: isLoadingWUA } = useWalletUnitAttestation();
71
63
  const cardWidth = useMemo(
72
64
  () => Dimensions.get('window').width - 32 - (grouped ? GroupedShareCredentialV2Padding * 2 : 0),
73
65
  [grouped],
@@ -148,7 +140,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
148
140
  [onSelectField, selectedCredentialId],
149
141
  );
150
142
 
151
- if (!config || isLoadingWUA) {
143
+ if (!config) {
152
144
  return null;
153
145
  }
154
146
 
@@ -162,7 +154,6 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
162
154
  multipleCredentialsAvailable,
163
155
  selectedFields,
164
156
  config,
165
- walletUnitAttestationState(walletUnitAttestation),
166
157
  testID,
167
158
  labels,
168
159
  );
@@ -16,6 +16,9 @@ const cacheTypeToQueryKeys: Record<CacheType, string[]> = {
16
16
  [CacheType.VCT_METADATA]: CREDENTIAL_QUERY_KEYS,
17
17
  [CacheType.JSON_SCHEMA]: CREDENTIAL_QUERY_KEYS,
18
18
  [CacheType.TRUST_LIST]: [...TRUST_ENTITY_QUERY_KEYS, ...CREDENTIAL_QUERY_KEYS],
19
+ [CacheType.X509_CRL]: CREDENTIAL_QUERY_KEYS,
20
+ [CacheType.ANDROID_ATTESTATION_CRL]: CREDENTIAL_QUERY_KEYS,
21
+ [CacheType.OPEN_ID_METADATA]: CREDENTIAL_QUERY_KEYS,
19
22
  };
20
23
 
21
24
  export const useCacheClear = () => {
@@ -111,11 +111,12 @@ export const useCredentialAccept = () => {
111
111
  interactionId: string;
112
112
  keyId?: string;
113
113
  txCode?: string;
114
+ holderWalletUnitId?: string;
114
115
  };
115
116
 
116
117
  return useMutation(
117
- async ({ interactionId, didId, identifierId, keyId, txCode }: CredentialAcceptHookParams) =>
118
- core.holderAcceptCredential(interactionId, didId, identifierId, keyId, txCode),
118
+ async (credentialAcceptHookParams: CredentialAcceptHookParams) =>
119
+ core.holderAcceptCredential(credentialAcceptHookParams),
119
120
  {
120
121
  onSuccess: async () => {
121
122
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
@@ -100,16 +100,10 @@ export const useProofAccept = () => {
100
100
  async ({
101
101
  interactionId,
102
102
  credentials,
103
- didId,
104
- identifierId,
105
- keyId,
106
103
  }: {
107
104
  credentials: Record<string, PresentationSubmitCredentialRequest>;
108
- didId?: string;
109
- identifierId?: string;
110
105
  interactionId: string;
111
- keyId?: string;
112
- }) => core.holderSubmitProof(interactionId, credentials, didId, identifierId, keyId),
106
+ }) => core.holderSubmitProof(interactionId, credentials),
113
107
  {
114
108
  onError: async (err) => {
115
109
  reportException(err, 'Proof submission failure');
@@ -296,7 +290,7 @@ export const useProofForSchemaIdWithTransport = (
296
290
  setProofId(undefined);
297
291
  setDeleting(false);
298
292
  })
299
- .catch(() => {});
293
+ .catch(() => { });
300
294
  }, [proofIdRef, deleteProof, proofSchemaId, transport, setProofId]);
301
295
 
302
296
  useEffect(() => {
@@ -313,7 +307,7 @@ export const useProofForSchemaIdWithTransport = (
313
307
  setProofId(undefined);
314
308
  setDeleting(false);
315
309
  })
316
- .catch(() => {});
310
+ .catch(() => { });
317
311
  }
318
312
  }, [deleteProof, enabled, proofId, proofState, setProofId]);
319
313
 
@@ -340,7 +334,7 @@ export const useProofForSchemaIdWithTransport = (
340
334
  .then((id) => {
341
335
  setProofId(id);
342
336
  })
343
- .catch(() => {});
337
+ .catch(() => { });
344
338
  }, [proofSchemaId, identifiers, identifierFilter, createProof, enabled, transport, proofId, setProofId, deleting]);
345
339
 
346
340
  return deleting ? undefined : proofId;