Open levonpetrosyan93 opened 6 days ago
The changes enhance the ListTransactions
function in the src/wallet/rpcwallet.cpp
file by introducing a new structure, CSparkOutputTx
, to manage "Spark transactions." The code now checks for specific transaction output types and retrieves corresponding data to adjust how transaction amounts are displayed. The logic for amount determination has been refined, ensuring that the display reflects the type of transaction processed while maintaining the overall structure of the function.
File | Change Summary |
---|---|
src/wallet/rpcwallet.cpp | Introduced CSparkOutputTx structure and modified ListTransactions to handle Spark transactions, adjusting amount display logic based on transaction type. |
In the wallet where transactions play,
A Spark shines bright, lighting the way.
With new logic to guide,
Amounts now abide,
A hop towards clarity, come what may! 🐇✨
src/wallet/rpcwallet.cpp (2)
`1685-1695`: **Proper handling of Spark transactions in `ListTransactions`** The newly added code correctly detects Spark transactions and extracts the associated Spark address, enhancing the functionality of the `ListTransactions` function as intended. --- `1706-1709`: **Verify initialization of `output.amount` before usage** Ensure that `output.amount` is properly initialized before it is used when `output.address` is not empty. This will prevent potential issues related to uninitialized variables. As a follow-up, please confirm that `output.amount` is always set when `output.address` is not empty to guarantee safe usage.
This change allows to get spark output addresses by deamon Running
gettransaction
andlisttransactions
includes also spark addresses. NOTE, this only works for the wallet on which the tx is created, restored wallet or a wallet running in parallel on another device will work as previously.