Skip to content
Snippets Groups Projects
Commit 0c527cb3 authored by Éloïs's avatar Éloïs
Browse files

[feat] gva: add pending txs on txs history

parent b3132451
Branches
No related tags found
1 merge request!1335Gva proto 2
...@@ -36,6 +36,10 @@ pub(crate) struct UtxoGva { ...@@ -36,6 +36,10 @@ pub(crate) struct UtxoGva {
pub(crate) struct TxsHistoryGva { pub(crate) struct TxsHistoryGva {
/// Transactions sent /// Transactions sent
pub(crate) sent: Vec<TxGva>, pub(crate) sent: Vec<TxGva>,
/// Transactions sending
pub(crate) sending: Vec<TxGva>,
/// Transactions received /// Transactions received
pub(crate) received: Vec<TxGva>, pub(crate) received: Vec<TxGva>,
/// Transactions receiving
pub(crate) receiving: Vec<TxGva>,
} }
...@@ -46,11 +46,21 @@ impl TxsHistoryQuery { ...@@ -46,11 +46,21 @@ impl TxsHistoryQuery {
.into_iter() .into_iter()
.map(|db_tx| db_tx.into()) .map(|db_tx| db_tx.into())
.collect(), .collect(),
sending: txs_history
.sending
.into_iter()
.map(|db_tx| TxGva::from(&db_tx))
.collect(),
received: txs_history received: txs_history
.received .received
.into_iter() .into_iter()
.map(|db_tx| db_tx.into()) .map(|db_tx| db_tx.into())
.collect(), .collect(),
receiving: txs_history
.pending
.into_iter()
.map(|db_tx| TxGva::from(&db_tx))
.collect(),
}) })
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment