-
Notifications
You must be signed in to change notification settings - Fork 83
Fix/1939 filter transactions by amount #1947
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix/1939 filter transactions by amount #1947
Conversation
- Replace 'mnemonic' with 'recovery phrase' in error messages - Replace 'Master Key' references with 'recovery phrase' in import flow - Update Advanced Setup description to use consistent terminology
| const totalCount = transactionData?.totalCount || 0; | ||
|
|
||
| const filteredTransactions = minAmountSats | ||
| ? transactions.filter((tx) => Math.floor(tx.amount / 1000) >= minAmountSats) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should do filtering on the backend otherwise pagination will break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is why you see the weird behavior too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want me to move the filtering to the backend, I think I can do it, but for next week
| <DropdownMenu> | ||
| <Button asChild size="icon" variant="secondary"> | ||
| <DropdownMenuTrigger> | ||
| <FilterIcon className="h-4 w-4" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if filtering should be an option in the "..." menu so we don't clutter the interface too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion about this if it has to be on the 3 dots menu we can place it there.
I also thought that " the least intrusive the better "., Nonetheless, if the filtering is on the 3 dots menu, it is also hidden, and might not even be discovered. That is why I chose to put it on its own button, but just an icon to save some space.
Fixes #1939 This PR adds a transaction amount filter to the wallet screen, allowing users to filter transactions by minimum satoshi amounts (10, 100, 1K, 10K, 100K sats).
It will help to filter out zaps or recurrent small transactions from the bigger ones.
I used the AI to help me do it and did a thorough review of everything.
An unintended visualization bug appeared in the first attempt to add the filter, and I had to modify empty states: a generic "No transactions yet" message was incorrectly displayed when a filter returned no results, even though transactions existed. There is a distinction between empty transaction lists and filtered empty states, showing an appropriate message with a "Show All Transactions" button when the chosen filters hide all transactions.
Preview in the video:
2025-11-27.23-14-28.mp4
Note: Commit 174c43a is a duplicate of the already-merged PR #1876 and can be ignored.