Open thilohille opened 1 year ago
I wouldn't check the UID at all... It only makes things harder, not easier.
It would fix this issue but also didn't force users to delete the keys from server unless they really need to. This is why there is an unique ID for each boltcard record in database. It doesn't matter if more bolt cards records (boltcards configured) does have the same UID, the server determines it with the boltcard record external_id, not the card uid.
I don't see a problem even if two users uses the same card UID (I can wipe the card but keep the keys configured, and then gitf the card to somebody to have it or just to try it for some time). Now it is not possible as mentioned in this issue.
If you delete a wallet without deleteing the cards first the cards are orphaned.
That UID cannot be used on that server again. Also the card cannot be deleted using the api leaving no easy way out.
Shouldnt the column "wallet" in the "cards"-table be a FOREIGN KEY with CASCADE DELETE?