signum-network / signum-xt-wallet

Cryptocurrency wallet for the green Signum 🍀 blockchain as an extension for your browser.
MIT License
14 stars 6 forks source link

Add Treasury Account is not being previewed #54

Closed ipr0310 closed 1 year ago

ipr0310 commented 1 year ago

Is your feature request related to a problem? Please describe. As the title says when making a transaction of the following type Add Treasury Account the transaction preview is missing when signing/confirming with XT.

Additionally, i am not able to access the Raw Data payload.

Describe the solution you'd like Having a preview for the Add Treasury Account Transaction. at the moment of signing/confirming a transaction.

Screenshots image

deleterium commented 1 year ago

Just to add some information, in Classic wallet there is a modal window for transaction inspection. The function is pretty big but I've refactored. It took many hours to add all cases for all signum transactions types (may still are missing cases), but the idea there is to create an object with important details. For all kind of transactions there are added "default properties". Then there are added the exceptions properties, based on transaction type and subtype. Last step is to check attachments for messages. The object is then shown.

If you want to take a look, it is this function: https://github.com/signum-network/signum-classic-wallet/blob/d404f823c6b75c08401f9c2d97f33e9fcb2ce385/src/js/brs.modals.transaction.js#L32

Maybe a good approach is to create packages with these functionalities, so same code can be used in many projects, including wallets, XT and maybe signum JS. (or maybe another module in signum JS?)

ohager commented 1 year ago

Thanks for the input. The issue with XT wallet is, that the transaction type handling is done in at least two different places (confirm dialog - which is also kind of split here, and also the transaction list inside the tx view ) - a refactoring of that part would be a heavy impact and I'd go with the pragmatic (but not elegant) approach. I agree, that we should find a way, to establish reusable code for this pretty work-intense task..... it's an ever returning pattern

ohager commented 1 year ago

image incoming