Contributing to Status.im
This week I worked on an issue which was asking to add a new token the the mobile cryptocurrency wallet Status. This was an interesting issue for me as I figured it would be one that involves a good amount of complexity to get me introduced to the repository which is written in ClojureScript along with reagent.
The issue specifically asked to add the “Wrapped Bitcoin” token as an option to have in your wallet on the application. In order to achieve this I had to understand exactly how tokens are handled in the project.
My first step was to look into the documentation that is provided by Status to contributors. This did not contain any information on how the tokens are added to the list and configured. I then had the idea to see how dApps are added to the list in the application, as I assumed the method would be similar. Thankfully, there was documentation for this. Eventually, I reached a file called tokens.cljs.
This file was set up very efficiently and made use of macros which are provided by Clojure. Essentially, a macro is able to generate output based on what is given to it. Therefore a list was made which included all the tokens to be available in the application.
The next step was to find out all the variables that needed to be passed in order to ensure that the token was being displayed properly and was able to be used. I headed over to the contract address on Etherscan and noted the information I needed. Which was simply the amount of decimals and the contract address.
Finally, I had to produce icons for the token that would be displayed in the application. I used Gimp to produce the necessary files and named the files what were expected by the macro. (Simply the token abbreviation in a .PNG format).
I then built the project to run on an android emulator and confirmed that my changes were working. I was now ready to make a pull request, which I had to ensure my account had a GPG key associated with it. GPG keys are something new for me as I had never encountered them before. However, the Status repository requires that your commits be signed with this type of key. Thankfully, Github has a help me page on generating the key and associating it with your account which I followed.
Finally, I was able to submit my pull request and have it reviewed. I was surprised to see that the commit had to be reviewed by three separate core contributors and was thankful that they had approved all my changes. I was asked to re-base to the develop branch before they could merge the request however.
I was also surprised to see the amount of comments I received on the pull request. In total there were 15 comments made, many regarding questions on how to test this new token and if it was available on the ropsten network. (I had only added the coin to the mainnet as it is only available there). Eventually QA testers were able to purchase the token and test it to confirm its functionality. Leading to my pull request being officially merged.
Next week, I will have a lot of spare time as it is reading week. I hope to make my largest contribution so far and to learn a few new things. Though, I will need to find my next issue to tackle first. Overall, I am enjoying my time contributing to open source and I am excited for whats to come!