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: favorites added in Ferris are kept when switching to Shenron #209

Open Oran-Dan opened 2 months ago

Oran-Dan commented 2 months ago

Description

Currentle when adding favorites in the ferris profile and then switching to shenron using step 3, 5 or 7, the favorite credential will remain. The non favorite credentials disappear. Therefore, it comes across rather inconsistent.

It seems to be a frontend problem since the emitted state from the backend is:

  "connections": [
    {
      "id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "name": "NGDIL",
      "url": "api.demo.ngdil.com",
      "verified": false,
      "first_interacted": "2024-04-26T11:03:57.437968053+00:00",
      "last_interacted": "2024-04-26T11:03:57.437968053+00:00"
    }
  ],
  "credentials": [
    {
      "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/BMCUt49_tqgSxmK9ys8as",
        "name": "Business Innovation & Interdisciplinair Samenwerken",
        "issuer": {
          "id": "http://kw1c.ngdil.com/",
          "type": [
            "Profile"
          ],
          "name": "Koning Willem I College"
        },
        "issuanceDate": "2024-04-26T11:03:57.528Z",
        "credentialSubject": {
          "type": [
            "AchievementSubject"
          ],
          "achievement": {
            "id": "http://kw1c.ngdil.com/BMCUt49_tqgSxmK9ys8as",
            "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-26T11:03:58.241184367+00:00",
        "date_issued": "2024-04-26T11:03:57.528Z"
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "Business Innovation & Interdisciplinair Samenwerken"
    },
    {
      "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/12aVOzF9WcNdXypcPzl-r",
        "name": "Higher Education Information Literacy Level 1",
        "issuer": {
          "id": "http://werkgroepil.ngdil.com/",
          "type": [
            "Profile"
          ],
          "name": "Werkgroep Information Literacy"
        },
        "issuanceDate": "2024-04-26T11:03:57.524Z",
        "credentialSubject": {
          "type": [
            "AchievementSubject"
          ],
          "achievement": {
            "id": "http://werkgroepil.ngdil.com/12aVOzF9WcNdXypcPzl-r",
            "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-26T11:03:58.077066513+00:00",
        "date_issued": "2024-04-26T11:03:57.524Z"
      },
      "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/jemsTadNrgd5jjn4Rc1GR",
        "credentialSubject": {
          "Surname": "Veritas",
          "Given Name": "Dominique",
          "Passport Number": "1_7-EOS4TDC7F6ZSFMTYJ",
          "Date of Birth": "22/12/2001",
          "enrichment": {
            "logo_uri": "https://demo.ngdil.com/imgs/gov.svg"
          }
        }
      },
      "metadata": {
        "is_favorite": false,
        "date_added": "2024-04-26T11:03:57.546363019+00:00",
        "date_issued": ""
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "National ID"
    },
    {
      "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/q-D2RrrOvAUC88k-x9cVL",
        "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-26T11:03:57.713715865+00:00",
        "date_issued": ""
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "School Course Certificate"
    },
    {
      "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/EHBuxkfNbVbN-AKKXqE7-",
        "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-26T11:03:57.902072016+00:00",
        "date_issued": ""
      },
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "display_name": "Volunteer Badge"
    }
  ],
  "search_results": {
    "current": [],
    "recent_credentials": []
  },
  "profile_settings": {
    "locale": "en-US",
    "profile": {
      "name": "Shenron",
      "picture": "&#x1F432",
      "theme": "dark",
      "primary_did": "did:key:z6MkngfT9CHemnsyPgt4ijdDD66eYPR7fqxoruJV31ET3NWU"
    },
    "sorting_preferences": {
      "credentials": {
        "sort_method": "name_az",
        "reverse": false
      },
      "connections": {
        "sort_method": "name_az",
        "reverse": false
      }
    }
  },
  "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-26T11:03:57.437968053+00:00",
      "credentials": []
    },
    {
      "connection_id": "41b2bee062bb5c76bc1898edbd1c6ca52386345495311634080bb433be30da15",
      "connection_name": "NGDIL",
      "event_type": "CredentialsAdded",
      "date": "2024-04-26T11:03:57.437968053+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"
}

This specific state is emitted after clicking step 7 "share credentials", giving the following onscreen result: Screenshot from 2024-04-26 13-09-10

Motivation

Improve DX

Resources

No response

To-do List