Koniverse / SubWallet-Extension

SubWallet is the comprehensive non-custodial wallet solution for Polkadot, Substrate & Ethereum ecosystems.
https://www.subwallet.app
Apache License 2.0
89 stars 61 forks source link
astar-network dappstaking

SubWallet Extension

Our SubWallet is forked from polkadot-js/extension. We aim to adding more features while being able to rebase the polkadot-js origin at any time.

Main Concept

Main Concept The extension is compiled from folder packages/extension-koni

All data requests must be called and processed in the background. Extension Pages and Inject Scripts use data from the background environment and do not call APIs directly.

Project structure

Development Guide

Add an API

Add a store

Store is used to persist data into local storage. Stores is defined in folder packages/extension-koni-base/src/store

Add a message handle

Subwallet extension use message passing concept via browser API to interact between Background - Extensions - Chrome Tabs.

Add a cron

Cronjob is define in folder packages/extension-koni-base/src/cron.

Develop UI

UI Structure

Add new redux store

Add new message caller

Read "Add a message handle"

Auto validate

Extension auto validate code with eslint. Please setup eslint in editor and run yarn lint before commit code.

Write test

Subwallet run test with jest. Create new file with name filename.spec.ts to write test.

Commit and Build