a0b32b4e - Date the Safe activity rows and drop the bracketed order labels - #1207
Merged
Conversation
Three things the Safe screen got wrong for a reader of the activity list: - No entry carried a timestamp, so nothing could be placed in time. The rows now show the valuta timestamp, falling back to the creation date for orders that never completed, and no date at all when the API predates the fields. - sZCHF fell through to the grey placeholder because AssetIconVariant has no such member. Saving positions mirror an underlying asset, so they now borrow its icon - both in the asset list and in the activity rows. - The order labels named the form of the deposit (Fiat, Crypto, Saving). That distinction means nothing to the reader and is now gone from the labels and from the translations.
The rendering path already handles their absence - an API predating the fields serves neither, and the row then shows no date. Typing created as required contradicted the code that guards against it.
The committed baselines still showed the bracketed labels and no dates, i.e. exactly the state this branch changes. Regenerated on macOS against a local API, both specs verified to reproduce without --update-snapshots. The local data set had to be rebuilt: the original one was never recorded anywhere, so the figures differ slightly. It carries an sZCHF position on purpose - without a saving position the icon alias has nothing to show.
completedAt is written once and never cleared, so reading it regardless of status would keep showing a valuta for an order that has since moved back out of Completed. Read it only while the order says it is completed.
TaprootFreak
marked this pull request as ready for review
July 29, 2026 15:00
This was referenced Jul 29, 2026
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.
What
Three things the Safe screen got wrong for anyone reading the activity list.
No entry carried a date. Nothing in
Recent Activitycould be placed in time. The rows now show the order's valuta timestamp next to its status, falling back to the creation date for orders that never completed — the two are distinct fields, and for an order stuck in an early state the creation date is the only timestamp it has. When neither is present (an API predating DFXswiss/api#4448) the row shows no date at all rather thanInvalid Date; the fields are typed optional to match that.sZCHF had no logo.
AssetIconVarianthas nosZCHFmember, soDfxAssetIconfell through to its grey placeholder. Saving positions mirror an underlying asset, so they now borrow its icon —sZCHFrenders asZCHF. The alias table is explicit rather than a rule over thesprefix, because the prefix is not a reliable marker. Applies to the asset list and the activity rows alike.The labels named the form of the deposit.
Deposit (Fiat),Deposit (Crypto),Deposit (Saving)all collapse toDeposit, and the three withdrawal variants toWithdrawal. Which rail an order took is not something the label needs to carry. Translations in de/fr/it follow;Depositalready existed as a key in all three,Withdrawalwas added.Baselines
Both Safe specs are regenerated — the committed images showed the bracketed labels and no dates, i.e. exactly the state this branch changes. Generated on macOS against a local API, and both specs verified to reproduce without
--update-snapshots.Two things worth knowing when reading the image diff:
The two specs need different data states — the account switcher only renders once several accounts are reachable, which is why
safe.spec.tsshows none. Both were regenerated against the state their own spec describes.Depends on
DFXswiss/api#4448 (merged) supplies
createdandcompletedAt. It needs to be deployed before this; without it the rows degrade to the previous, date-less rendering rather than breaking.