Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/1.3.0 #57

Merged
merged 108 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
5066166
ios app init
rappix Jun 6, 2023
9d795eb
ios app
rappix Jun 6, 2023
111e87d
update xcode project files
rappix Jul 30, 2023
58dd0b7
ios app
rappix Jul 30, 2023
6a6a59b
ios app build scripts
rappix Jul 30, 2023
40aedda
ui adjustments for the app
rappix Jul 30, 2023
1c4b80d
bump version
rappix Aug 4, 2023
de7f7db
Merge branch 'release/1.3.0' into feature/ios-app
rappix Aug 4, 2023
90b03d6
Merge pull request #43 from bitgreen/feature/ios-app
rappix Aug 4, 2023
eca9c8b
wip: android
rappix Sep 9, 2023
768a533
Merge branch 'master' into release/1.3.0
rappix Feb 14, 2024
f2eb310
update packages
rappix Feb 14, 2024
cf21f6c
fix: import missing methods
rappix Feb 15, 2024
5d4d934
fix app
rappix Feb 15, 2024
21afc55
add missing import
rappix Feb 15, 2024
f501646
background fix
rappix Feb 15, 2024
019cfeb
fix: add missing plugin
rappix Feb 16, 2024
46bbe4e
IDE config files for tabs/spaces
mikeburnsbitgreen Feb 25, 2024
fb11ba8
switched to SCSS, automatically clean builds
mikeburnsbitgreen Feb 29, 2024
d149d6c
update packages
rappix Mar 2, 2024
b8df6a7
remove css files from xcode project
rappix Mar 2, 2024
e143625
fix: update bootstrap
rappix Mar 2, 2024
f74a8bf
fully integrated capacitorjs
mikeburnsbitgreen Mar 4, 2024
511f9a9
fixed app build scripts
mikeburnsbitgreen Mar 4, 2024
d73d7c8
JS cleanup
mikeburnsbitgreen Mar 4, 2024
3fd2145
fix: capacitor commands
rappix Mar 4, 2024
4fd19c4
fixed background image problem, first-load offset problem
mikeburnsbitgreen Mar 4, 2024
11ed898
support link fix
mikeburnsbitgreen Mar 4, 2024
42f4313
copy to clipboard for app
mikeburnsbitgreen Mar 4, 2024
0896062
authentification-server JS cleanup
mikeburnsbitgreen Mar 4, 2024
2c0d284
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 4, 2024
7ba470b
force bash for icon generation
mikeburnsbitgreen Mar 5, 2024
c63f7a1
force bash for icon generation ios fix
mikeburnsbitgreen Mar 5, 2024
4356db1
modified state management to use native back button
mikeburnsbitgreen Mar 6, 2024
ec0140d
fixes for xcode project & icon generation scrips
rappix Mar 7, 2024
91d8d09
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 7, 2024
fd0eee8
fix: adjustments for build & dev commands
rappix Mar 7, 2024
1289c5a
safari and ios updates
rappix Mar 7, 2024
4f0ac43
fixes: polkadot api, broken screens for standalone app
rappix Mar 7, 2024
81bd07b
fix build & dev commands
rappix Mar 8, 2024
2845cc4
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 8, 2024
e249f8c
package.json script compatability updates and app asset generation ic…
mikeburnsbitgreen Mar 8, 2024
133bf07
Merge branch 'release/1.3.0' of https://github.com/bitgreen/browser-w…
mikeburnsbitgreen Mar 8, 2024
034ae8f
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 8, 2024
1a729dc
splash screen updates
mikeburnsbitgreen Mar 8, 2024
df0bcb1
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 8, 2024
646b83b
fix: assets command
rappix Mar 8, 2024
1ef0273
fix: assets command
rappix Mar 8, 2024
ddc4be1
fixed show footer after login
mikeburnsbitgreen Mar 10, 2024
324d433
don't need to set background asset colors
mikeburnsbitgreen Mar 10, 2024
f551e1e
fixed back button problem
mikeburnsbitgreen Mar 10, 2024
e8fcad8
change build to sync for apps
mikeburnsbitgreen Mar 10, 2024
2a677cf
use capacitor clipboard
mikeburnsbitgreen Mar 11, 2024
c5be679
firefox UI fixes
mikeburnsbitgreen Mar 11, 2024
e9d0cc3
use capacitor preferences api for apps
mikeburnsbitgreen Mar 11, 2024
2d76ad8
fixed modal overlap when hidden
mikeburnsbitgreen Mar 11, 2024
46de31d
removed custom network functionality
mikeburnsbitgreen Mar 11, 2024
42ec42c
removed commented-out HTML
mikeburnsbitgreen Mar 11, 2024
8a6cdb1
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 11, 2024
a989a37
fix: various fixes
rappix Mar 11, 2024
8008f55
fixed mnemonic interface for apps
mikeburnsbitgreen Mar 11, 2024
564f1f7
fix welcome screen
rappix Mar 12, 2024
5eb9243
add missing import
rappix Mar 12, 2024
43ef248
fix: ui fixes & keyboard issues on ios
rappix Mar 13, 2024
d869dfd
small android fixes, a bit of cleanup
mikeburnsbitgreen Mar 13, 2024
308bc8f
fix: capacitor appId
rappix Mar 14, 2024
4130563
fix footer handling on apps
rappix Mar 15, 2024
31b3c08
ui fixes and improvements
rappix Mar 15, 2024
8868079
add status bar color on android
rappix Mar 15, 2024
4169e33
show connection error on dashboard
mikeburnsbitgreen Mar 18, 2024
ada1df7
ui fixes
rappix Mar 18, 2024
7bbbeb5
Merge remote-tracking branch 'origin/release/1.3.0' into release/1.3.0
rappix Mar 18, 2024
e497962
updated versioning process
mikeburnsbitgreen Mar 19, 2024
fc8572f
fix: ui fixes
rappix Mar 20, 2024
7feb664
optimize password derivation
rappix Mar 22, 2024
987a697
ui adjustments
rappix Mar 22, 2024
d53649e
small fix for staking display APY
rappix Mar 22, 2024
d19d285
ui adjustments
rappix Mar 22, 2024
daff56d
asset generation & ui improvements
rappix Mar 24, 2024
f867c4b
update splash image
rappix Mar 24, 2024
ade0cf8
update splash image
rappix Mar 24, 2024
d721fd0
fix: ui fixes for ios
rappix Mar 24, 2024
53ca141
fix: ui fixes for ios
rappix Mar 24, 2024
fa4d549
add privacy screen & ui improvements
rappix Mar 27, 2024
6c86dcd
read price from cache engine
rappix Apr 16, 2024
df9c202
progress bar, animations
rappix May 9, 2024
7df4a1c
kyc updates
rappix May 10, 2024
d7c3c70
focus fix
rappix May 10, 2024
b6ab57f
small fix
rappix May 10, 2024
dc22367
assets & transactions
rappix May 13, 2024
754cb29
kyc ui adjustments
rappix May 13, 2024
dac32c9
retired credits
rappix May 19, 2024
ae798fe
ui fix for firefox
rappix May 30, 2024
617396d
fix: show/hide password
rappix May 30, 2024
f9a6500
update dependencies #56 #55 #54
rappix May 30, 2024
a5646c1
fix: kyc links on apps
rappix May 30, 2024
64cb63b
fix: typo
rappix May 31, 2024
233080b
fix: ui adjustment
rappix May 31, 2024
5043e40
fix: show last 100 retirements
rappix May 31, 2024
91cf825
fix: shield
rappix May 31, 2024
eae6b70
fix: bump
rappix Jun 1, 2024
829aaef
feat: delete wallet
rappix Jun 5, 2024
b7eaf9c
feat: reset password
rappix Jun 6, 2024
1534293
fix: ios animations
rappix Jun 6, 2024
49a4202
feat: wallet creation & adjustments
rappix Jun 6, 2024
0c4143a
fix: bump ios build
rappix Jun 6, 2024
5c0a1aa
fix: macos bundle identifier
rappix Jun 7, 2024
54b7878
Merge remote-tracking branch 'origin/master' into release/1.3.0
rappix Jun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .atom/config.cson
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"*":
editor:
tabLength: 2
softTabs: true
".css.source, .scss.source, .html.source":
editor:
tabLength: 4
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
indent_style = space
indent_size = 2

[*.css]
indent_size = 4

[*.scss]
indent_size = 4

[*.html]
indent_size = 4
7 changes: 7 additions & 0 deletions .idea/codeStyleSettings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .nanorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
set tabsize 2
set tabstospaces

syntax "css" "\.(css|scss)$"
set tabsize 4

syntax "html" "\.html$"
set tabsize 4
17 changes: 17 additions & 0 deletions .sublime-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"settings": {
"syntax_specific": {
"*.css": {
"tab_size": 4
},
"*.scss": {
"tab_size": 4
},
"*.html": {
"tab_size": 4
}
}
}
}
5 changes: 5 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set tabstop=2
set shiftwidth=2
set expandtab

autocmd FileType css,scss,html setlocal tabstop=4 shiftwidth=4 expandtab
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false,
"[css]": {
"editor.tabSize": 4
},
"[scss]": {
"editor.tabSize": 4
},
"[html]": {
"editor.tabSize": 4
}
}
50 changes: 32 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# Bitgreen Browser Wallet

Bitgreen Browser extension with wallet functionalities.
Bitgreen Browser extension and android, iOS hybrid apps with wallet functionalities.

The Bitgreen Browser Wallet is a browser extension that allows users to create wallets, send and receive funds, and make
disbursements to the Bitgreen ecosystem in order to create, sell, purchase and retire Verified Carbon Credits (VCUs). To
incorporate this functionality into your own project, please see the technical description below. If you require any
assistance using these features, or this repo, please contact us at [contact], we are happy to assist.
The Bitgreen Browser Wallet is a browser extension, android and iOS app that allows users to create wallets, send and receive funds, and make disbursements to the Bitgreen ecosystem in order to create, sell, purchase and retire Verified Carbon Credits (VCUs). To incorporate this functionality into your own project, please see the technical description below. If you require any assistance using these features, or this repo, please [contact us](https://bitgreen.org/contact), we are happy to assist.

### Features:

Expand All @@ -28,6 +25,12 @@ assistance using these features, or this repo, please contact us at [contact], w

___

## Quickstart
- `npm run setup` installs all npm packages and initializes app platforms
- `npm run dev:{target}` builds development build and runs watchdog for the desired target (chrome, firefox, safari, android, ios)

___

## Browser Compatibility

The wallet extension is available for the following browsers:
Expand All @@ -37,13 +40,22 @@ The wallet extension is available for the following browsers:
- Safari (Desktop and Mobile version)
- Edge (compatible with Chrome Extension)
- Brave (compatible with Chrome Extension)
- Other Browsers based on Chrome Engine
- Other Browsers based on chromium Engine

___

## OS Compatability

The wallet app is available on the following operating systems:

- android
- iOS

___

## Project Structure

- **packages/browser-wallet-base** - Extension base structure.
- **packages/browser-wallet-base** - Extension base structure, including capacitorjs project and webpack configs.
- **packages/browser-wallet-core** - Main features mostly used for background tasks, stores, API messaging.
- **packages/browser-wallet-ui** - The UI components for the extension.
- **packages/browser-wallet-utils** - Helpers and utilities for both UI and background.
Expand All @@ -53,35 +65,37 @@ ___
## Developing & Building

Install [node.js >18.12](https://nodejs.org).
Install the required dependencies from the root for this repo, by running the following command:
Install the required dependencies and initialize the capacitorjs project from the root for this repo, by running the following command:

```bash
npm install
npm run setup
```

More detailed information to the build process can be found [here](packages/browser-wallet-base/readme.md)

## Versioning

Please see [browser-wallet-base README](packages/browser-wallet-base/readme.md#versioning) for detailed information

### Production Build

You can build all versions of extensions, and output will be located at `/build` directory, where each sub folder
represents each browser extension type:
You can build all production versions of extensions and apps, and output will be located at `/build` directory, where each sub folder represents each browser extension type or app platform:

```bash
npm run build
npm run build:all
```

You can also specify which version to build. There is 3 possible versions of this extension: `chrome`, `firefox`
and `safari`.
You can also specify which version to build. There is 3 possible versions of this extension/app: `chrome`, `firefox`, `safari`, `android` and `ios`.

```bash
npm run build:chrome
npm run build:{target}
```

___

### Development

Also, you can use the `npm run dev:chrome` to start the local development of the extension. Please keep in mind that in
this case, you need to specify browser type. Webpack will be running with `--watch` flag set to true. Output directory
is the same (read above).
Also, you can use the `npm run dev:{target}` to start the local development of the extension/app. Please keep in mind that in this case, you need to specify browser type or app platform. Webpack will be running with `watch` flag set to true and inline-sourcemaps for all JS and SCSS files. Output directory is the same (read above).
___

## Wallet Docs
Expand Down
54 changes: 29 additions & 25 deletions authentication-server/BrowserWallet-Authentication-Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,46 @@ const { cryptoWaitReady, signatureVerify } = require('@polkadot/util-crypto');
const {stringToU8a,hexToU8a} = require('@polkadot/util');
// set limit of authentication from the same ip address, 5 attempts each minute
const limiter = RateLimit({
windowMs: 1*60*1000, // 1 minute
windowMs: 60000, // 1 minute
max: 5
});

// create web server object
let app = express();

// apply rate limiter to all requests
app.use(limiter);

mainloop();
async function mainloop(){
console.log("[info] - Browser Wallet/ Authentication Server - ver. 1.00 - Starting");
await cryptoWaitReady();
app.use(bodyParser.urlencoded({ extended: true }));
//check authentication
app.post('/',async function(req, res) {
BrowserWalletToken="";
if (typeof req.body.BrowserWalletToken != 'undefined'){
BrowserWalletToken=DOMPurify.sanitize(req.body.BrowserWalletToken);
bj=JSON.parse(BrowserWalletToken);
// verify signature
const signature=hexToU8a(bj.signature);
const message=stringToU8a(bj.message)
if(signatureVerify(message, signature,bj.address).isValid) {
res.send("Authentication is valid for:"+bj.address);
}else {
res.send("Authentication is NOT valid for:"+bj.address);
}

}else {
res.send("BrowserWalletToken has not been received");
console.log("[info] - Browser Wallet/ Authentication Server - ver. 1.00 - Starting");
await cryptoWaitReady();
app.use(bodyParser.urlencoded({ extended: true }));

//check authentication
app.post('/',async function(req, res) {
BrowserWalletToken="";
if (typeof req.body.BrowserWalletToken != 'undefined'){
BrowserWalletToken=DOMPurify.sanitize(req.body.BrowserWalletToken);
bj=JSON.parse(BrowserWalletToken);

// verify signature
const signature=hexToU8a(bj.signature);
const message=stringToU8a(bj.message)
if(signatureVerify(message, signature,bj.address).isValid) {
res.send("Authentication is valid for:" + bj.address);
}else {
res.send("Authentication is NOT valid for:" + bj.address);
}
});
// listening to server port
console.log("[info] - listening for connections on port TCP/3001...");
app.listen(3001,function() {});

}else {
res.send("BrowserWalletToken has not been received");
}
});

// listening to server port
console.log("[info] - listening for connections on port TCP/3001...");
app.listen(3001,function() {});
}


Loading
Loading