mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Move money market tickers and patterns to configuration (#712)
Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user