feat(history): label plain REALU transfers as received/sent - #965
Draft
Blume1977 wants to merge 1 commit into
Draft
feat(history): label plain REALU transfers as received/sent#965Blume1977 wants to merge 1 commit into
Blume1977 wants to merge 1 commit into
Conversation
Incoming token transfers from a foreign wallet showed up as 'Kauf' in the transaction list, because the row widgets label purely by direction (customer report via RealUnit, 02.09.2026). Brokerbot purchases carry no DFX transaction, so the app cannot tell them apart on its own. The API now classifies every history transfer (backend#5353): purchase and sale for Brokerbot counterparties, transferIn/transferOut for plain token movements. The app stores that category (new transactions.category column, schema v3) and resolves the row title through a shared helper: DFX-backed transactions keep the direction-based buy/sell labels, categorized plain transfers render as received/sent, and rows without a category (legacy data, older API) keep the previous direction labels, so backend and app can roll out independently. Already-synced entries pick up their category on the next sync via the existing update path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Was
Reine On-Chain-Transfers werden in der Transaktionsliste neu als «Empfangen»/«Gesendet» angezeigt statt als «Kauf»/«Verkauf». Brokerbot-Käufe/-Verkäufe und DFX-Transaktionen (Bank-Kauf/-Verkauf) behalten ihre bisherigen Labels.
Warum
Kundenmeldung via RealUnit (02.09.2026, userData 421464): Ein REALU-Eingang von einer externen Wallet erscheint als «Kauf». Die Row-Widgets labeln rein nach Richtung; Brokerbot-Käufe erzeugen keine DFX-Transaktion, die App kann sie allein nicht von Fremd-Transfers unterscheiden.
Wie
category= purchase/sale/transferIn/transferOut); App übernimmt die Kategorie beim Synctransactions.category(Schema v3, Migration mit Default '')transactionTitleLabel: DFX-Transaktionen → Richtungs-Labels wie bisher; kategorisierte Transfers → Kauf/Verkauf/Empfangen/Gesendet; ohne Kategorie (Altbestand, ältere API) → bisherige Richtungs-Labels. Backend und App sind dadurch unabhängig deploybartransactionReceived/transactionSentDE+EN (alphabetisch)Szenarien (geprüft)
Bank-Kauf → Kauf; Bank-Verkauf → Verkauf (DFX-Match); ZCHF-Swap → Verkauf (Brokerbot-Gegenpartei); Fremd-Eingang → Empfangen; eigener Transfer raus → Gesendet; DFX-Rückerstattung → Empfangen; Pending-Zeile unverändert.
Tests
Abhängigkeit
Merge idealerweise nach DFXswiss/backend#5353; funktioniert aber auch davor (Fallback auf bisherige Labels).