Skip to content

Fix date comparison error and add disbursement transaction support#2

Open
thebruge wants to merge 1 commit intoRyderpro:mainfrom
thebruge:fix-disbursement-and-date-handling
Open

Fix date comparison error and add disbursement transaction support#2
thebruge wants to merge 1 commit intoRyderpro:mainfrom
thebruge:fix-disbursement-and-date-handling

Conversation

@thebruge
Copy link
Copy Markdown

@thebruge thebruge commented Jan 6, 2026

Summary

This PR addresses two issues in the Venmo history export script:

1. Fixed date comparison error (line 203-204)

  • Added type check before date comparison to handle cases where hash[:date_completed] might already be a Date object
  • Prevents comparison errors by parsing only when needed
  • Resolves issues when comparing dates of different types

2. Added support for disbursement transaction type (lines 181-189)

  • Added new when "disbursement" case handler to properly process disbursement events
  • Maps disbursement events to transaction format with proper fields:
    • date_completed: parsed from event['date_created']
    • description: transaction type (DISBURSEMENT)
    • amount: from event['disbursement']['amount']
    • name: merchant display name from event['disbursement']['merchant']['display_name']
  • Prevents disbursements from falling through to the unknown event handler

Test Plan

  • Tested with Venmo history data containing disbursement transactions
  • Verified date comparison works with both Date objects and string dates
  • Confirmed disbursement transactions are properly exported to CSV

🤖 Generated with Claude Code

This commit addresses two issues in the Venmo history export script:

1. Fixed date comparison error (line 203-204):
   - Added type check before date comparison to handle cases where
     hash[:date_completed] might already be a Date object
   - Prevents comparison errors by parsing only when needed

2. Added support for disbursement transaction type (lines 181-189):
   - Added new 'when "disbursement"' case handler
   - Maps disbursement events to transaction format with proper fields:
     date_completed, description, amount, and merchant display_name
   - Prevents disbursements from falling through to unknown event handler

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant