impierce / identity-wallet

A Tauri-based Identity Wallet for people to manage Decentralized Identities and Verifiable Credentials.
https://www.impierce.com
Apache License 2.0
17 stars 4 forks source link

[Bug] (frontend) Favorites transported across dev profiles #212

Open Oran-Dan opened 2 months ago

Oran-Dan commented 2 months ago

Description

Normally no credentials are kept when switching between the Crab or the Dragon dev profiles. Yet, when adding credentials in the Crab profile they will remain visible when switching to the Dragon profile through "Dragon profile steps" 3, 5 and 7.

This is inconsistent and should be fixed.

On my iOS app this actually freezes and breaks the app.

Hardware Specification

Operating system: on linux ubuntu build from vscode RAM: Cores: Device:

Steps to Reproduce the Bug

  1. npm run tauri dev / cargo tauri dev
  2. Select the Crab profile and favorite some credentials
  3. Click the Dragon profile and click on either step 3, 5 or 7
  4. You will still see the Crab credential favorite listed as favorite, the other credentials have disappeared as should the favorite.

on iOS

  1. Open the app
  2. Execute steps 2 and 3 above
  3. The app freezes and breaks at this point on my phone

Expected Behaviour

Ubuntu: It should not keep credentials from the Crab profile in the Dragon profile. iOS: it shouldnt break.

Actual Behaviour

as described in steps to reproduce

Errors

No errors shown. The bug seems to be in the frontend as the emitted state is correct and doesn't hold the old favorites anymore:

{
  "connections": [
    {
      "id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "name": "NGDIL",
      "url": "api.demo.ngdil.com",
      "verified": false,
      "first_interacted": "2024-04-26T15:23:10.119109214+00:00",
      "last_interacted": "2024-04-26T15:23:10.119109214+00:00"
    }
  ],
  "credentials": [
    {
      "id": "32353832-3634-6530-3635-663766373865",
      "issuer_name": "NGDIL",
      "format": {
        "format": "jwt_vc_json"
      },
      "data": {
        "@context": [
          "https://www.w3.org/2018/credentials/v1"
        ],
        "type": [
          "VerifiableCredential",
          "Volunteer Badge"
        ],
        "id": "http://volunteercorps.ngdil.com/6-W_vNdsrgnqXNZTN8Z-v",
        "credentialSubject": {
          "Issuer": "Volunteer Corps",
          "Holder Name": "Dominique Veritas",
          "Badge Name": "Community Volunteer",
          "Description": "This is to certify that the named badge holder has participated with and supported the Volunteer Org. through volunteer practices within the local community over a three month period.",
          "Country": "Netherlands",
          "Language": "Dutch",
          "Activity Start": "07/01/2023",
          "Activity End": "27/03/2023",
          "enrichment": {
            "logo_uri": "https://demo.ngdil.com/imgs/volunteer.svg"
          }
        }
      },
      "metadata": {
        "is_favorite": false,
        "date_added": "2024-04-26T15:23:10.588961874+00:00",
        "date_issued": "null"
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "Volunteer Badge"
    },
    {
      "id": "37323764-3935-3531-3636-386334326265",
      "issuer_name": "NGDIL",
      "format": {
        "format": "jwt_vc_json"
      },
      "data": {
        "@context": [
          "https://www.w3.org/2018/credentials/v1"
        ],
        "type": [
          "VerifiableCredential",
          "School Course Certificate"
        ],
        "id": "http://kw1c.ngdil.com/UGjiCenLkkOSBnMGr4n7h",
        "credentialSubject": {
          "Course Name": "Certificate of Secondary Education",
          "Faculty": "Academics and Humanities",
          "Course Type": "National Certificate",
          "EQF Level": 3,
          "Duration": "2 Years",
          "Description": "Finalisation of standard national education to a National Certificate level passed with distinction in Dutch, English, Sciences, Geography, Technology, and Mathematics",
          "Language": "Dutch",
          "enrichment": {
            "logo_uri": "https://demo.ngdil.com/imgs/kw1c-white.png"
          }
        }
      },
      "metadata": {
        "is_favorite": false,
        "date_added": "2024-04-26T15:23:10.426184364+00:00",
        "date_issued": "null"
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "School Course Certificate"
    },
    {
      "id": "39313132-3661-6238-3462-393936663735",
      "issuer_name": "NGDIL",
      "format": {
        "format": "jwt_vc_json"
      },
      "data": {
        "@context": [
          "https://www.w3.org/2018/credentials/v1",
          "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json"
        ],
        "type": [
          "VerifiableCredential",
          "OpenBadgeCredential"
        ],
        "id": "http://werkgroepil.ngdil.com/HLFi2F2XkSlY4vtt9hiA0",
        "name": "Higher Education Information Literacy Level 1",
        "issuer": {
          "id": "http://werkgroepil.ngdil.com/",
          "type": [
            "Profile"
          ],
          "name": "Werkgroep Information Literacy"
        },
        "issuanceDate": "2024-04-26T15:23:10.219Z",
        "credentialSubject": {
          "type": [
            "AchievementSubject"
          ],
          "achievement": {
            "id": "http://werkgroepil.ngdil.com/HLFi2F2XkSlY4vtt9hiA0",
            "type": "",
            "criteria": {
              "narrative": ""
            },
            "name": "Higher Education Information Literacy Level 1",
            "description": "Information Literacy is the set of integrated skills that includes the reflective discovery of information, the understanding of how information is produced and valued, and the use of information to create new knowledge and ethical participation in learning communities.",
            "image": {
              "id": "https://demo.ngdil.com/imgs/werk.png",
              "type": "Image"
            },
            "Issuer": "Werkgroep Information Literacy",
            "Language of Education": "Dutch",
            "Issued to": "Dominique Veritas",
            "Learning outcomes": "LEVEL 1 - To obtain this badge, the student has demonstrated that he/she is able to:\n\t\t1. Orientation and specification\n\t\t- identify the need for information on a particular topic\n\t\t- identify characteristics of information sources on a particular topic\n\t\t- find suitable information sources and evaluate them based on a particular topic"
          }
        }
      },
      "metadata": {
        "is_favorite": false,
        "date_added": "2024-04-26T15:23:10.756813021+00:00",
        "date_issued": "\"2024-04-26T15:23:10.219Z\""
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "Higher Education Information Literacy Level 1"
    },
    {
      "id": "65313633-6666-3135-6464-636630373861",
      "issuer_name": "NGDIL",
      "format": {
        "format": "jwt_vc_json"
      },
      "data": {
        "@context": [
          "https://www.w3.org/2018/credentials/v1"
        ],
        "type": [
          "VerifiableCredential",
          "National ID"
        ],
        "id": "http://gov.ngdil.com/PlVWGRyzjZ_Or30TJYm_T",
        "credentialSubject": {
          "Surname": "Veritas",
          "Given Name": "Dominique",
          "Passport Number": "IRM0LELRM3BCX7Q-XNGJK",
          "Date of Birth": "22/12/2001",
          "enrichment": {
            "logo_uri": "https://demo.ngdil.com/imgs/gov.svg"
          }
        }
      },
      "metadata": {
        "is_favorite": false,
        "date_added": "2024-04-26T15:23:10.252281175+00:00",
        "date_issued": "null"
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "National ID"
    },
    {
      "id": "65343639-6535-6236-3939-313463653461",
      "issuer_name": "NGDIL",
      "format": {
        "format": "jwt_vc_json"
      },
      "data": {
        "@context": [
          "https://www.w3.org/2018/credentials/v1",
          "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json"
        ],
        "type": [
          "VerifiableCredential",
          "OpenBadgeCredential"
        ],
        "id": "http://kw1c.ngdil.com/PLQipU5hQawZKuE8rNdni",
        "name": "Business Innovation & Interdisciplinair Samenwerken",
        "issuer": {
          "id": "http://kw1c.ngdil.com/",
          "type": [
            "Profile"
          ],
          "name": "Koning Willem I College"
        },
        "issuanceDate": "2024-04-26T15:23:10.225Z",
        "credentialSubject": {
          "type": [
            "AchievementSubject"
          ],
          "achievement": {
            "id": "http://kw1c.ngdil.com/PLQipU5hQawZKuE8rNdni",
            "type": "",
            "criteria": {
              "narrative": ""
            },
            "name": "Business Innovation & Interdisciplinair Samenwerken",
            "description": "This badge illustrates the holder has demonstrated their abilities to collaborate with colleagues, work in a team to solve information problems, use renewal techniques, models, methods and strategies that contribute to the promotion of innovation-oriented developments, creative thinking to generate new ideas or innovative new solutions, innovation of current practices' to improve and present alternative thinking and new methods that can solve work related problems.",
            "image": {
              "id": "https://demo.ngdil.com/imgs/hta.png",
              "type": "Image"
            },
            "Language of Education": "Dutch",
            "Issued to": "Dominique Veritas",
            "Criteria": "Over the period of 10 weeks the holder of this badge has learned interdisciplinary skill through practical experiences with real companies and institutions in the region. The holder has demonstrated they can collaborate as part of a team, effectively communicate, research and apply new technologies and innovations, creatively solve problems, and contribute to global goals.",
            "Evidence": "The owner of this badge has learned and worked in an interdisciplinary team on a challenge from a real company or institution from the region. The interdisciplinary team has gone through various phases to arrive at a creative, innovative solution that is suitable for the client. The team presented the learning process and the solution through a pitch to the client."
          }
        }
      },
      "metadata": {
        "is_favorite": false,
        "date_added": "2024-04-26T15:23:10.922691917+00:00",
        "date_issued": "\"2024-04-26T15:23:10.225Z\""
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "Business Innovation & Interdisciplinair Samenwerken"
    }
  ],
  "search_results": {
    "current": [],
    "recent_credentials": []
  },
  "profile_settings": {
    "locale": "en-US",
    "profile": {
      "name": "Shenron",
      "picture": "&#x1F432",
      "theme": "dark",
      "primary_did": "did:key:z6Mkq3WbpfBDmr2MABMqAzfUNTquYsoJ3TJ1MdmfmX3oZU3P"
    }
  },
  "current_user_prompt": {
    "type": "redirect",
    "target": "me"
  },
  "user_journey": null,
  "debug_messages": [],
  "history": [
    {
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "connection_name": "NGDIL",
      "event_type": "ConnectionAdded",
      "date": "2024-04-26T15:23:10.119109214+00:00",
      "credentials": []
    },
    {
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "connection_name": "NGDIL",
      "event_type": "CredentialsAdded",
      "date": "2024-04-26T15:23:10.119109214+00:00",
      "credentials": [
        {
          "title": "National ID",
          "issuer_name": "NGDIL",
          "id": "65313633-6666-3135-6464-636630373861"
        },
        {
          "title": "School Course Certificate",
          "issuer_name": "NGDIL",
          "id": "37323764-3935-3531-3636-386334326265"
        },
        {
          "title": "Volunteer Badge",
          "issuer_name": "NGDIL",
          "id": "32353832-3634-6530-3635-663766373865"
        },
        {
          "title": "Higher Education Information Literacy Level 1",
          "issuer_name": "NGDIL",
          "id": "39313132-3661-6238-3462-393936663735"
        },
        {
          "title": "Business Innovation & Interdisciplinair Samenwerken",
          "issuer_name": "NGDIL",
          "id": "65343639-6535-6236-3939-313463653461"
        }
      ]
    }
  ],
  "extensions": {},
  "dev_mode": "OnWithAutologin"
}