unlock
unlock copied to clipboard
Improve Verification data
A s a Improvement Idea for QR verification in Memberships, it would be interesting to have the hability to add names when adding verifiers.
Later, when these verifiers mark tickets as checked in, it would show the adress and the specified name of the verifier.
Name is important for when working with a lot of verifiers/partners with the possibility to add a name when adding the verifier wallet address, so it appears:
Checked In : A few seconds ago
Verifier: Name (in case there is) / Wallet address (with ENS resolution)...
Let's add a 200 USDC bounty/reward for that one!
There are 2 things that need to be touched/changed:
- the backend side (called
locksmith
) to add the name of the verifier to theVerifiers
table (you will need to add a migration...) and update the API endpoints (when adding a Verifier) and making sure the name is also listed when listing verifiers) - The frontend side (called
unlock-app
): update theVerifierForm
Thanks for the tips @julien51 . I started worked on this and did the 2 things that you mention, and I think there is more places that we need to change or I am not understanding well the requirements.
I need to create an array replacing checkedInAt for a new array, could be named checkedInMetadata where I save the checkedIn date and the verifier metadata. Then I need to change as well the KeyData model to include the account that verified the QR code or the Ticket.
On ticket controller on the method markTicketAsCheckIn I need to pass the account that verified to then be able to save on the KeyData model, for finally pass this data on the method getTicket.
Let me know if this makes sense.
I need to create an array replacing checkedInAt for a new array, could be named checkedInMetadata where I save the checkedIn date and the verifier metadata. Then I need to change as well the KeyData model to include the account that verified the QR code or the Ticket.
Oh we actually already support multiple check-ins as the metadata checkedInAt
can be an array (see https://github.com/unlock-protocol/unlock/blob/099032f7a96c0e1550f19abeaaac576f42bd368a/locksmith/src/controllers/v2/ticketsController.tsx#L46). This code is a bit complicated already because it handles both the (legacy) single check-in and multiple check-ins. One idea could be to change this array of timestamp to an array of {time,verifier} objects.
@julien51 should I move forward with my approach?
@JoaoCampos89 Let's try, yes!
@JoaoCampos89 any progress on that front?
@julien51 I will try to do a pull request till end of this week.
@julien51 I added a initial pull request for this, let me know if I am on the right path.
@JoaoCampos89 you'te but only in the right path but you're almost there!