Add comprehensive tests for multi-output transaction tracking defect fix #85
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/multi-output-refunds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds complete test coverage for the critical fix where multi-output refund transactions
now set both refund_tx_hash AND swept_tx_hash to prevent re-sweeping already swept payments.
Key test scenarios covered:
The tests validate that the "insufficient funds" error has been resolved by ensuring
payments with existing swept_tx_hash are not swept again.
Summary by CodeRabbit
Walkthrough
Adds tracking of shop-sweep data for multi-output refund transactions, updates Monero confirmation API to accept account_index, inserts related logging, expands tests for refund+sweep scenarios, updates documentation with cryptocurrency RPC access and UUID guidance, and applies cosmetic string-style changes in HTML sanitizer.
Changes
make_post_sell/lib/crypto_watcher/__init__.pyswept_tx_hash,swept_amount, andswept_timestampwhen a refund transaction also sweeps to the shop; add logging around refund+sweep events; changeget_monero_tx_confirmations(client, tx_hash)→get_monero_tx_confirmations(client, tx_hash, account_index)and update all call sites.make_post_sell/tests/test_multi_output_transaction_tracking.pyTestMultiOutputTransactionTrackingwith tests for refund+shop-sweep behavior, shop sweep amount calculations (including DOGE specifics), prevention of double-sweep, shared TX hash handling, and a DB-tracking reproduction scenario; uses mocks for payments/invoices/shops.CLAUDE.mduuid_strand note dash-free storage with example queries.make_post_sell/lib/sanitize_html.pySequence Diagram(s)
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~60 minutes
Poem
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free
📥 Commits
Reviewing files that changed from the base of the PR and between
8301e23c3fandf85cd3907c.📒 Files selected for processing (1)
make_post_sell/tests/test_multi_output_transaction_tracking.py(1 hunks)Comment
@coderabbitai helpto get the list of available commands and usage tips.changed the description
aborted the automatic merge because source branch was updated
added 1 commit
f85cd390- Fix SQLAlchemy initialization issue in multi-output transaction testsCompare with previous version
changed the description
mentioned in commit
b82c6269bc