rafiki icon indicating copy to clipboard operation
rafiki copied to clipboard

Delete an unused asset

Open JoblersTune opened this issue 1 year ago • 3 comments

Context

The goal is to be able to delete an asset if no transactions were done for it, and no wallet/account is using it. This will involve backend checks to ensure those requirements are met (any concerns about race conditions) Then the GraphQL query will need to be created on the backend And the Admin UI will also need to be updated accordingly

Todos

  • [ ]

JoblersTune avatar Mar 20 '24 12:03 JoblersTune

@JoblersTune @lengyel-arpad85 Can we deactivate rather than delete?

sabineschaller avatar Apr 30 '24 09:04 sabineschaller

@sabineschaller we could do a soft delete (have a time stamp for deletedAt), but then we have to make changes in more places to not display / use these, when creating a new one we would have to check if there is no asset with same code, but exclude deleted ones also, from what I understood this is for the cases when someone creates an asset with a wrong code or scale (which aren't editable afterwards) ... what would be the benefit of keeping them ?

lengyel-arpad85 avatar Apr 30 '24 09:04 lengyel-arpad85

@sabineschaller well, my previous comment might be mute ... seems like tigerbeetle has no support for delete (at least I could not find any), so we have no way of deleting a record outside of psql, so only way is to mark them as inactive/deleted

lengyel-arpad85 avatar Apr 30 '24 16:04 lengyel-arpad85