- Fix history page showing "refund pending" for underpaid-not-refunded status
- Add specific condition for -not-refunded statuses before -refunded condition
- Fix email templates to not show fee messages for no-refund cases
- Economically unviable refunds now show payment details only, not refund details
- Remove misleading "no fees deducted" message from no-refund scenarios
- Created .cart-continue-shopping-button class with blue styling
- Replaced product-edit-button class with cart-continue-shopping-button
- Button now has consistent styling across desktop and mobile
Removed support contact messages from:
- No refund address scenario emails
- Both text and HTML email templates
This is consistent with the policy that no support is offered for refunds.
Enhanced the refund email system to properly notify users when their
cryptocurrency refunds cannot be processed due to being economically
unviable (too small to cover network transaction fees).
Changes:
- Updated send_refund_email() to differentiate between "no refund address"
and "economically unviable" scenarios with appropriate messaging
- Added email notifications in crypto watcher for all NOT_REFUNDED status
transitions due to economic viability:
* Duplicate payment processing (line ~1770)
* Expired payment processing (line ~2145)
* Underpayment processing (line ~2905)
* Passive monitoring refund retries (line ~3280)
- Added proper error handling for email sending to prevent disruption
- All economically unviable refund tests pass with no regressions
Users now receive clear explanations when refunds are too small to send
rather than being left without notification.
- Modify protect_links function to apply shop theme_link_color to all links
- Add custom CSS validation using regex patterns for security
- Support hex colors (#fff, #ffffff), rgb(), rgba(), hsl(), hsla(), and named colors
- Reject malicious inputs like javascript: schemes
- Add style attribute to allowed attributes for anchor tags
- Pass shop reference through cleaner object for color access
- Update DOGE sweep tests to expect _call method with subtractfeefromamount
- Fix refund tests to properly mock sendmany method calls
- Update sweep_restocking_fee to use consistent _call interface
- Adjust tests to account for estimatesmartfee calls before sweeps
- Update XMR refund tests to match actual implementation flow
All 101 crypto_watcher tests now pass successfully.
- Use subtractfeefromamount=True parameter in sendtoaddress for DOGE sweeps
- This allows Dogecoin to automatically deduct network fee from the sweep amount
- Resolves 500 errors when trying to sweep the exact wallet balance
- Regular payment sweeps remain single-output transactions (no multi-output needed)
- Query DOGE sweeps only if < 2 confirmations
- Query XMR sweeps only if < 10 confirmations
- Set model default to 0 for new sweeps
- Migration sets server_default to 10 for existing records
- This prevents monitoring already-confirmed legacy sweeps
- Added global OUTBOUND_CONFIRMATIONS_REQUIRED config (2 for DOGE, 10 for XMR)
- Added swept_confirmations field to CryptoPayment model
- Modified auto-sweep functions to track confirmations instead of immediately transitioning to confirmed-complete
- Added process_sweep_confirmations() to monitor sweep transactions
- Standardized confirmation requirements for both sweeps and refunds
- Created alembic migration 0915b3ff883d for swept_confirmations field
This ensures we track when funds actually leave the hot wallet and provides consistent monitoring for all outbound transactions.
- Add check for is_physical=False in addition to has_product_file
- Add detailed logging to diagnose redirect issues
- Physical products should always redirect to invoice
- Digital products without files should redirect to invoice
- Only digital products with files should redirect to product page
- DOGE_REFUND_FEE_BUFFER now defined at top of file (line 22)
- Clear comments explaining when/why to adjust it
- Error messages point directly to the constant
- Still overridable via environment variable
- Log clear error messages when fee buffer is too low
- Show exact shortfall amount and required action
- Add DOGE_REFUND_FEE_BUFFER environment variable for dynamic adjustment
- Log actual fee buffer used on successful refunds
- Add helpful comment in vars.sh about the fee buffer setting
Now when watching crypto-watcher logs, admins will see:
- 'INSUFFICIENT FUNDS - Fee estimate too low\!'
- Current buffer, shortfall amount, and line number to fix
- Success messages show actual vs estimated fee usage
This makes it much easier to adjust the fee buffer without diving into code.
- Reduce fee buffer from 0.01 to 0.005 DOGE (actual fee was 0.0026)
- Remove excessive logging throughout refund process
- Simplify sendmany retry logic - just try funded account then default
- Remove unnecessary balance checks and debug logging
- Fix test mocks to use sendmany instead of _call
This reduces the dust left in temporary wallets from ~0.011 to ~0.005 DOGE
- Add payment amount to shop output for overpayment refunds
- Both XMR and DOGE now send payment + restocking fee to shop
- Fix insufficient funds error by using conservative fee buffer (0.01 DOGE)
- Round outputs down to 3 decimal places to avoid precision issues
- Update sendmany to try actual account first (where funds are located)
- Add better error handling for different account formats
- Fix fee calculation to properly account for Dogecoin's fee-on-top model
The issue was that sendmany adds network fee on top of outputs, and we
were trying to send exactly the wallet balance, leaving no room for fees.
Now we reserve 0.01 DOGE for fees and round conservatively.
- Each crypto processor now scans only its assigned Monero account
- Scan position is tracked independently per processor
- Fixed indentation in scan loop that was broken during refactoring
- Updated tests to match new per-account scanning behavior
- Resolves issue where payments on accounts other than 0 weren't updating scan position
- Add 'all_accounts': True to XMR get_transfers query
- Fixes scan position not updating when payments arrive on other accounts
- Dogecoin scan already works correctly (queries all addresses)
- Ensures new transfers on any account update the scan position
- Use only 'name' field from User model for privacy
- Remove references to full_name and email from logs
- Fallback to user ID if name is not available
- User model has 'name' not 'username' or 'display_name'
- Add joinedload for user and shop in all CryptoPayment queries
- Import sqlalchemy for ORM operations
- Ensures user display_name/username shows in payment logs
- Fixes missing user information in crypto_watcher logs
- Create make_post_sell/lib/crypto_watcher/ directory structure
- Move crypto_watcher.py to crypto_watcher/__init__.py
- Move crypto_payment_rescue.py to crypto_watcher/
- Move crypto_clients.py to crypto_watcher/
- Update all imports to use the new package structure
- Fix relative imports within the crypto_watcher package
- Update imports in request_methods.py, views, and all tests
- Fix late payment misidentification (pending vs confirmed status)
- Update terminology: 'late payment' only for expired/cancelled states
- All 141 tests passing
- Only log 'Overpayment within 5% threshold' when received > expected
- Skip the log message for exact payment matches
- Prevents confusion when payment amount exactly matches expected amount
- Replace all 171 direct logger calls with CryptoWatcherLogger methods
- Fix XMR scan position persistence issue (was resetting to None/0)
- Remove redundant formatting methods from CryptoPayment model
- Update all test mocks to use central logging system
- Ensure scan position updates even when no transfers found
- Remove pointless _get_status_description() that just returned self.status
- Remove useless format_transaction_log() only used in tests
- Consolidate duplicated amount formatting logic into _format_amount() helper
- Fix XMR precision from 6 to 12 decimals for accuracy
- Strip trailing zeros from formatted amounts for cleaner output
- Simplify format_confirmation_status() by removing redundant text
- Eliminate unnecessary method delegation in __str__()
- Apply black formatting
- Add section explaining real-time status updates on quote page
- Document automatic redirects to invoice/download upon confirmation
- Clarify that payment buttons are disabled once payment received
- Note that confirmations can be as fast as 2 for digital goods
- Remove duplicate dogecoin.conf examples from Advanced Configuration
- Simplify to reference make dogecoin-config command
- Keep only essential full node vs pruned mode trade-offs
- Remove incorrect SQL index examples from DOGECOIN.md and MONERO.rst
- Simplify Dogecoin node security section to reference make command
- Stop leaking database schema details in user-facing documentation
- Change from 50GB to 200GB+ for full blockchain size
- Update space savings calculation from 96% to 99%
- Based on growth from 110GB in early 2024 to likely 200GB+ in 2025