Metaverse Lightwallet Developer Intro

in #lightwallet6 years ago (edited)

Dear community,

Because many of you asked on how to contribute code to the Metaverse Lightwallet, Sven Mutlz has written this nice introduction for Lightwallet developers, please check it out:

https://medium.com/@canguruhh/metaverse-lightwallet-developer-intro-6de503857df

As the Metaverse lightwallet got more and more popular and have many great contributions from the Metaverse community I finally decided to give a brief introduction on how to build and how to contribute code to the lightwallet. For the moment most of our developers use Linux so I will use Linux in this guide. However it should also be possible to use other operating systems as well.

Requirements
git
nodejs
ionic
Of course you will also need to get the code. It’s hostet on github and you can clone the repository with the following command:

git clone https://github.com/mvs-org/lightwallet.git
Preparation
Before starting right away you should prepare the wallet to your needs. This will also help you to prevent conflicts if you later want to submit your changes.

Branching
If you want to work on a new feature you should create a new branch from the dev branch and commit your changes to the local branch.

Network
To be able to test functions without the risk of loosing real ETP or MVS Assets you should always develop on the testnet. You can set the config to testnet in the file src/app/app.globals.ts. Just set the variable network to “testnet”.

Of course you will need to get some testnet tokens. The dev team can provide you with free testnet tokens. Also this is a good opportunity to take a look into mining using the fullnode wallet. We will also help you out if you want to try to mine testnet coins.

Issues
Please take a look at the open issues. You can also see the status and discussions. It is always a good idea to talk about new features or changes before you start with the implementation.

Coding
Languages
The language definitions you can find in src/assets/i18n. If you add a completely new language you will also need to add the new language to the language switcher in src/pages/language-switcher/language-switcher.ts.

Styling
There is a scss file that contains the styling of the app. You can find it in src/app/app.scss. You will find all theme definitions… Every page also has its own scss file that will overwrite the settings from the app.scss.

Pages
All pages are located in src/pages. If you want to create a new page please use the command:

ionic generate page PAGENAME
You can also check the ionic generate command for other options.

Building
To build your code you just have to execute the ionic build command:

ionic cordova build browser
It should build in this case for the browser. You can also build it for android or iOS but you will need to setup the android environment… For regular contributions it is enough to make your code run in browser.

It should generate the folder platforms/browser/www. This folder contains all generated JavaScript files that you will need.

If you want to get a live preview you can also use the following command:

ionic serve
Depending on the files that you change it is sometimes necessary to restart the command if the preview stops to update as expected.

Submit changes
To submit your changes to the project you should create a new pull request to the lightwallet dev branch or another branch depending on what you changed. We usually discuss it previously in the issues on github.

Sort:  

Congratulations @metaverse-org! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.028
SBD 2.31