Skip to content

Commit

Permalink
feat: add block height in into info (#6727)
Browse files Browse the repository at this point in the history
Description
---
adds block height into gprc info
  • Loading branch information
SWvheerden authored Dec 13, 2024
1 parent c61f706 commit 71efa03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions applications/minotari_app_grpc/proto/wallet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ message TransactionInfo {
bytes excess_sig = 9;
uint64 timestamp = 10;
bytes payment_id = 12;
uint64 mined_in_block_height = 13;
}

enum TransactionDirection {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ impl wallet_server::Wallet for WalletGrpcServer {
.get_signature()
.to_vec(),
payment_id: txn.payment_id.to_bytes(),
mined_in_block_height: txn.mined_height.unwrap_or(0),
}),
};
match sender.send(Ok(response)).await {
Expand Down Expand Up @@ -1132,6 +1133,7 @@ fn convert_wallet_transaction_into_transaction_info(
excess_sig: Default::default(),
timestamp: tx.timestamp.timestamp() as u64,
payment_id: tx.payment_id.to_bytes(),
mined_in_block_height: 0,
},
PendingOutbound(tx) => TransactionInfo {
tx_id: tx.tx_id.into(),
Expand All @@ -1145,6 +1147,7 @@ fn convert_wallet_transaction_into_transaction_info(
excess_sig: Default::default(),
timestamp: tx.timestamp.timestamp() as u64,
payment_id: tx.payment_id.to_bytes(),
mined_in_block_height: 0,
},
Completed(tx) => TransactionInfo {
tx_id: tx.tx_id.into(),
Expand All @@ -1162,6 +1165,7 @@ fn convert_wallet_transaction_into_transaction_info(
.map(|s| s.get_signature().to_vec())
.unwrap_or_default(),
payment_id: tx.payment_id.to_bytes(),
mined_in_block_height: tx.mined_height.unwrap_or(0),
},
}
}

0 comments on commit 71efa03

Please sign in to comment.