Remove plaid initialiser (#317)

* Remove plaid initialiser

The initializer can be safely removed because:
  - Config is lazily loaded via Provider::Registry
  - reload_configuration is called after settings updates
  - All calling code handles nil configs gracefully
  - Initial nil state is fine - config loads on first use

* Fix for missing config

* Actually don't pollute application.rb

* Add currency loading for balances

* Fix race condition on lazy load

* Allow loans to be imported in lunch flow also

* Fix currency processor
This commit is contained in:
soky srm
2025-11-12 16:01:19 +01:00
committed by GitHub
parent fad241c416
commit e8f935bc6f
14 changed files with 134 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ namespace :data_migration do
# 2025-02-07: EU Plaid items need to be moved over to a new webhook URL so that we can
# instantiate the correct Plaid client for verification based on which Plaid instance it comes from
task eu_plaid_webhooks: :environment do
Provider::PlaidEuAdapter.ensure_configuration_loaded
provider = Provider::Plaid.new(Rails.application.config.plaid_eu, region: :eu)
eu_items = PlaidItem.where(plaid_region: "eu")