Only the initial version was committed for now, I'll revise it later - 12.14/14:43
down the finnal version - 12.14/22:00
deposit(amount)
: Perform deposit operations.withdraw(amount)
: Perform withdrawal operations.transfer(recipient_wallet, amount)
: Transfer funds to a specified user's wallet.view_transaction_history()
: View the transaction history.update_personal_info()
: Update the user's personal information (e.g., name, email, phone).loan_or_repay()
: Apply for a loan or repay outstanding loan amounts.
_add_transaction(transaction_type, amount, recipient_id)
: Add a transaction record._check_daily_limit(amount)
: Check if the daily transaction limit is exceeded.add_daily_interest()
: Calculate daily interest at the specified rate.validate_input(input_type, value)
: Validate input formats (e.g., wallet ID, email, password).
login_or_register()
: Provide login and registration options.- During login, check if the wallet ID exists and if the password is correct.
- During registration, validate the user's input format and generate a new wallet file.
wallet_menu(wallet)
: The main menu for wallet functionalities, including the following operations:- Deposit funds (
deposit
). - Withdraw funds (
withdraw
). - Transfer funds (
transfer
). - Apply for or repay a loan (
loan_or_repay
). - View or update personal information (
update_personal_info
). - View transaction history (
view_transaction_history
). - Exit the system.
- Deposit funds (
- Stable and efficient storage of wallet data.
- All user data is saved in JSON files under the
wallet_data
folder. - In-memory cache (
_cache
) improves read efficiency.
- Supports essential functions like deposits, withdrawals, and transfers.
- Includes daily transaction limits and single transaction amount caps.
- Have a daily compounding system
- Users can apply for loans based on their cumulative deposits.
- Supports partial or full loan repayment.
- Validates user input and enforces strict format requirements for passwords, emails, etc.
- Accounts are frozen if daily transaction limits are exceeded.
- Users can update their name, email, and phone number at any time.