@exodus/activity-txs
Activity consists of a set of asset transactions that are transformed using asset.api.getActivityTxs
which returns Array of Tx models: [Tx, Tx, Tx]
Most of the assets don't have this api and simply return original txs.
An example of this transformation is combining bitcoin batched transactions into a single activity item, instead of multiple Txs you get single Tx with adjusted coinAmount
.
These are utilized in the UI to display transaction history.
This feature introduces atoms with activity items generated from txLog and accountState.
It provides an efficient way to store them by wallet accounts and to update this extensive object while avoiding unnecessary re-computations.
Additionally, it offers extra redux selectors to retrieve activity limited by size or batched activity items.
Usage
ioc.use(activityTxs())
selector example to get batched activity for specific asset from specific account:
selectors.activityTxs.createBatchedAssetSourceSelector({ assetName, walletAccount })
return array of txs [Tx, Tx, ...]