kin-labs / kinetic

MIT License
40 stars 24 forks source link

refactor: change logic behind balance checker #545

Closed beeman closed 1 year ago

beeman commented 1 year ago

This PR changes how the balance checker (that powers the balance webhook) runs.

Previously, we kept a record of 'wallet balances' for each wallet. The initial idea was to store the data to later visualize it for trends, etc, but we decided that this was better done using existing specialized tools.

In this PR the whole concept of the WalletBalance entity will be removed. It includes a MIGRATION that cleans up the old records from the database. We will keep that migration in any RC version, then remove the latest reference to the WalletBalance entity from the Prisma schema.

It does mean we can no longer send along the changed value as we don't keep track of historical values.

nx-cloud[bot] commented 1 year ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 9781c9b9777a8d369039351241ca9ed18784f3a2. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 6 targets - [`nx affected --target=build --parallel --max-parallel=3`](https://cloud.nx.app/runs/XTcuPl3Fe2) - [`nx affected --target=lint --parallel --max-parallel=3`](https://cloud.nx.app/runs/yFiSUuY5fv) - [`nx affected --target=test --parallel --max-parallel=3`](https://cloud.nx.app/runs/QLSCQR6BIP) - [`nx e2e api-e2e --skip-nx-cache`](https://cloud.nx.app/runs/h19DRHWlou) - [`nx e2e sdk-e2e --skip-nx-cache`](https://cloud.nx.app/runs/kXsT4IW1VF) - [`nx e2e web-e2e --skip-nx-cache`](https://cloud.nx.app/runs/s3gV92I857)

Sent with 💌 from NxCloud.