mirror of
https://github.com/Komediruzecki/token-circles.git
synced 2026-10-20 09:46:43 +02:00
MCP create_account stored any string as an account's type, and the import stored whatever type its body named, in both runtimes. The app's account reader took only the four types it has, so one such account failed api.getAccounts() for every account: Transactions, quick entry and Tags lost the whole list. ACCOUNT_TYPES in shared/accountSchema.ts is the one list. MCP create_account takes z.enum(ACCOUNT_TYPES), and POST /api/import/execute refuses a type the app does not have with a 422 in both runtimes, before anything is written. The reader keeps a stored type the app lacks, and every display (the badge's word and colour, the card icon, the constellation, the Transactions select) reads it through knownAccountType: an unknown type shows as a plain account, a v4 name as its replacement. The edit dialog shows such a type as a disabled "Other account" option, and an untouched save keeps it.