feat(wallet): implement wallet transaction history - #1368
Conversation
- Add useQueryWalletHistory hook to fetch paginated transaction history from daemon - Add TxHistoryTable component to render sortable and expandable transaction rows - Add TxHistoryContent container for handling loading states and batch pagination - Add TxHistoryOverlay full-screen dialog for viewing complete history - Integrate inline Recent Activity section into MainWalletPage - Add translation keys - Add comprehensive unit tests Signed-off-by: kishore08-07 <kishorebsm8@gmail.com>
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||
| const roleLabel = (entry: HistoryEntry, t: TFunction) => { | ||
| const role = historyRole(entry) | ||
| return role ? t(`tx_history.role_${role}`) : t('tx_history.role_unknown') |
There was a problem hiding this comment.
Should the fallback be the raw value instead of role_unknown?
| "column_confirmations": "Confs.", | ||
| "column_txid": "Txid", | ||
| "role_maker": "Maker", | ||
| "role_taker": "CoinJoin", |
There was a problem hiding this comment.
The term "CoinJoin" has not yet been present anywhere. Can we find a different term?
"Collaborative transaction" is probably to long for a label. Simply "Taker" would be okay for the first draft?
| "column_net_fee": "Net Fee", | ||
| "column_confirmations": "Confs.", | ||
| "column_txid": "Txid", | ||
| "role_maker": "Maker", |
There was a problem hiding this comment.
| "role_maker": "Maker", | |
| "label_role_maker": "Maker", |
Can the keys be prefixed with label_
| "column_amount": "Amount", | ||
| "column_net_fee": "Net Fee", | ||
| "column_confirmations": "Confs.", | ||
| "column_txid": "Txid", |
There was a problem hiding this comment.
| "column_txid": "Txid", | |
| "column_txid": "Transaction", |
| "error_loading": "Failed to load transaction history.", | ||
| "copy_txid_success": "Transaction ID copied.", | ||
| "copy_txid_error": "Failed to copy transaction ID.", | ||
| "column_date": "Date", |
There was a problem hiding this comment.
Other table components use heading_ or column_title_ as prefix.
(Should be aligned, but at least not introduce a third pattern)
| taker: 'default', | ||
| send: 'used-empty', | ||
| deposit: 'deposit', | ||
| } |
| <Dialog open={open} onOpenChange={() => onOpenChange(false)} {...dialogProps}> | ||
| <DialogContent className="data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom flex h-dvh max-h-dvh! max-w-screen! flex-col overflow-hidden rounded-none border-none"> | ||
| <DialogHeader className="px-2"> | ||
| <DialogTitle className="sr-only flex items-center gap-2"> |
There was a problem hiding this comment.
| <DialogTitle className="sr-only flex items-center gap-2"> | |
| <DialogTitle className="flex items-center gap-2"> |
| <DialogHeader className="px-2"> | ||
| <DialogTitle className="sr-only flex items-center gap-2"> | ||
| <PageTitle title={t('tx_history.overlay_title')} /> | ||
| </DialogTitle> |
There was a problem hiding this comment.
| </DialogTitle> | |
| </DialogTitle> | |
| <DialogDescription>{t('tx_history.overlay_subtitle')}</DialogDescription> |
?
| const queryOptions = wallethistoryOptions({ | ||
| client, | ||
| path: { walletname: walletFileName || '' }, | ||
| query: { limit }, |
There was a problem hiding this comment.
Ability to pass utxosHashHex from useJamWalletInfoContext to auto-reload on change?
| enabled = true, | ||
| }: UseQueryWalletHistoryProps): UseQueryWalletHistoryResult { | ||
| const client = useApiClient() | ||
| const jmSession = useStore(jmSessionStore, (state) => state.state?.session) |
There was a problem hiding this comment.
Is this really necessary here?



Closes #515