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.
22 lines
No EOL
638 B
Python
22 lines
No EOL
638 B
Python
import os
|
|
from dotenv import load_dotenv
|
|
|
|
# Find the absolute path of the root directory
|
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
|
load_dotenv(os.path.join(basedir, '.env'))
|
|
|
|
class Config:
|
|
# General Config
|
|
JWT_KEY = os.getenv('JWT_KEY')
|
|
JWT_EXPIRE = int(os.getenv('JWT_EXPIRATION', 30))
|
|
|
|
# Database
|
|
DB_HOST = os.getenv('DB_HOST')
|
|
DB_USER = os.getenv('DB_USER')
|
|
DB_PASSWORD = os.getenv('DB_PASSWORD')
|
|
DB_NAME = os.getenv('DB_NAME')
|
|
|
|
# Admin
|
|
ADMIN_KEY = os.getenv('ADMIN_KEY')
|
|
COLLECT_COOLDOWN = int(os.getenv('COLLECT_COOLDOWN', 24))
|
|
TAX_ACCOUNT_BID = os.getenv('TAX_ACCOUNT_BID') |