This commit introduces new transaction routes for handling various transaction-related operations. It also includes updates to the `config.py` file to support these new features.
The following files were modified:
- `README.md`: Updated documentation to clarify .env variables and their purposes
- `To-Do.md`: Updated task meaningless
- `config.py`: Added COLLECT_COOLDOWN and TAX_ACCOUNT_BID configurations.
Main Thing:
- `interbend/routes/transaction_routes.py`:
Added boilerplate transaction to handle all transfers and separated business transfers with tax application.
/transfer for personal transfers
/transfer-business for business transfers with tax deduction
TODO: add route to change tax rate and add non hardcoded tax rate.
Type 6 and 7 are reserved for future use. currently implemented are 0 and 1.
Added COLLECT_COOLDOWN default to 24 hours if not set in env.
Fixed .gitignore to ignore vscode settings and python cache files.
Added new transaction history to To-Do and marked as finished - Needs to be tested´
why tf am I commiting this on main branch?
This commit addresses several issues in the `/collect` endpoint to improve its security and robustness. It also introduces a `To-Do.md` file as requested by the user.
Key changes:
- Refactored the `/collect` endpoint to use a single database transaction, preventing data inconsistencies.
- Fixed SQL injection vulnerabilities by converting all database queries to use parameterized statements.
- Corrected a `TypeError` by ensuring the `COLLECT_COOLDOWN` configuration variable is always an integer.
- Updated transaction logging to record 'SYSTEM' as the source of funds for salary collections, instead of a "NULL" string.
- Added a `To-Do.md` file with suggestions for future features, including an automated payroll system, user transaction history, and an admin panel.