[PR #5115] [MERGED] Fix account properties being overriden with empty values from metadata #5764

Closed
opened 2026-02-28 21:18:11 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/5115
Author: @rjackson
Created: 6/6/2025
Status: Merged
Merged: 6/14/2025
Merged by: @matt-fidd

Base: masterHead: fix-monzo-missing-account-names


📝 Commits (2)

  • 246830a Fix account properties being overriden with empty values from metadata
  • 497a5f5 Merge branch 'master' into fix-monzo-missing-account-names

📊 Changes

3 files changed (+40 additions, -4 deletions)

View changed files

📝 packages/sync-server/src/app-gocardless/services/gocardless-service.js (+13 -4)
📝 packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.js (+21 -0)
upcoming-release-notes/5115.md (+6 -0)

📄 Description

My Monzo bank appears to return 'name' through the GoCardless getDetails and getMetadata calls, but the value in the getMetadata response is an empty string! Merging metadata values over detail values therefore risks losing values, that are useful to have & to present to the user.

To solve this, we can make getDetailedAccount smarter about merging the two objects. We could swap the object splattening around so details has priority over metadata, but I'm not at all confident there won't be other banks doing strange things with additional properties that might suffer similar bugs in the reverse scenario.

Instead, we loop through all keys in both objects and construct a new merged object, continuing to prioritise metadata over details but changing it to a truthy-based comparison (with the || operator).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/5115 **Author:** [@rjackson](https://github.com/rjackson) **Created:** 6/6/2025 **Status:** ✅ Merged **Merged:** 6/14/2025 **Merged by:** [@matt-fidd](https://github.com/matt-fidd) **Base:** `master` ← **Head:** `fix-monzo-missing-account-names` --- ### 📝 Commits (2) - [`246830a`](https://github.com/actualbudget/actual/commit/246830a35dc6904a29971dde8ac02df6ced35b01) Fix account properties being overriden with empty values from metadata - [`497a5f5`](https://github.com/actualbudget/actual/commit/497a5f5f08188012ef4305fa6532c436c62ba02b) Merge branch 'master' into fix-monzo-missing-account-names ### 📊 Changes **3 files changed** (+40 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `packages/sync-server/src/app-gocardless/services/gocardless-service.js` (+13 -4) 📝 `packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.js` (+21 -0) ➕ `upcoming-release-notes/5115.md` (+6 -0) </details> ### 📄 Description My Monzo bank appears to return 'name' through the GoCardless getDetails and getMetadata calls, but the value in the getMetadata response is an empty string! Merging metadata values over detail values therefore risks losing values, that are useful to have & to present to the user. To solve this, we can make getDetailedAccount smarter about merging the two objects. We could swap the object splattening around so details has priority over metadata, but I'm not at all confident there won't be other banks doing strange things with additional properties that might suffer similar bugs in the reverse scenario. Instead, we loop through all keys in both objects and construct a new merged object, continuing to prioritise metadata over details but changing it to a truthy-based comparison (with the `||` operator). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 21:18:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#5764