This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wallet): adds wallet feature using xpubs (#27)
* Adds new testing suite for testing hardware wallet interactions * Updates the landing page * Updates the navigation * Adds full-featured, semi-stateless wallet for spending from, receiving to, and tracking balances of the deposit and change braids for a given set of xpubs in a multisig wallet * Adds selectors for better performance in interacting with pieces of the redux state * Adds ability to import watch-only addresses to private bitcoind node via RPC * Adds testing suites for e2e and front-end unit tests Co-authored-by: Dhruv Bansal <[email protected]> Co-authored-by: Richard Bondi <[email protected]> Co-authored-by: Walden Raines <[email protected]> Co-authored-by: Justin Moore <[email protected]>
- Loading branch information
1 parent
5b47948
commit 3514039
Showing
200 changed files
with
31,672 additions
and
21,692 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"presets": [ | ||
"react", | ||
"es2015" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": [ | ||
"@commitlint/config-conventional", | ||
"cz" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
const types = [ | ||
` feat: A new feature`, | ||
` fix: A bug fix`, | ||
` docs: Documentation only changes`, | ||
` style: Changes that do not affect the meaning of the code | ||
(white-space, formatting, missing semi-colons, etc)`, | ||
` refactor: A code change that neither fixes a bug nor adds a feature`, | ||
` perf: A code change that improves performance`, | ||
` test: Adding missing tests`, | ||
` revert: Revert to a commit`, | ||
` WIP: Work in progress`, | ||
` chore: Changes to the build process or auxiliary tools | ||
and libraries such as documentation generation` | ||
]; | ||
|
||
const messages = { | ||
type: `Select the type of change that you're committing:`, | ||
|
||
subject: `Write a SHORT, IMPERATIVE tense description of the change:\n`, | ||
|
||
body: `Provide a LONGER description of the change (optional). Use "|" to break new line:\n`, | ||
|
||
breaking: `Describe any BREAKING CHANGES (optional):\n`, | ||
|
||
footer: ` List any RELATED ISSUES to this change (optional).\n`, | ||
|
||
confirmCommit: `Are you sure you want to proceed with the commit above?` | ||
}; | ||
|
||
const scopes = [ | ||
"card", | ||
"clientpicker", | ||
"createaddress", | ||
"hermit", | ||
"slices", | ||
"testrunner", | ||
"wallet", | ||
"other", | ||
]; | ||
|
||
module.exports = { | ||
types: types.map((type) => ({ | ||
value: type.split(":")[0].trim(), | ||
name: type | ||
})), | ||
|
||
scopes: scopes.map((scope) => ({ | ||
name: scope | ||
})), | ||
|
||
messages, | ||
|
||
subjectLimit: 65, | ||
allowCustomScopes: false, | ||
allowTicketNumber: false, | ||
allowBreakingChanges: ["feat", "fix"], | ||
breakingPrefix: "BREAKING CHANGE:", | ||
footerPrefix: "ISSUES:" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// .env | ||
|
||
NODE_PATH=src/utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
build | ||
node_modules | ||
package-lock.json | ||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"cypress/globals": true, | ||
"jasmine": true, | ||
"node": true, | ||
"jest": true | ||
}, | ||
"plugins": ["prettier"], | ||
"extends": [ | ||
"airbnb", | ||
"prettier", | ||
"prettier/react", | ||
"plugin:testing-library/recommended", | ||
"plugin:jest-dom/recommended", | ||
"plugin:cypress/recommended" | ||
], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"react/jsx-props-no-spreading": "off" | ||
}, | ||
"settings": { | ||
"import/core-modules": ["test-utils"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,7 @@ build/ | |
|
||
# misc | ||
.DS_Store | ||
junit.xml | ||
|
||
# cypress | ||
cypress/videos/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,63 @@ | ||
language: node_js | ||
node_js: | ||
- 8 | ||
|
||
script: | ||
- CI=true npm run build | ||
|
||
deploy: | ||
provider: script | ||
script: "npm run deploy" | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
|
||
notifications: | ||
email: | ||
recipients: | ||
- chris@unchained-capital.com | ||
- bugs@unchained-capital.com | ||
on_success: change | ||
on_failure: always | ||
|
||
before_deploy: | ||
- git remote set-url origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git | ||
- git config --global user.email "Travis CI<[email protected]>" | ||
- git config --global user.name "TravisCI" | ||
|
||
jobs: | ||
include: | ||
- stage: "Tests" | ||
node_js: 8 | ||
name: "Node JS 8" | ||
script: npm run test | ||
- node_js: 10 | ||
name: "Node JS 10" | ||
script: npm run test | ||
- node_js: 12 | ||
name: "Node JS 12" | ||
script: npm run ci | ||
- stage: "Cypress Tests" | ||
node_js: 10 | ||
addons: | ||
apt: | ||
packages: | ||
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves | ||
- libgconf-2-4 | ||
cache: | ||
# Caches $HOME/.npm when npm ci is default script commandK | ||
# Caches node_modules in all other cases | ||
npm: true | ||
directories: | ||
# we also need to cache folder with Cypress binary | ||
- ~/.cache | ||
install: | ||
- npm ci | ||
before_script: | ||
- npm run build:ci | ||
# The server from create-react-app doesn't work well with travis | ||
- npm i -g http-server | ||
# Necessary because create-react-app assumes you want to deploy to /caravan | ||
- mkdir ./build/caravan | ||
- shopt -s extglob | ||
- mv ./build/!(caravan) ./build/caravan/ | ||
- http-server build -p 3000 -c-1 --silent & | ||
script: | ||
- $(npm bin)/cypress run --env configFile=travis | ||
- stage: build | ||
node_js: 10 | ||
script: npm run build:ci | ||
node_js: 12 | ||
script: npm run build:ci | ||
before_deploy: | ||
- git remote set-url origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git | ||
- git config --global user.email "Travis CI<[email protected]>" | ||
- git config --global user.name "TravisCI" | ||
deploy: | ||
provider: script | ||
script: "npm run deploy" | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributing | ||
|
||
Contributions are always welcome, no matter how large or small. | ||
|
||
**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) | ||
|
||
## Project setup | ||
|
||
First, [fork](https://guides.github.com/activities/forking) and then clone the caravan repository: | ||
|
||
```sh | ||
git clone https://github.com/your-username/caravan | ||
cd caravan | ||
git remote add upstream https://github.com/unchained-capital/caravan | ||
``` | ||
|
||
Install dependencies: | ||
|
||
```sh | ||
npm install | ||
``` | ||
|
||
Starting caravan locally (this will open caravan in your default browser): | ||
|
||
```sh | ||
npm run start | ||
``` | ||
|
||
## Creating Pull Requests | ||
|
||
1. Create a branch: | ||
|
||
```sh | ||
git checkout -b my-branch | ||
``` | ||
|
||
2. Happy Hacking 🎉: Author your awesome code changes. | ||
|
||
3. Ensure your changes pass linting and testing: | ||
|
||
To test: | ||
```sh | ||
npm test | ||
``` | ||
|
||
To lint your changes: | ||
|
||
```sh | ||
npm run lint | ||
``` | ||
|
||
4. Commit your changes: | ||
|
||
`caravan` uses [commitizen](https://github.com/commitizen/cz-cli) to create commit messages so it can automatically create semantic releases. | ||
|
||
```sh | ||
git add . | ||
npm run commit | ||
# answer the questions | ||
``` | ||
|
||
5. Push your changes: | ||
|
||
```sh | ||
git push origin my-branch | ||
``` | ||
|
||
5. Open [this project on GitHub](https://github.com/unchained-capital/caravan), then click “Compare & pull request”. | ||
|
||
## Help needed | ||
|
||
Please checkout the open issues for ideas of things to work on. | ||
|
||
Also, please watch the repo and respond to questions/bug reports/feature requests, Thanks! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"baseUrl": "https://localhost:3000/caravan#/", | ||
"chromeWebSecurity": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"baseUrl": "http://localhost:3000/caravan/#/", | ||
"chromeWebSecurity": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
Oops, something went wrong.