Page MenuHomePhabricator

README.md
No OneTemporary

README.md

# Cashtab
## eCash Web Wallet
### Features
- Send & Receive eCash (XEC) and eTokens
- Import existing wallets
- Create and manage multiple wallets
- Create new eTokens with token icons
- Send and receive airdrops
- Public and encrypted messaging
## Development
```
npm install
npm start
```
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br>
You will also see any lint errors in the console.
## Testing
### 1. Regression Tests
Existing functions that are impacted by your diff must be regression tested to ensure no unintended behavior. For example, if you're adding a function to facilitate One To Many XEC transactions, you must test that the existing One to One XEC transactions work as intended.
### 2. Unit Tests
Where applicable, add unit tests for new functions created into the corresponding \*.test.js files and they will get picked up as part of the unit test suite.
Run the tests in watch mode (interactive):
```
npm test
```
Run the tests and generate a coverage report (non-interactive):
```
npm run test:coverage
```
You can then browse the HTML coverage report by opening the
`coverage/lcov-report/index.html` file in your web browser.
### 3. System/Integration Tests
Once your unit tests have passed successfully, execute the test plan outlined in your diff via manual testing of your new Cashtab feature.
This includes:
- testing across Chrome and Firefox browsers to pick up any browser specific issues
- testing via the Extension plugin (see Browser Extension below) to pick up on any extension specific issues
### 4. Mobile Tests
Ensure the latest feature functions correctly in a mobile setting and dimension.
Start by updating the build folder with your changes included.
```
npm run build
```
Then create a new site on [Netlify](https://www.netlify.com/) by choosing to "Deploy manually" and dragging in the /cashtab/build folder. Your diff will now be accessible via [projectname].netlify.app, which you can load up on your iOS or Android mobile devices for testing.
### 5. Edge Tests
If your diff is complex in nature, then consider potential edge cases which may not get picked up through the testing approaches above.
This includes but is not limited to:
- interactions with fresh new wallets with no transaction history
- interactions with wallets which have old transactions relevant to the diff
- interactions with applications outside of Cashtab such as ElectrumABC or outputs generated by custom nodejs scripts.
## Production
In the project directory, run:
```
npm run build
```
Builds the app for production to the `build` folder.<br>
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
## Browser Extension
1. `npm run extension`
2. Open Chrome or Brave
3. Navigate to `chrome://extensions/` (or `brave://extensions/`)
4. Enable Developer Mode
5. Click "Load unpacked"
6. Select the `extension/dist` folder that was created with `npm run extension`
## Developing web apps that interact with the extension
A web app can request an extension user's active address. For an example implementation, please review the `GetAddress.tsx` component (and its associated `README.md`) in `/web/cashtab-components`.
## Docker deployment
```
npm install
docker-compose build
docker-compose up
```
Navigate to `localhost:8080` to see the app.
## Redundant APIs
Cashtab accepts multiple instances of `chronik` as its backend. Update the `chronikUrls` array in `src/components/Common/Ticker.js` to change your chronik server or add additional redundant backups.
```
chronikUrls: ['https://chronik.fabien.cash', 'https://chronik.be.cash/xec'],
```
Cashtab will start with the first API in your array. If it receives an error from that API, it will try the next one.

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 2, 12:13 (23 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5181489
Default Alt Text
README.md (4 KB)

Event Timeline