Skip to content

Commit 0e7e45d

Browse files
v1.14.2
1 parent 85d182d commit 0e7e45d

File tree

404 files changed

+27152
-52509
lines changed

Some content is hidden

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

404 files changed

+27152
-52509
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
NODE_ENV=development
22

33
TONHTTPAPI_MAINNET_URL=https://tonhttpapi.mytonwallet.org/jsonRPC
4+
TONHTTPAPI_MAINNET_API_KEY=
45
TONHTTPAPI_TESTNET_URL=https://tonhttpapi-testnet.mytonwallet.org/jsonRPC
6+
TONHTTPAPI_TESTNET_API_KEY=
57
TONAPIIO_MAINNET_URL=https://tonapiio.mytonwallet.org
68
TONAPIIO_TESTNET_URL=https://tonapiio-testnet.mytonwallet.org
79
BRILLIANT_API_BASE_URL=

.eslintignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
dev
2+
public
23

34
src/lib/rlottie/rlottie-wasm.js
4-
5-
webpack.config.js
65
jest.config.js
76
playwright.config.ts
87
postcss.config.js
98

109
coverage
10+
11+
trash
12+
13+
dist

.eslintrc

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
"jsx-expressions",
1010
"no-async-without-await",
1111
"teactn",
12-
"no-null"
12+
"no-null",
13+
"simple-import-sort",
14+
"react-hooks-static-deps"
1315
],
1416
"rules": {
1517
"indent": [
@@ -34,10 +36,24 @@
3436
"no-console": "error",
3537
"semi": "error",
3638
"no-implicit-coercion": "error",
37-
"react-hooks/exhaustive-deps": [
39+
"react-hooks/exhaustive-deps": "off",
40+
"react-hooks-static-deps/exhaustive-deps": [
3841
"error",
3942
{
40-
"additionalHooks": "(useSyncEffect|useAsync|useDebouncedCallback|useThrottledCallback|useEffectWithPrevDeps|useLayoutEffectWithPrevDeps|useDerivedState|useDerivedSignal|useThrottledResolver|useDebouncedResolver)$"
43+
"additionalHooks": "(useSyncEffect|useAsync|useDebouncedCallback|useThrottledCallback|useEffectWithPrevDeps|useLayoutEffectWithPrevDeps|useDerivedState|useDerivedSignal|useThrottledResolver|useDebouncedResolver)$",
44+
"staticHooks": {
45+
"getActions": true,
46+
"useFlag": [
47+
false,
48+
true,
49+
true
50+
],
51+
"useForceUpdate": true,
52+
"useReducer": [
53+
false,
54+
true
55+
]
56+
}
4157
}
4258
],
4359
"arrow-body-style": "off",
@@ -76,6 +92,7 @@
7692
"import/prefer-default-export": "off",
7793
"import/named": "off",
7894
"import/no-webpack-loader-syntax": "off",
95+
"import/extensions": "off",
7996
"react/prop-types": "off",
8097
"react/jsx-one-expression-per-line": "off",
8198
"react/button-has-type": "off",
@@ -120,7 +137,57 @@
120137
"error",
121138
"in-try-catch"
122139
],
123-
"teactn/prefer-separate-component-file": "off"
140+
"teactn/prefer-separate-component-file": "off",
141+
"@typescript-eslint/consistent-type-imports": [
142+
"error",
143+
{
144+
"prefer": "type-imports",
145+
"disallowTypeAnnotations": false
146+
}
147+
],
148+
"simple-import-sort/imports": [
149+
"error",
150+
{
151+
"groups": [
152+
[
153+
"^react",
154+
"^ton",
155+
"^tonweb(/.*|$)",
156+
"^@?\\w",
157+
"dist(/.*|$)",
158+
"^(\\.+/)+(lib)(/.*|$)"
159+
],
160+
[
161+
"^(\\.+/|\\w+/)+(types)(/.*|$)",
162+
"^(\\.+/|\\w+/)+(types)\\u0000"
163+
],
164+
[
165+
"^(\\.+/)+config",
166+
"^(\\.+/)+(global)(/.*|$)",
167+
"^(\\.+/)+(util)(/.*|$)",
168+
"^(\\.+/)+(contracts)(/.*|$)",
169+
"^(\\.+/)+(ui)/[a-z](([a-z]+[A-Z]?)*)",
170+
"^\\.\\.(?!/?$)",
171+
"^\\.\\./?$",
172+
"^\\./(?=.*/)(?!/?$)",
173+
"^\\.(?!/?$)",
174+
"^\\./?$"
175+
],
176+
[
177+
"^(\\.+/)+(hooks)(/.*|$)"
178+
],
179+
[
180+
"\/[A-Z](([a-z]+[A-Z]?)*)"
181+
],
182+
[
183+
"^.+\\.s?css$"
184+
],
185+
[
186+
"^(\\.+/)+(assets)(/.*|$)"
187+
]
188+
]
189+
}
190+
]
124191
},
125192
"settings": {
126193
"import/resolver": "webpack"

.fantasticonrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
inputDir: './src/assets/icons',
2+
inputDir: './src/assets/font-icons',
33
outputDir: './src/styles',
44
name: 'brilliant-icons',
55
fontTypes: ['woff', 'woff2'],

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
dist
3+
dist-electron
34
MyTonWallet.zip
45
.cache
56
.env*
@@ -13,3 +14,4 @@ test-results
1314
trash/
1415
coverage/
1516
src/i18n/en.json
17+
notarization-error.log

.prettierrc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"tabWidth": 2,
3+
"printWidth": 120,
4+
"singleQuote": true,
5+
"arrowParens": "always",
6+
"trailingComma": "all",
7+
8+
"overrides": [
9+
{
10+
"files": ["*.json"],
11+
"options": {
12+
"parser": "json",
13+
"singleQuote": false
14+
}
15+
},
16+
{
17+
"files": ["*.yml"],
18+
"options": {
19+
"parser": "yml",
20+
"singleQuote": false
21+
}
22+
},
23+
{
24+
"files": ["*.css"],
25+
"options": {
26+
"parser": "css",
27+
"singleQuote": false
28+
}
29+
},
30+
{
31+
"files": ["*.scss"],
32+
"options": {
33+
"parser": "scss",
34+
"singleQuote": false
35+
}
36+
}
37+
]
38+
}

.stylelintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"selector-attribute-quotes": "always",
2121
"scss/operator-no-unspaced": null,
2222
"no-descending-specificity": null,
23+
"color-hex-case": "upper",
2324
"selector-pseudo-class-no-unknown": [
2425
true,
2526
{

README.md

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@
44

55
<img src="https://user-images.githubusercontent.com/102837730/193835310-1436afcd-ed78-4656-92c3-9c8f4beacacf.png" width="600" />
66

7-
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.
7+
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.
8+
9+
## Requirements
10+
11+
Ready to build on **macOS** and **Linux**.
12+
13+
To build on **Windows**, you will also need:
14+
15+
- Any terminal emulator with bash (Git Bash, MinGW, Cygwin)
16+
- A zip utility (for several commands)
817

918
## Local Setup
1019

@@ -20,6 +29,82 @@ npm i
2029
npm run dev
2130
```
2231

32+
## Electron
33+
34+
Electron allows to build native application, that can be installed and run on Windows, macOS and Linux.
35+
36+
#### NPM scripts
37+
38+
- `npm run electron:dev`
39+
40+
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).
41+
42+
- `npm run electron:webpack`
43+
44+
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.
45+
46+
- `npm run electron:build`
47+
48+
Prepare renderer (FE code) build, compile Electron main process code, install and build native dependencies, is used before packaging or publishing.
49+
50+
- `npm run electron:package:staging`
51+
52+
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.
53+
54+
- `npm run electron:package:production`
55+
56+
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.
57+
58+
- `npm run electron:publish`
59+
60+
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.
61+
62+
#### Code signing on MacOS
63+
64+
To sign the code of your application, follow these steps:
65+
66+
- Install certificates to `login` folder of your Keychain.
67+
- Download and install `Developer ID - G2` certificate from the [Apple PKI](https://www.apple.com/certificateauthority/) page.
68+
- 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.
69+
- A valid and appropriate identity from your keychain will be automatically used when you publish your application.
70+
71+
More info in the [official documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing).
72+
73+
#### Notarize on MacOS
74+
75+
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.
76+
77+
How to obtain app-specific password:
78+
79+
- Sign in to [appleid.apple.com](appleid.apple.com).
80+
- In the "Sign-In and Security" section, select "App-Specific Passwords".
81+
- Select "Generate an app-specific password" or select the Add button, then follow the steps on your screen.
82+
83+
#### GitHub release
84+
85+
##### GitHub access token
86+
87+
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:
88+
89+
```
90+
# .env
91+
GH_TOKEN="{YOUR_TOKEN_HERE}"
92+
```
93+
94+
##### Publish settings
95+
96+
Publish configuration in `electron-builder.yml` config file allows to set GitHub repository owner/name.
97+
98+
##### Release workflow
99+
100+
- 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.
101+
102+
For example, if your application `package.json` version is `1.0`, your draft’s tag version would be `v1.0`.
103+
104+
- Save draft release
105+
- Run `npm run electron:publish`, which will upload build artefacts to newly reated release.
106+
- Once you are done, publish the release. GitHub will tag the latest commit.
107+
23108
## Support Us
24109

25110
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!

dev/panel.html

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5+
<title>Sliding panel animation experiments</title>
6+
<style>
7+
.panel {
8+
position: fixed;
9+
bottom: 0;
10+
left: 0;
11+
right: 0;
12+
height: 68%; /* Set to desired closed height */
13+
background-color: #ccc; /* Grey background */
14+
border-radius: 15px 15px 0 0; /* Rounded corners at the top */
15+
transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.2, 1); /* Adjust speed as needed */
16+
overflow: hidden;
17+
z-index: 10; /* Ensure panel is above backdrop */
18+
will-change: transform; /* New line to hint the browser that transform will be animated */
19+
}
20+
21+
.panel.closed {
22+
transform: translateY(100%);
23+
}
24+
25+
.panel.open {
26+
transform: translateY(0%);
27+
}
28+
29+
.panel-content {
30+
padding: 20px;
31+
/* Add more styles for your content here */
32+
}
33+
34+
/* Backdrop styles */
35+
.backdrop {
36+
position: fixed;
37+
top: 0;
38+
left: 0;
39+
width: 100%;
40+
height: 100%;
41+
background-color: rgba(0, 0, 0, 0); /* Fully transparent black */
42+
transition: opacity 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
43+
z-index: 5; /* Ensure backdrop is below panel */
44+
opacity: 0;
45+
will-change: opacity; /* New line to hint the browser that opacity will be animated */
46+
}
47+
48+
.backdrop.show {
49+
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
50+
opacity: 1;
51+
}
52+
</style>
53+
</head>
54+
<body>
55+
<div id="panel" class="panel closed">
56+
<div class="panel-content">
57+
<!-- Add your content here -->
58+
<p>Some content...</p>
59+
</div>
60+
</div>
61+
62+
<!-- Backdrop div -->
63+
<!--<div id="backdrop" class="backdrop"></div>-->
64+
65+
<script>
66+
document.addEventListener('click', togglePanel);
67+
68+
// Close panel when backdrop is clicked
69+
// document.getElementById('backdrop').addEventListener('click', togglePanel);
70+
71+
function togglePanel() {
72+
const panel = document.getElementById('panel');
73+
// const backdrop = document.getElementById('backdrop');
74+
if (panel.classList.contains('open')) {
75+
panel.classList.remove('open');
76+
panel.classList.add('closed');
77+
// backdrop.classList.remove('show');
78+
} else {
79+
panel.classList.remove('closed');
80+
panel.classList.add('open');
81+
// backdrop.classList.add('show');
82+
}
83+
}
84+
</script>
85+
</body>
86+
</html>

0 commit comments

Comments
 (0)