The personal finance app for everyone (by everyone)
Ruby
fix(monobank): capitalize the brand name and show its logo tile (#3521)
Yaroslav Shparuk9a16fe75eaeb
diff --git a/app/controllers/settings/providers_controller.rb b/app/controllers/settings/providers_controller.rbindex 0e755ebd24..ca7174bed0 100644--- a/app/controllers/settings/providers_controller.rb+++ b/app/controllers/settings/providers_controller.rb@@ -190,7 +190,7 @@ class Settings::ProvidersController < ApplicationControllerFAMILY_PANELS = [{ key: "akahu", title: "Akahu", turbo_id: "akahu", partial: "akahu_panel" },{ key: "up", title: "Up", turbo_id: "up", partial: "up_panel" },- { key: "monobank", title: "monobank", turbo_id: "monobank", partial: "monobank_panel" },+ { key: "monobank", title: "Monobank", turbo_id: "monobank", partial: "monobank_panel" },{ key: "lunchflow", title: "Lunch Flow", turbo_id: "lunchflow", partial: "lunchflow_panel" },{ key: "redbark", title: "Redbark", turbo_id: "redbark", partial: "redbark_panel" },{ key: "simplefin", title: "SimpleFIN", turbo_id: "simplefin", partial: "simplefin_panel" },diff --git a/app/models/provider/metadata.rb b/app/models/provider/metadata.rbindex 9184c278b5..e7042bd234 100644--- a/app/models/provider/metadata.rb+++ b/app/models/provider/metadata.rb@@ -5,7 +5,7 @@ class Providersimplefin: { region: "US", kinds: %w[Bank Investment], maturity: :stable, logo_text: "SF", logo_bg: "bg-blue-600" },lunchflow: { region: "Global", kinds: %w[Bank], maturity: :stable, logo_text: "LF", logo_bg: "bg-orange-500" },up: { region: "AU", kinds: %w[Bank], maturity: :beta, logo_text: "UP", logo_bg: "bg-orange-600" },- monobank: { region: "UA", kinds: %w[Bank], maturity: :alpha, logo_text: "MB", logo_bg: "bg-primary" },+ monobank: { region: "UA", kinds: %w[Bank], maturity: :alpha, logo_text: "MB", logo_bg: "bg-inverse" },enable_banking: { region: "EU", kinds: %w[Bank], maturity: :beta, logo_text: "EB", logo_bg: "bg-purple-600" },coinstats: { region: "Global", kinds: %w[Crypto], maturity: :beta, logo_text: "CS", logo_bg: "bg-pink-600" },wise: { region: "Global", kinds: %w[Bank], maturity: :beta, logo_text: "WI", logo_bg: "bg-green-500" },diff --git a/config/locales/breadcrumbs/en.yml b/config/locales/breadcrumbs/en.ymlindex 97710dfc00..2703898128 100644--- a/config/locales/breadcrumbs/en.yml+++ b/config/locales/breadcrumbs/en.yml@@ -53,7 +53,7 @@ en:mercury_items: Mercurymessages: Messagesmfa: Two-factor authentication- monobank_items: monobank+ monobank_items: Monobankoidc_accounts: SSO accountsonboardings: Onboardingother_assets: Other assetsdiff --git a/config/locales/views/monobank_items/uk.yml b/config/locales/views/monobank_items/uk.ymlindex 846373f6d8..8fe719498a 100644--- a/config/locales/views/monobank_items/uk.yml+++ b/config/locales/views/monobank_items/uk.yml@@ -3,7 +3,7 @@ uk:providers:monobank:name: Monobank- description: Підключення карток і банок monobank за персональним токеном API+ description: Підключення карток і банок Monobank за персональним токеном APIfamily:monobank:create_monobank_item:@@ -28,7 +28,7 @@ uk:sync_failed: Не вдалося синхронізувати підключення Monobanksync:status:- importing: Імпортуємо рахунки з monobank...+ importing: Імпортуємо рахунки з Monobank...checking_setup: Перевіряємо налаштування рахунків...needs_setup:one: 1 рахунок потребує налаштування...diff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.ymlindex 3ac6a230a4..1640aa2d91 100644--- a/config/locales/views/settings/en.yml+++ b/config/locales/views/settings/en.yml@@ -439,7 +439,7 @@ en:simplefin: Connect US bank accounts via the open SimpleFIN protocol.lunchflow: Connect 20k+ banks from 40+ countries (UK, EU, USA and more!)redbark: Sync Australian bank accounts via Redbark open banking.- monobank: Sync Ukrainian monobank cards and jars with a personal API token.+ monobank: Sync Ukrainian Monobank cards and jars with a personal API token.enable_banking: Sync European bank accounts via PSD2 open banking.coinstats: Track your entire crypto portfolio across wallets and exchanges.wise: Sync your Wise multi-currency balances and international transfers automatically.@@ -594,7 +594,7 @@ en:step_2: "Copy your personal access token."step_3: "Paste the token below, save, then link your synced accounts."monobank_panel:- step_1_html: "Go to %{link}, sign in with the monobank app and generate a personal token."+ step_1_html: "Go to %{link}, sign in with the Monobank app and generate a personal token."step_2: "Copy the token — it is shown only once."step_3: "Paste the token below, save, then link the cards and jars you want to track."simplefin_panel:diff --git a/config/locales/views/settings/uk.yml b/config/locales/views/settings/uk.ymlindex 3c8eadb7ce..0cb2648134 100644--- a/config/locales/views/settings/uk.yml+++ b/config/locales/views/settings/uk.yml@@ -396,7 +396,7 @@ uk:akahu: Синхронізуйте фінансові установи Нової Зеландії через Akahu.simplefin: Підключайте банківські рахунки США за допомогою відкритого протоколу SimpleFIN.lunchflow: Підключайте 20 тис.+ банків з 40+ країн (Великобританія, ЄС, США та інші!)- monobank: Синхронізуйте картки та банки monobank за персональним токеном API.+ monobank: Синхронізуйте картки та банки Monobank за персональним токеном API.enable_banking: Синхронізуйте європейські банківські рахунки через PSD2 open banking.coinstats: Відстежуйте весь свій криптовалютний портфель у гаманцях та на біржах.wise: Автоматично синхронізуйте свої мультивалютні баланси Wise та міжнародні перекази.@@ -533,7 +533,7 @@ uk:step_2: "Скопіюйте свій особистий токен доступу."step_3: "Вставте токен нижче, збережіть, а потім пов'яжіть свої синхронізовані облікові записи."monobank_panel:- step_1_html: "Перейдіть до %{link}, увійдіть через застосунок monobank і згенеруйте персональний токен."+ step_1_html: "Перейдіть до %{link}, увійдіть через застосунок Monobank і згенеруйте персональний токен."step_2: "Скопіюйте токен — він показується лише один раз."step_3: "Вставте токен нижче, збережіть, а потім підключіть картки та банки, які потрібно відслідковувати."simplefin_panel:diff --git a/docs/hosting/monobank.md b/docs/hosting/monobank.mdindex d1eae5d03a..4832a17b16 100644--- a/docs/hosting/monobank.md+++ b/docs/hosting/monobank.md@@ -1,16 +1,16 @@-# Setting Up monobank (Ukraine)+# Setting Up Monobank (Ukraine)-[monobank](https://monobank.ua) exposes a personal API that returns your own cards, jars-and statements. You bring your own token, so Sure talks to monobank directly on your+[Monobank](https://monobank.ua) exposes a personal API that returns your own cards, jars+and statements. You bring your own token, so Sure talks to Monobank directly on yourbehalf — no third-party aggregator sits in between.> [!NOTE]-> This integration uses monobank's **personal** API. Its documentation states that a+> This integration uses Monobank's **personal** API. Its documentation states that a> service which stores other people's data on its own servers must use the corporate> (service provider) API instead, and that programs used by clients personally — where> the data never passes through the developer's nodes — do not. A self-hosted Sure> instance is the latter. If you run Sure as a hosted service for other people, read-> [monobank's API terms](https://api.monobank.ua/docs/index.html) first.+> [Monobank's API terms](https://api.monobank.ua/docs/index.html) first.> [!NOTE]> The personal API is not available to clients under 16. Data for a child's accounts is@@ -19,26 +19,26 @@ behalf — no third-party aggregator sits in between.## 1. Get Your Personal Token1. Go to [api.monobank.ua](https://api.monobank.ua/).-2. Sign in by scanning the QR code with the monobank app.+2. Sign in by scanning the QR code with the Monobank app.3. Generate a personal token and copy it. **It is shown only once.**The token is scoped to your own data: it can list your accounts, read statements, andregister a statement webhook (`POST /personal/webhook`). It cannot move money.-## 2. Add monobank to Sure+## 2. Add Monobank to Sure-1. In Sure, go to **Settings > Providers** and find the **monobank** panel.+1. In Sure, go to **Settings > Providers** and find the **Monobank** panel.2. Paste your token and save.3. Your cards and jars appear for setup. Link each one to an existing Sure account orcreate a new account from it, and skip anything you don't want to track.Cards become cash accounts; jars become savings accounts. A card's balance is stored as-your own funds — monobank reports the credit limit inside the balance, and Sure+your own funds — Monobank reports the credit limit inside the balance, and Suresubtracts it.## 3. Syncing-monobank's rate limit shapes how syncing works. Each personal endpoint accepts **one+Monobank's rate limit shapes how syncing works. Each personal endpoint accepts **onerequest per minute**, and a single statement request may cover at most **31 days**. So:- Every sync fetches your account list once, then reads statements account by account.@@ -50,13 +50,13 @@ request per minute**, and a single statement request may cover at most **31 daysunsettled, so pending transactions stay accurate.Because of the throttle, a sync sleeps between requests: with four accounts, expect it-to take a few minutes. Transactions are deduplicated by their monobank id, so+to take a few minutes. Transactions are deduplicated by their Monobank id, sore-syncing never creates duplicates.### Pending transactionsHeld (unsettled) authorizations are imported and marked **Pending**. When a hold-settles, monobank may issue the settled record under a different id, so the settled+settles, Monobank may issue the settled record under a different id, so the settledrecord is matched to the pending entry by amount and date, and inherits it.A hold that simply disappears from the statement — cancelled rather than settled — has@@ -76,7 +76,7 @@ MONOBANK_INCLUDE_PENDING=0### Categories-monobank does not categorise transactions; it reports the merchant's MCC. Sure maps the+Monobank does not categorise transactions; it reports the merchant's MCC. Sure maps thecodes with a clear equivalent (groceries, restaurants, fuel, pharmacies, …) onto yourexisting categories, matching them by the name in your own language. Codes without anhonest equivalent — cash withdrawals, transfers, gambling — are left uncategorised for@@ -100,7 +100,7 @@ The token was revoked or is invalid. Generate a new one at[api.monobank.ua](https://api.monobank.ua/) and update it in the provider panel.**A sync says accounts were skipped**-Either the statement request budget ran out for this run, or monobank throttled the+Either the statement request budget ran out for this run, or Monobank throttled therequest — one request per minute per endpoint, so a manual sync started right after ascheduled one collides. All of these are normal and leave the connection healthy: thenext sync continues where this one stopped. Raisediff --git a/docs/onboarding/guide.md b/docs/onboarding/guide.mdindex 348f5cadd6..1b2a0077ae 100644--- a/docs/onboarding/guide.md+++ b/docs/onboarding/guide.md@@ -38,7 +38,7 @@ When you arrive at the main dashboard, showing **No accounts yet**, you're all s> - [**SimpleFIN**](https://beta-bridge.simplefin.org/)> - [**Lunch Flow**](https://www.lunchflow.app/)> - [**Enable Banking**](https://enablebanking.com/) (beta)-> - [**monobank**](https://github.com/we-promise/sure/blob/main/docs/hosting/monobank.md) (Ukrainian cards and jars)+> - [**Monobank**](https://github.com/we-promise/sure/blob/main/docs/hosting/monobank.md) (Ukrainian cards and jars)> - [**Redbark**](https://github.com/we-promise/sure/blob/main/docs/hosting/redbark.md) (Australian banks)> - [**Up**](https://up.com.au/) (Australian bank)> - [**Akahu**](https://www.akahu.nz/) (New Zealand banks)