qt: label asset transactions by type in the history list (#382)#458
Open
JSanchezFDZ wants to merge 1 commit into
Open
qt: label asset transactions by type in the history list (#382)#458JSanchezFDZ wants to merge 1 commit into
JSanchezFDZ wants to merge 1 commit into
Conversation
createasset, mintasset and updateasset transactions were shown in the transaction list with a generic type — typically "Payment to yourself" when they touched the user's own wallet — so they were indistinguishable from ordinary sends. Add AssetCreate/AssetMint/AssetUpdate record types, tag asset special transactions (TRANSACTION_NEW_ASSET / TRANSACTION_MINT_ASSET / TRANSACTION_UPDATE_ASSET) with them after decomposition, and render them as "Create Asset" / "Mint Asset" / "Update Asset". Amount decomposition is untouched; only the displayed type label and colour change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
createasset, mintasset and updateasset transactions appear in the wallet's
transaction list with a generic type — typically "Payment to yourself" when
they touch the user's own wallet — so they are indistinguishable from ordinary
sends (issue #382).
Change
AssetCreate/AssetMint/AssetUpdaterecord types.decomposeTransaction, tag asset special transactions(
TRANSACTION_NEW_ASSET/TRANSACTION_MINT_ASSET/TRANSACTION_UPDATE_ASSET)with the matching type. Amount decomposition is left untouched; only the
displayed type label and colour change.
formatTxType, and colour them like other internal operations.Asset transfers (ordinary transactions carrying asset outputs) are left as a
possible follow-up since they have no dedicated tx type to key off.
Testing
Built with
--with-gui=qt5 --enable-wallet:transactionrecord.cpp,transactiontablemodel.cppand the asset dialogs compile cleanly (uic/moc + CXX)with the new enum values handled in the type switches.
Closes #382.