Skip to content

Commit 9e142be

Browse files
v1.15.3
1 parent 7b946f9 commit 9e142be

File tree

179 files changed

+2641
-1753
lines changed

Some content is hidden

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

179 files changed

+2641
-1753
lines changed

.github/workflows/statoscope-comment.jora

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $getSizeByChunks: => files.(getAssetSize($$, true)).reduce(=> size + $$, 0);
3636
}
3737
},
3838
validation: {
39-
$messages: resolveInputFile().compilations.[hash].(hash.validation_getItems());
39+
$messages: $after.compilations.[hash].(hash.validation_getItems());
4040
$messages,
4141
total: $messages.size()
4242
}

.github/workflows/statoscope-comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ module.exports = ({ initialSize, bundleSize, validation, prNumber}) => `**📦 S
66
77
**🕵️ Validation errors:** ${validation.total > 0 ? validation.total : '✅'}
88
9-
Full Statoscope report could be found [here️](https://deploy-preview-${prNumber}--mytonwallet-e5kxpi8iga.netlify.app/report.html)
9+
Full Statoscope report could be found [here️](https://deploy-preview-${prNumber}--mytonwallet-e5kxpi8iga.netlify.app/statoscope-report.html) / [diff](https://deploy-preview-${prNumber}--mytonwallet-e5kxpi8iga.netlify.app/statoscope-report.html#diff)
1010
`;

.github/workflows/upload-main-stats.yml renamed to .github/workflows/statoscope-upload-reference-statistics.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Upload main stats
1+
name: Statoscope upload reference statistics
22

33
on:
44
push:
@@ -12,7 +12,7 @@ jobs:
1212
node-version: [18.x]
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v3
1616
with:
1717
persist-credentials: false
1818
- name: Reconfigure git to use HTTPS authentication
@@ -24,8 +24,8 @@ jobs:
2424
- name: Install
2525
run: npm ci
2626
- name: Build
27-
run: npm run build:production; cp ./public/build-stats.json ./reference.json
28-
- uses: actions/upload-artifact@v2
27+
run: npm run build:production; cp ./public/statoscope-build-statistics.json ./statoscope-reference.json
28+
- uses: actions/upload-artifact@v3
2929
with:
30-
name: main-stats
31-
path: ./reference.json
30+
name: statoscope-reference
31+
path: ./statoscope-reference.json

.github/workflows/statoscope.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,26 +57,30 @@ jobs:
5757
node_modules
5858
key: ${{ github.sha }}
5959
- name: Build
60-
run: npm run build:production; cp public/build-stats.json input.json
61-
- name: Download reference stats
60+
run: npm run build:production
61+
- name: Download reference statistics
6262
uses: dawidd6/action-download-artifact@v2
6363
with:
64-
workflow: upload-main-stats.yml
64+
workflow: statoscope-upload-reference-statistics.yml
6565
workflow_conclusion: success
66-
name: main-stats
66+
name: statoscope-reference
6767
path: ./
6868
continue-on-error: true
69+
- name: Prepare statoscope input
70+
run: cp public/statoscope-build-statistics.json input.json; mv statoscope-reference.json reference.json
6971
- name: Validate
7072
run: npm run statoscope:validate-diff
7173
- name: Query stats
7274
if: "github.event_name == 'pull_request'"
73-
run: cat .github/workflows/statoscope-comment.jora | npx --no-install @statoscope/cli query --input input.json --input reference.json > result.json
75+
run: cat .github/workflows/statoscope-comment.jora | npx --no-install @statoscope/cli query --input input.json --input reference.json > statoscope-result.json
7476
- name: Hide bot comments
7577
uses: int128/hide-comment-action@v1
7678
- name: Comment PR
7779
if: "github.event_name == 'pull_request'"
7880
uses: actions/[email protected]
7981
with:
8082
script: |
81-
const createStatoscopeComment = require('./dev/createStatoscopeComment');
83+
const createStatoscopeComment = require('./dev/statoscopeCreateComment');
8284
await createStatoscopeComment({ github, context, core })
85+
- name: Cleanup
86+
run: rm input.json; rm reference.json

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
node_modules
22
dist
33
dist-electron
4-
MyTonWallet.zip
4+
MyTonWallet-chrome.zip
55
MyTonWallet-firefox.zip
6+
MyTonWallet-opera.zip
67
.cache
78
.env*
89
!.env.example
@@ -13,9 +14,10 @@ dev/perf/screenshot*
1314
.DS_store
1415
.DS_Store
1516
test-results
16-
public/build-stats.json
17-
public/reference.json
17+
public/statoscope-build-statistics.json
18+
public/statoscope-reference.json
1819
public/statoscope-report.html
20+
public/statoscope-master-reference.json
1921
trash/
2022
coverage/
2123
src/i18n/en.json

README.md

Lines changed: 11 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66

77
The wallet is **self-custodial and safe**. The developers **do not** have access to funds, browser history or any other information. We focus on **speed**, **size** and **attention to detail**. We try to avoid using third-party libraries to ensure maximum reliability and safety, and also to lower the bundle size.
88

9+
## Table of contents
10+
11+
- [Requirements](#requirements)
12+
- [Local Setup](#local-setup)
13+
- [Dev Mode](#dev-mode)
14+
- [Installing App on Linux](#installing-app-on-linux)
15+
- [Electron](./docs/electron.md)
16+
- [Verifying GPG Signatures](./docs/gpg-check.md)
17+
- [Support Us](#support-us)
18+
919
## Requirements
1020

1121
Ready to build on **macOS** and **Linux**.
@@ -29,86 +39,10 @@ npm i
2939
npm run dev
3040
```
3141

32-
## Electron
33-
34-
Electron allows to build native application, that can be installed and run on Windows, macOS and Linux.
35-
36-
### Installing app on Linux
42+
## Installing App on Linux
3743

3844
In order for the application to work correctly and be displayed in the Linux menu, you need to install the AppImage via [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher)
3945

40-
#### NPM scripts
41-
42-
- `npm run dev:electron`
43-
44-
Run Electron in development mode, concurrently starts 3 processes with watch for changes: main (main Electron process), renderer (FE code) and Webpack for Electron (compiles main Electron process from TypeScript).
45-
46-
- `npm run electron:webpack`
47-
48-
The main process code for Electron, which includes preload functionality, is written in TypeScript and is compiled using the `webpack-electron.config.js` configuration to generate JavaScript code.
49-
50-
- `npm run electron:build`
51-
52-
Prepare renderer (FE code) build, compile Electron main process code, install and build native dependencies, is used before packaging or publishing.
53-
54-
- `npm run electron:staging`
55-
56-
Create packages for macOS, Windows and Linux in `dist-electron` folders with `APP_ENV` as `staging` (allows to open DevTools, includes sourcemaps and does not minify built JavaScript code), can be used for manual distribution and testing packaged application.
57-
58-
- `npm run electron:production`
59-
60-
Create packages for macOS, Windows and Linux in `dist-electron` folders with `APP_ENV` as `production` (disabled DevTools, minified built JavaScript code), can be used for manual distribution and testing packaged application.
61-
62-
- `npm run deploy:electron`
63-
64-
Create packages for macOS, Windows and Linux in `dist-electron` folder and publish release to GitHub, which allows supporting autoupdates. See [GitHub release workflow](#github-release) for more info.
65-
66-
#### Code signing on MacOS
67-
68-
To sign the code of your application, follow these steps:
69-
70-
- Install certificates to `login` folder of your Keychain.
71-
- Download and install `Developer ID - G2` certificate from the [Apple PKI](https://www.apple.com/certificateauthority/) page.
72-
- Under the Keychain application, go to the private key associated with your developer certificate. Then do `key > Get Info > Access Control`. Down there, make sure your application (Xcode) is in the list `Always allow access by these applications` and make sure `Confirm before allowing access` is turned on.
73-
- A valid and appropriate identity from your keychain will be automatically used when you publish your application.
74-
75-
More info in the [official documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing).
76-
77-
#### Notarize on MacOS
78-
79-
Application notarization is done automatically in [electron-builder](https://github.com/electron-userland/electron-builder/) module, which requires `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD` environment variables to be passed.
80-
81-
How to obtain app-specific password:
82-
83-
- Sign in to [appleid.apple.com](appleid.apple.com).
84-
- In the "Sign-In and Security" section, select "App-Specific Passwords".
85-
- Select "Generate an app-specific password" or select the Add button, then follow the steps on your screen.
86-
87-
#### GitHub release
88-
89-
##### GitHub access token
90-
91-
In order to publish new release, you need to add GitHub access token to `.env`. Generate a GitHub access token by going to https://github.com/settings/tokens/new. The access token should have the repo scope/permission. Once you have the token, assign it to an environment variable:
92-
93-
```
94-
# .env
95-
GH_TOKEN="{YOUR_TOKEN_HERE}"
96-
```
97-
98-
##### Publish settings
99-
100-
Publish configuration in `electron-builder.yml` config file allows to set GitHub repository owner/name.
101-
102-
##### Release workflow
103-
104-
- Draft a new release on GitHub. Create new tag version with the value of `version` in your application `package.json`, and prefix it with `v`. “Release title” can be anything you want.
105-
106-
For example, if your application `package.json` version is `1.0`, your draft’s tag version would be `v1.0`.
107-
108-
- Save draft release
109-
- Run `npm run electron:publish`, which will upload build artefacts to newly reated release.
110-
- Once you are done, publish the release. GitHub will tag the latest commit.
111-
11246
## Support Us
11347

11448
If you like what we do, feel free to contribute by creating a pull request, or just support us using this TON wallet: `EQAIsixsrb93f9kDyplo_bK5OdgW5r0WCcIJZdGOUG1B282S`. We appreciate it a lot!

deploy/copy_to_dist.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/env bash
22

33
cp -R ./public/* ${1:-"dist"}
4-
rm ./dist/statoscope-report.html
5-
rm ./dist/build-stats.json
64

75
cp ./src/lib/rlottie/rlottie-wasm.js ${1:-"dist"}
86
cp ./src/lib/rlottie/rlottie-wasm.wasm ${1:-"dist"}

deploy/package_extension.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ -z "$1" ]; then
6+
echo "Missing argument: <target>"
7+
exit 1
8+
fi
9+
10+
TARGET="$1"
11+
12+
cp -R ./public/* ./src/lib/rlottie/rlottie-wasm.js ./src/lib/rlottie/rlottie-wasm.wasm ./dist/
13+
14+
rm -rf ./dist/statoscope-* \
15+
./dist/get \
16+
./dist/background-electron-dmg.tiff \
17+
./dist/electron-entitlements.mac.plist \
18+
./dist/icon-electron-* \
19+
./dist/site.webmanifest
20+
21+
rm -f "MyTonWallet-$TARGET.zip"
22+
23+
zip -r -X "MyTonWallet-$TARGET.zip" dist/*

dev/createStatoscopeComment.js renamed to dev/statoscopeCreateComment.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-env node */
22

33
const fs = require('fs');
4-
const createPrComment = require('./createPrComment');
4+
const createPrComment = require('./statoscopeCreatePrComment');
55
const template = require('../.github/workflows/statoscope-comment');
66

77
module.exports = async ({ github, context }) => {
8-
const data = JSON.parse(fs.readFileSync('result.json', 'utf8'));
8+
const data = JSON.parse(fs.readFileSync('statoscope-result.json', 'utf8'));
99
data.prNumber = context.issue.number;
1010
const body = template(data);
1111

File renamed without changes.

docs/electron.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Electron
2+
3+
Electron allows to build native application, that can be installed and run on Windows, macOS and Linux.
4+
5+
## NPM scripts
6+
7+
- `npm run dev:electron`
8+
9+
Run Electron in development mode, concurrently starts 3 processes with watch for changes: main (main Electron process), renderer (FE code) and Webpack for Electron (compiles main Electron process from TypeScript).
10+
11+
- `npm run electron:webpack`
12+
13+
The main process code for Electron, which includes preload functionality, is written in TypeScript and is compiled using the `webpack-electron.config.js` configuration to generate JavaScript code.
14+
15+
- `npm run electron:build`
16+
17+
Prepare renderer (FE code) build, compile Electron main process code, install and build native dependencies, is used before packaging or publishing.
18+
19+
- `npm run electron:staging`
20+
21+
Create packages for macOS, Windows and Linux in `dist-electron` folders with `APP_ENV` as `staging` (allows to open DevTools, includes sourcemaps and does not minify built JavaScript code), can be used for manual distribution and testing packaged application.
22+
23+
- `npm run electron:production`
24+
25+
Create packages for macOS, Windows and Linux in `dist-electron` folders with `APP_ENV` as `production` (disabled DevTools, minified built JavaScript code), can be used for manual distribution and testing packaged application.
26+
27+
- `npm run deploy:electron`
28+
29+
Create packages for macOS, Windows and Linux in `dist-electron` folder and publish release to GitHub, which allows supporting autoupdates. See [GitHub release workflow](#github-release) for more info.
30+
31+
## Code signing on MacOS
32+
33+
To sign the code of your application, follow these steps:
34+
35+
- Install certificates to `login` folder of your Keychain.
36+
- Download and install `Developer ID - G2` certificate from the [Apple PKI](https://www.apple.com/certificateauthority/) page.
37+
- Under the Keychain application, go to the private key associated with your developer certificate. Then do `key > Get Info > Access Control`. Down there, make sure your application (Xcode) is in the list `Always allow access by these applications` and make sure `Confirm before allowing access` is turned on.
38+
- A valid and appropriate identity from your keychain will be automatically used when you publish your application.
39+
40+
More info in the [official documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing).
41+
42+
## Notarize on MacOS
43+
44+
Application notarization is done automatically in [electron-builder](https://github.com/electron-userland/electron-builder/) module, which requires `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD` environment variables to be passed.
45+
46+
How to obtain app-specific password:
47+
48+
- Sign in to [appleid.apple.com](appleid.apple.com).
49+
- In the "Sign-In and Security" section, select "App-Specific Passwords".
50+
- Select "Generate an app-specific password" or select the Add button, then follow the steps on your screen.
51+
52+
## GitHub release
53+
54+
### GitHub access token
55+
56+
In order to publish new release, you need to add GitHub access token to `.env`. Generate a GitHub access token by going to https://github.com/settings/tokens/new. The access token should have the repo scope/permission. Once you have the token, assign it to an environment variable:
57+
58+
```
59+
# .env
60+
GH_TOKEN="{YOUR_TOKEN_HERE}"
61+
```
62+
63+
### Publish settings
64+
65+
Publish configuration in `electron-builder.yml` config file allows to set GitHub repository owner/name.
66+
67+
### Release workflow
68+
69+
- Draft a new release on GitHub. Create new tag version with the value of `version` in your application `package.json`, and prefix it with `v`. “Release title” can be anything you want.
70+
71+
For example, if your application `package.json` version is `1.0`, your draft’s tag version would be `v1.0`.
72+
73+
- Save draft release
74+
- Run `npm run electron:publish`, which will upload build artefacts to newly reated release.
75+
- Once you are done, publish the release. GitHub will tag the latest commit.

docs/gpg-check.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Verifying GPG signatures of MyTonWallet using macOS or Linux command line
2+
This can be used to verify the authenticity of MyTonWallet binaries/sources.
3+
4+
Download only from https://mytonwallet.app/get or https://github.com/mytonwalletorg/mytonwallet/releases and remember to check the gpg signature again every time you download a new version.
5+
6+
## Obtain public GPG key for Mytonwallet Dev
7+
In a terminal enter (or copy):
8+
9+
```shell
10+
gpg --keyserver keys.openpgp.org --recv-keys 9F14486135531F4127DF8CAD52978EAFD01FD271
11+
```
12+
13+
You should be able to substitute any public GPG keyserver if keys.openpgp.org is (temporarily) not working
14+
15+
## Download MyTonWallet and signature file (.asc)
16+
Download the `MyTonWallet-<platform>.dmg` (or `.exe` or `.AppImage` file). Download the signature file with the same name and extension `.asc`.
17+
18+
## Verify GPG signature
19+
Run the following command from the same directory you saved the files replacing <executable file> with the one actually downloaded:
20+
21+
```shell
22+
gpg --verify <executable file>.asc <executable file>
23+
```
24+
25+
The message should say:
26+
27+
```shell
28+
Good signature from "Mytonwallet Dev <[email protected]>"
29+
```
30+
31+
and
32+
33+
```shell
34+
Primary key fingerprint: 9F14 4861 3553 1F41 27DF 8CAD 5297 8EAF D01F D271
35+
```
36+
37+
You can ignore this:
38+
39+
```shell
40+
WARNING: This key is not certified with a trusted signature!
41+
gpg: There is no indication that the signature belongs to the owner.
42+
```
43+
44+
(It simply means you have not established a web of trust with other GPG users.)

0 commit comments

Comments
 (0)