mirror of
https://github.com/we-promise/sure.git
synced 2026-04-20 20:44:08 +00:00
Add SnapTrade brokerage integration with full trade history support (#737)
* Introduce SnapTrade integration with models, migrations, views, and activity processing logic. * Refactor SnapTrade activities processing: improve activity fetching flow, handle pending states, and update UI elements for enhanced user feedback. * Update Brakeman ignore file to include intentional redirect for SnapTrade OAuth portal. * Refactor SnapTrade models, views, and processing logic: add currency extraction helper, improve pending state handling, optimize migration checks, and enhance user feedback in UI. * Remove encryption for SnapTrade `snaptrade_user_id`, as it is an identifier, not a secret. * Introduce `SnaptradeConnectionCleanupJob` to asynchronously handle SnapTrade connection cleanup and improve i18n for SnapTrade item status messages. * Update SnapTrade encryption: make `snaptrade_user_secret` non-deterministic to enhance security. --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com> Co-authored-by: luckyPipewrench <luckypipewrench@proton.me> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
20
test/fixtures/snaptrade_items.yml
vendored
Normal file
20
test/fixtures/snaptrade_items.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
# Minimal fixtures for SnapTrade items
|
||||
# Per CLAUDE.md: Keep fixtures minimal (2-3 per model for base cases)
|
||||
|
||||
configured_item:
|
||||
family: dylan_family
|
||||
name: "SnapTrade Connection"
|
||||
client_id: "test_client_id"
|
||||
consumer_key: "test_consumer_key"
|
||||
snaptrade_user_id: "user_123"
|
||||
snaptrade_user_secret: "secret_abc"
|
||||
status: good
|
||||
scheduled_for_deletion: false
|
||||
pending_account_setup: false
|
||||
|
||||
unconfigured_item:
|
||||
family: empty
|
||||
name: "Pending Setup"
|
||||
status: good
|
||||
scheduled_for_deletion: false
|
||||
pending_account_setup: true
|
||||
Reference in New Issue
Block a user