Move money market tickers and patterns to configuration (#712)

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
This commit is contained in:
LPW
2026-01-20 01:44:12 -05:00
committed by GitHub
parent 650f02ee2d
commit da9148c8be
2 changed files with 29 additions and 19 deletions

View File

@@ -12,4 +12,22 @@ Rails.application.configure do
pending_env = ENV["SIMPLEFIN_INCLUDE_PENDING"].to_s.strip.downcase
config.x.simplefin.include_pending = pending_env.blank? ? true : !falsy.include?(pending_env)
config.x.simplefin.debug_raw = truthy.include?(ENV["SIMPLEFIN_DEBUG_RAW"].to_s.strip.downcase)
# Common money market fund tickers that should be treated as cash equivalents
# These are settlement funds that users consider "cash available to invest"
# SimpleFIN doesn't provide is_cash_equivalent metadata like Plaid does,
# so we detect by ticker symbol and description patterns
config.x.simplefin.money_market_tickers = %w[
VMFXX VMMXX VMRXX VUSXX
SPAXX FDRXX SPRXX FZFXX FDLXX
SWVXX SNVXX SNOXX
TTTXX PRTXX
].freeze
# Patterns that indicate money market funds (case-insensitive)
config.x.simplefin.money_market_patterns = [
/money\s*market/i,
/settlement\s*fund/i,
/cash\s*reserve/i
].freeze
end