This PR introduces two fundamental changes to the Claim schema:
Claims are now mapped to a Transaction (Relational key constraint).
Claims now only hold a single Proof. If a Transaction includes multiple proofs, multiple claims will be created
The reason for this change is, that it makes it a lot easier to keep the database clean. This PR also includes logic to regularly (when user check their balance) check if tokens currently marked as "ready" are still unspent and updates their status if they are not. Claim route and balance route also no longer select ALL proofs but only those with status as "ready"
This PR introduces two fundamental changes to the Claim schema:
The reason for this change is, that it makes it a lot easier to keep the database clean. This PR also includes logic to regularly (when user check their balance) check if tokens currently marked as "ready" are still unspent and updates their status if they are not. Claim route and balance route also no longer select ALL proofs but only those with status as "ready"