Files
sure/app/models/provider/metadata.rb
Guillem Arias 77a100b345 fix(provider/metadata): add plaid_eu entry
`plaid_eu` is registered as a separate Provider::ConfigurationRegistry
entry but had no Provider::Metadata row, so its card in the
Available grid fell through to the gray-500 default and rendered
empty (no region, kind, tier, or tagline). The title also came out
as "Plaid Eu" because `titleize` doesn't know "EU" is an initialism.

- Add a `plaid_eu` row to Provider::Metadata::REGISTRY with the same
  shape as `plaid` (US → EU, otherwise identical).
- Introduce an optional `name:` field in metadata; controller falls
  back to it before titleizing the provider key. Lets `plaid_eu`
  render as "Plaid EU".
- Add the missing `settings.providers.taglines.plaid_eu` translation.
2026-05-09 13:22:01 +02:00

98 lines
2.1 KiB
Ruby

class Provider
module Metadata
REGISTRY = {
simplefin: {
region: "US",
kind: "Bank",
maturity: :stable,
logo_bg: "bg-blue-600",
logo_text: "SF"
},
lunchflow: {
region: "US",
kind: "Bank",
maturity: :stable,
logo_bg: "bg-orange-500",
logo_text: "LF"
},
enable_banking: {
region: "EU",
kind: "Bank",
maturity: :beta,
logo_bg: "bg-purple-600",
logo_text: "EB"
},
coinstats: {
region: "Global",
kind: "Crypto",
maturity: :beta,
logo_bg: "bg-yellow-500",
logo_text: "CS"
},
mercury: {
region: "US",
kind: "Bank",
maturity: :beta,
logo_bg: "bg-cyan-600",
logo_text: "ME"
},
coinbase: {
region: "Global",
kind: "Crypto",
maturity: :beta,
logo_bg: "bg-blue-500",
logo_text: "CB"
},
binance: {
region: "Global",
kind: "Crypto",
maturity: :beta,
logo_bg: "bg-yellow-400",
logo_text: "BI"
},
snaptrade: {
region: "US / CA",
kind: "Investment",
maturity: :beta,
logo_bg: "bg-green-600",
logo_text: "ST"
},
indexa_capital: {
region: "ES",
kind: "Investment",
maturity: :alpha,
logo_bg: "bg-red-600",
logo_text: "IC"
},
sophtron: {
region: "US",
kind: "Bank",
maturity: :alpha,
logo_bg: "bg-teal-600",
logo_text: "SO"
},
plaid: {
region: "US",
kind: "Bank",
tier: "Paid",
maturity: :stable,
logo_bg: "bg-indigo-600",
logo_text: "PL"
},
plaid_eu: {
name: "Plaid EU",
region: "EU",
kind: "Bank",
tier: "Paid",
maturity: :stable,
logo_bg: "bg-indigo-600",
logo_text: "PL"
}
}.freeze
def self.for(provider_key)
REGISTRY[provider_key.to_sym] || { logo_text: provider_key.to_s.first(2).upcase, logo_bg: "bg-gray-500" }
end
end
end