Skip to content

Commit 217d135

Browse files
authored
Merge pull request #27 from celo-tools/desktop
Major update: Create desktop apps and promote out of Beta
2 parents 0ab543a + ad395c1 commit 217d135

202 files changed

Lines changed: 10595 additions & 2506 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949
"^src/(.*)": "<pkgDir>/src/$1"
5050
}
5151
}
52-
]
52+
],
53+
// Seem to require these even though https://github.com/babel/babel/issues/10690 is closed?
54+
"@babel/plugin-proposal-nullish-coalescing-operator",
55+
"@babel/plugin-proposal-optional-chaining"
5356
]
5457
}
5558
},

.eslintignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules
22
dist
33
webpack.config.js
44
jest.config.js
5-
spec
5+
spec
6+
electron
7+
scripts
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug in CeloWallet.app
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
#### App Version and Operating System
11+
12+
<!-- App version can be found in the About Wallet modal, link in the footer -->
13+
14+
- Tested on **version_here**
15+
- Platform and version: **e.g. Web / Mac 10.13.5 / Windows 10 / ..**
16+
17+
#### Expected behavior
18+
19+
<!-- What did you expect to happen? -->
20+
21+
#### Actual behavior
22+
23+
<!-- What's the current behavior you're seeing? -->
24+
25+
#### Steps to reproduce the behavior
26+
27+
<!-- Explain steps to reproduce or provide a screenshot / gif -->
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Feature Request
3+
about: Request a feature for CeloWallet.app
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
#### Feature Description
11+
12+
<!-- Share some info about what you'd like to see added or changed -->
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: bundle-desktop
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- staging
7+
- production
8+
- desktop
9+
workflow_dispatch:
10+
11+
jobs:
12+
test-and-build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [macos-latest, windows-latest, ubuntu-latest]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-node@v2
21+
with:
22+
node-version: 12.x
23+
24+
- name: Install dependencies
25+
run: yarn
26+
27+
- name: Run linter
28+
run: yarn lint
29+
30+
# TODO re-enable
31+
# - name: Run test
32+
# shell: bash
33+
# run: yarn test
34+
35+
- name: Build with webpack for electron
36+
shell: bash
37+
run: ./scripts/build.sh -n Mainnet -e
38+
39+
- name: Build on Mac
40+
run: yarn electron-builder --mac --publish never
41+
env:
42+
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
43+
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
44+
if: runner.os == 'macOS'
45+
46+
- name: Build on Windows
47+
run: yarn electron-builder --win --publish never
48+
if: runner.os == 'Windows'
49+
50+
- name: Install deps for Linux
51+
run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev
52+
if: runner.os == 'Linux'
53+
54+
- name: Build on Linux
55+
run: yarn electron-builder --linux --publish never
56+
if: runner.os == 'Linux'
57+
58+
- uses: actions/upload-artifact@v2
59+
with:
60+
name: celowallet-artifacts
61+
path: |
62+
dist-electron/*-mac*.dmg
63+
dist-electron/*-mac*.zip
64+
dist-electron/*-linux*.AppImage
65+
dist-electron/*-win*.exe
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: publish-desktop
2+
on: workflow_dispatch
3+
4+
jobs:
5+
build-and-publish:
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
os: [macos-latest, windows-latest, ubuntu-latest]
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v2
14+
with:
15+
node-version: 12.x
16+
17+
- name: Install dependencies
18+
run: yarn
19+
20+
- name: Run linter
21+
run: yarn lint
22+
23+
# TODO re-enable
24+
# - name: Run test
25+
# shell: bash
26+
# run: yarn test
27+
28+
- name: Build with webpack for electron
29+
shell: bash
30+
run: ./scripts/build.sh -n Mainnet -e
31+
32+
- name: Build on Mac
33+
run: yarn electron-builder --mac --publish always
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
CSC_LINK: ${{ secrets.MAC_CSC_LINK }}
37+
CSC_KEY_PASSWORD: ${{ secrets.MAC_CSC_KEY_PASSWORD }}
38+
APPLE_ID: ${{ secrets.APPLE_ID }}
39+
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
40+
if: runner.os == 'macOS'
41+
42+
- name: Build on Windows
43+
run: yarn electron-builder --win --publish always
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
if: runner.os == 'Windows'
47+
48+
- name: Install deps for Linux
49+
run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev
50+
if: runner.os == 'Linux'
51+
52+
- name: Build on Linux
53+
run: yarn electron-builder --linux --publish always
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
if: runner.os == 'Linux'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.cache/
33
coverage/
44
dist/
5+
dist-electron/
56
node_modules/
67
*.log
78

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"**/node_modules": false
44
},
55
"files.exclude": {
6-
"**/*.js": { "when": "$(basename).ts" },
76
"**/*.js.map": true
87
},
98
"files.watcherExclude": {

FAQ.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,49 @@
11
# Frequently Asked Questions
22

3-
[What can I do with the web wallet?](#what-can-i-do-with-the-web-wallet)
3+
[Where can the app be used?](#where-can-the-app-be-used)
44

55
[Does it work on phones?](#does-it-work-on-phones)
66

77
[Will it work with Valora wallets?](#will-it-work-with-valora-wallets)
88

99
[How is it different than Valora?](#how-is-it-different-than-valora)
1010

11-
[Is the web wallet safe?](#is-the-web-wallet-safe)
11+
[Is the web version safe?](#is-the-web-version-safe)
1212

1313
[Where are my keys stored?](#where-are-my-keys-stored)
1414

15-
[Can I download the wallet and run it offline?](#can-i-download-the-wallet-and-run-it-offline)
16-
1715
[Can feature X be added?](#can-feature-x-be-added)
1816

19-
## What can I do with the web wallet?
17+
## Where can the app be used?
2018

21-
The web wallet is great at conveniently creating small wallets for day-to-day transactions. You can send payments, make currency exchanges, and see your transaction history.
19+
The Celo Wallet can run in a modern browser (Chrome is recommended) or on your desktop (Mac, Windows, and Linux).
20+
The desktop version has stricter security guarantees and is strongly recommended for large accounts.
2221

2322
## Does it work on phones?
2423

25-
Yes, the wallet was designed from the ground-up to be lightweight and mobile-friendly.
24+
Yes, the web version was designed from the ground-up to be lightweight and mobile-friendly.
2625

2726
## Will it work with Valora wallets?
2827

29-
Yes, you can use your Account Key (mnemonic phrase) to import your account into the web wallet, back into Valora, or use both at the same time!
28+
Yes, you can use your Account Key (mnemonic phrase) to import your account into the web wallet, back into Valora, or use both at the same time.
3029

3130
## How is it different than Valora?
3231

33-
The most obvious difference is platform: Valora runs on iOS and Android, the web wallet runs in any modern browser. More abstractly though, Valora is a social payments application whereas the web wallet is just a tool. That's why Valora includes extra features around importing contacts, verifying phone numbers, finding friends, etc. In contrast, one of this wallet's design principles is to be minimal, meaning no analytics, no plugins, and no device permissions (except for Ledger access).
32+
The most obvious difference is platform: Valora runs on iOS and Android, the web wallet runs in any modern browser and on desktop. More abstractly though, Valora is a social payments application whereas the web wallet is just a tool. That's why Valora includes extra features around importing contacts, verifying phone numbers, finding friends, etc. In contrast, one of this wallet's design principles is to be minimal, meaning no analytics, no plugins, and no device permissions (except for Ledger access).
3433

35-
## Is the web wallet safe?
34+
## Is the web version safe?
3635

37-
Short answer: Yes, but use is only recommended for small 'hot' wallets or Ledger-backed wallets.
36+
Short answer: It's safe enough for small 'hot' wallets or Ledger-backed wallets. For anything larger or more important, the desktop version is strongly recommended.
3837

39-
Long answer: The core developers try their best to keep the all wallets safe. This includes encrypting your wallet at rest, minimal use of 3rd party code, pinning dependencies, using single-origin code sourcing, publishing bundle hashes, and other modern web development best practices. That said, the web is, by design, an open and extensible platform. That unfortunately means even the best web apps are vulnerable to certain risks, like malicious browser extensions. For this reason, the recommendation is to use the web wallet for small amounts only. For larger amounts, use Valora or a Ledger hardware wallet.
38+
Long answer: The web version does what it can to protect your funds but web apps have certain inherent limitations. Protections includes: encrypting your wallet at rest, minimal use of 3rd party code, pinning dependencies, using single-origin code sourcing, publishing bundle hashes, and other modern web development best practices. That said, the web is, by design, an open and extensible platform. That unfortunately means all web apps are vulnerable to certain risks, like malicious browser extensions. For this reason, the recommendation is to use the web version for small amounts only. For larger amounts, use the desktop version, Valora or a Ledger hardware wallet.
4039

4140
## Where are my keys stored?
4241

43-
Your mnemonic, from which you keys are derived, is encrypted using your pin and stored in browser local storage. Your keys never leave your device. In other words, the web wallet is a self-sovereign (non-custodial) wallet.
44-
45-
## Can I download the wallet and run it offline?
42+
Your mnemonic, from which you keys are derived, is encrypted using your password and stored either in browser local storage for web or on disk for desktop. Your keys never leave your device. In other words, this wallet is a self-sovereign (non-custodial) wallet.
4643

47-
Soon! The wallet has some limited Progress Web App (PWA) support for app pinning.
44+
- Mac: `~/Library/Application Support/celo-web-wallet`
45+
- Linux: `~/.config/celo-web-wallet or $XDG_CONFIG_HOME/celo-web-wallet`
46+
- Windows: `C:\Users\{USERNAME}\AppData\Roaming\celo-web-wallet`
4847

4948
## Can feature X be added?
5049

README.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# Celo Web Wallet
1+
# Celo Wallet For Web and Desktop
22

3-
A browser-based, mobile-friendly, self-sovereign wallet for the Celo network.
3+
A lightweight, self-sovereign wallet for the Celo network. Manage small accounts [on the web](https://celowallet.app) or large ones [on your desktop.](https://github.com/celo-tools/celo-web-wallet/releases) Fully compatible with Ledger hardware.
44

5-
Ideal for managing small 'hot' wallets or Celo wallets on Ledger hardware.
5+
## Desktop Downloads
6+
7+
The desktop downloads for Mac, Windows, and Linux are hosted here in the [releases page](https://github.com/celo-tools/celo-web-wallet/releases).
68

79
## Frequently Asked Questions
810

@@ -12,8 +14,8 @@ See the [FAQ](FAQ.md) for more details about common questions.
1214

1315
This wallet uses [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity). Current bundle hashes:
1416

15-
* Main bundle: `bundle.js -> sha256-FR2Caux0Qij79Jj47G0xbU8WYknbNmxxtWbKEim2cUw=`
16-
* Optional Ledger bundle: `bundle-ledger.js -> sha256-m5wcEVEXFVmOal5a4P2F9Sum8c8jgGxVUg0d4k3G5MQ=`
17+
* Main bundle: `bundle.js -> sha256-I4698ivrNQ6zcsW4WgC3fqUvNmAGEGIo9sUWSVzw4pw=`
18+
* Optional Ledger bundle: `bundle-ledger.js -> sha256-Ue4vU1iTjNOEPSX51d7ofexxwCEBiiJmQUEX6Ewd4AQ=`
1719

1820
Advanced users can verify the source integrity by comparing the hashes in their page source to these values.
1921

@@ -22,26 +24,29 @@ Advanced users can verify the source integrity by comparing the hashes in their
2224
First install dependencies:
2325

2426
```sh
25-
# The --ignore-scripts flag here is optional but improves security
26-
yarn install --ignore-scripts
27+
yarn install
2728
```
2829

29-
To create and run a development build:
30+
### Running in a browser
31+
32+
To create and run a development build in a browser (recommended for development):
3033

3134
```sh
3235
yarn dev
3336
```
3437

35-
To create a production build:
38+
### Running in Electron
39+
40+
To build for electron and run in a desktop app:
3641

3742
```sh
38-
yarn build:prod
43+
yarn electron:dev
3944
```
4045

4146
## Contributing
4247

4348
For small contributions such as bug fixes or style tweaks, please open a Pull Request.
44-
For new features, please create an issue to start a discussion on [Discord](https://discord.com/channels/600834479145353243/783806028629934110).
49+
For new features, please create an issue to start a discussion on [Discord](https://discord.com/channels/600834479145353243/812471799585439794).
4550

4651
## License
4752

0 commit comments

Comments
 (0)