Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove prefix for credential ids #595

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Sotatek-TungNguyen2a
Copy link
Collaborator

Description

Remove the "metadata:" prefix for credential IDs

Checklist before requesting a review

Issue ticket number and link

  • This PR has a valid ticket number or issue: link

Testing & Validation

  • This PR has been tested/validated in IOS, Android and browser.
  • The code has been tested locally with test coverage match expectations.
  • Added new Unit/Component testing (if relevant).

Security

  • No secrets are being committed (i.e. credentials, PII)
  • This PR does not have any significant security implications

Code Review

  • There is no unused functionality or blocks of commented out code (otherwise, please explain below)
  • In addition to this PR, all relevant documentation (e.g. Confluence) and architecture diagrams (e.g. Miro) were updated

Copy link

Vercel PR (merge commit) deploy URL: https://cf-identity-wallet-6cekt7se1.vercel.app

Sotatek-BaoHoanga and others added 3 commits July 25, 2024 10:51
…allet into feat/remove-prefix-for-credential-ids
…rdano-foundation/cf-identity-wallet into feat/remove-prefix-for-credential-ids
Copy link

Vercel PR (merge commit) deploy URL: https://cf-identity-wallet-ji3gxeith.vercel.app

Copy link

Vercel PR (merge commit) deploy URL: https://cf-identity-wallet-7ma2nlnav.vercel.app

…allet into feat/remove-prefix-for-credential-ids
…rdano-foundation/cf-identity-wallet into feat/remove-prefix-for-credential-ids
'$._tags.id',
replace(json_extract(value, '$._tags.id'), 'metadata:', '')
)
WHERE json_extract(value, '$._tags.id') LIKE 'metadata:%';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tags at the DB layer have a different format - so this didn't work for the tags. The effect is that if I send an IPEX apply, I can no longer present a valid credential because it searches tags by ID.

got item by id EGNUaig8_A3tO72bq76UNxEdjfNsuH7Va_FQ4ue8F7R6: {
  "values": [
    {
      "category": "CredentialMetadataRecord",
      "name": "EGNUaig8_A3tO72bq76UNxEdjfNsuH7Va_FQ4ue8F7R6",
      "value": "{\"_tags\":{\"isArchived\":false,\"isDeleted\":false,\"connectionId\":\"EHZ6H93014ZnZSRmzjqOL3Gn56MNkMydIy-hFnu3hJeX\",\"id\":\"EGNUaig8_A3tO72bq76UNxEdjfNsuH7Va_FQ4ue8F7R6\"},\"type\":\"CredentialMetadataRecord\",\"id\":\"EGNUaig8_A3tO72bq76UNxEdjfNsuH7Va_FQ4ue8F7R6\",\"isArchived\":false,\"isDeleted\":false,\"createdAt\":\"2024-07-26T08:47:31.266Z\",\"issuanceDate\":\"2024-07-26T08:47:18.415Z\",\"credentialType\":\"IIW 2024 Demo Day Attendee\",\"status\":\"confirmed\",\"connectionId\":\"EHZ6H93014ZnZSRmzjqOL3Gn56MNkMydIy-hFnu3hJeX\",\"updatedAt\":\"2024-07-26T08:47:32.521Z\"}",
      "tags": "boolean|isArchived|0,boolean|isDeleted|0,string|connectionId|EHZ6H93014ZnZSRmzjqOL3Gn56MNkMydIy-hFnu3hJeX,string|id|metadata:EGNUaig8_A3tO72bq76UNxEdjfNsuH7Va_FQ4ue8F7R6"
    }
  ]
}

Copy link

Vercel PR (merge commit) deploy URL: https://cf-identity-wallet-bmgq2zhnu.vercel.app

Copy link

Vercel PR (merge commit) deploy URL: https://cf-identity-wallet-2hm8zlsdw.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants