We are moving right along with development of the Simple Ledger Protocol (SLP) for Bitcoin Cash. I just finished coding up the third screen, which is a token management screen. It allows the user to see a list of the different types of tokens, add and delete tokens. It also displays a current balance of the number of token units for each token type in the wallet.
Why we need this screen: SLP tokens types are identified by their genesis hash id. But we also need a more common name for them. (The same is true for ERC20). So the user needs to be able to define this. Also, the user should have control over which tokens the wallet keeps track of. If someone were to send you test tokens or spam tokens, your wallet shouldnt get bogged down or cluttered with useless information.
This particular screen was tougher than I had first thought. Initially I was thinking I wanted an "add token" button but there was no good example of an existing tab that had a list of data but also buttons. And since I'm not an expert in the QT framework, I had to start researching.
After a little while, I decided it was a good idea to just model the contacts tab. Instead of a button, you simply right click in the white area and get an option to add a token. Not the greatest UX ever, but it works:
So I proceeded to copy the code in main_window.py and contact_list.py...but I ran into some trouble because I made the boneheaded mistake of trying to get the list of token types from the wallet file instead of the config file (which I had specified earlier). Confused the heck out of myself and wasted at least an hour or two mucking around, debugging a problem I created myself. Once I had that resolved, I hit another phase of confusion over the exact data structures the JSON was using. Turns out it is a 'list' object, each item of which is a python dictionary object. Then, I encountered more problems that I caused myself due to bad variable naming, since I had a token_list which is the actual list of different token types but also a similar variable indicating the tab object. After that, there were some things to resolve when saving the changes. By this point, I forget the details :) I also created a balance column, which we will implement later from a new "slp_utxo" set of obejcts we'll store in the wallet file after verification. Right now its hard coded to be 1000. Then I had to fix the context menu options since they were copied over from the contacts tab. Most of the options except "delete" were removed. Next, validation: Need to make sure the hash_id is a valid one, and so on. Additional code was added to handle the proper deletion of the record. There were also problems that happened with one of other tabs I had coded when I deleted a token type. So that tab now needed to be updated to handle this situation. As a final touch, I added a new tab icon which is supposed to be a pen and paper (part of the SLP logo) but it might be too small to see clearly. That's it for now... I'll keep you posted with more updates but we're still planning to release the SLP wallet by the end of August at the latest!


7 of 7 reviewers say it's worth paying for

0 of 7 reviewers say it's not worth paying for