Skip to content

Commit 345bc67

Browse files
authored
Merge pull request #1404 from crypto-com/dev
Internal Release v1.4.7
2 parents 7a029dc + 2648def commit 345bc67

File tree

5 files changed

+87
-48
lines changed

5 files changed

+87
-48
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ jobs:
4141
# Log in to Snap Store
4242
snapcraft_token: ${{ secrets.snapcraft_token }}
4343

44-
- name: Install AzureSignTool
45-
# Only install Azure Sign Tool on Windows
46-
if: startsWith(matrix.os, 'windows')
47-
run: dotnet tool install --global AzureSignTool
44+
# - name: Install AzureSignTool
45+
# # Only install Azure Sign Tool on Windows
46+
# if: startsWith(matrix.os, 'windows')
47+
# run: dotnet tool install --global AzureSignTool
4848

4949
- name: Extract current branch name
5050
shell: bash
@@ -76,7 +76,7 @@ jobs:
7676
7777
- name: Build/release Electron app (MacOS, Ubuntu, Windows)
7878
uses: samuelmeuli/action-electron-builder@v1
79-
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
79+
# if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
8080
with:
8181

8282
build_script_name: electron:pre-build
@@ -96,43 +96,43 @@ jobs:
9696
API_KEY_ID: ${{ secrets.mac_api_key_id }}
9797
API_KEY_ISSUER_ID: ${{ secrets.mac_api_key_issuer_id }}
9898

99-
- name: Build Electron app (Windows)
100-
if: startsWith(matrix.os, 'windows')
101-
run: |
102-
yarn run electron:build
103-
104-
- name: Sign built binary (Windows)
105-
if: startsWith(matrix.os, 'windows')
106-
# Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
107-
# If the file has the .exe extension, then it will use the AzureSignTool command to sign it.
108-
run: |
109-
cd dist; Get-ChildItem -recurse -Include **.exe | ForEach-Object {
110-
$exePath = $_.FullName
111-
& AzureSignTool sign -kvu "${{ secrets.azure_key_vault_url }}" -kvi "${{ secrets.azure_key_vault_client_id }}" -kvt "${{ secrets.azure_key_vault_tenant_id }}" -kvs "${{ secrets.azure_key_vault_client_secret }}" -kvc "${{ secrets.azure_key_vault_name }}" -tr http://timestamp.digicert.com -v $exePath
112-
}; cd ..
113-
114-
- name: Cleanup artifacts (Windows)
115-
if: startsWith(matrix.os, 'windows')
116-
run: |
117-
mkdir dist/temp; Move-Item -Path dist/*.exe, dist/*.blockmap, dist/latest.yml -Destination dist/temp
118-
npx rimraf "dist/!(temp)"
119-
npx rimraf "dist/.icon-ico"
120-
mv dist/temp/* dist
121-
npx rimraf "dist/temp"
122-
123-
- name: Upload artifacts (Windows)
124-
uses: actions/upload-artifact@v2
125-
if: startsWith(matrix.os, 'windows')
126-
with:
127-
name: ${{ matrix.os }}
128-
path: dist
129-
130-
- name: Release Electron app (Windows)
131-
uses: softprops/action-gh-release@v1
132-
if: startsWith(matrix.os, 'windows')
133-
with:
134-
draft: true
135-
tag_name: v${{ steps.package_json.outputs.version }}
136-
files: "dist/**"
137-
env:
138-
GITHUB_TOKEN: ${{ secrets.github_token }}
99+
# - name: Build Electron app (Windows)
100+
# if: startsWith(matrix.os, 'windows')
101+
# run: |
102+
# yarn run electron:build
103+
104+
# - name: Sign built binary (Windows)
105+
# if: startsWith(matrix.os, 'windows')
106+
# # Instead of pointing to a specific .exe, uses a PowerShell script which iterates through all the files stored in dist folder.
107+
# # If the file has the .exe extension, then it will use the AzureSignTool command to sign it.
108+
# run: |
109+
# cd dist; Get-ChildItem -recurse -Include **.exe | ForEach-Object {
110+
# $exePath = $_.FullName
111+
# & AzureSignTool sign -kvu "${{ secrets.azure_key_vault_url }}" -kvi "${{ secrets.azure_key_vault_client_id }}" -kvt "${{ secrets.azure_key_vault_tenant_id }}" -kvs "${{ secrets.azure_key_vault_client_secret }}" -kvc "${{ secrets.azure_key_vault_name }}" -tr http://timestamp.digicert.com -v $exePath
112+
# }; cd ..
113+
114+
# - name: Cleanup artifacts (Windows)
115+
# if: startsWith(matrix.os, 'windows')
116+
# run: |
117+
# mkdir dist/temp; Move-Item -Path dist/*.exe, dist/*.blockmap, dist/latest.yml -Destination dist/temp
118+
# npx rimraf "dist/!(temp)"
119+
# npx rimraf "dist/.icon-ico"
120+
# mv dist/temp/* dist
121+
# npx rimraf "dist/temp"
122+
123+
# - name: Upload artifacts (Windows)
124+
# uses: actions/upload-artifact@v2
125+
# if: startsWith(matrix.os, 'windows')
126+
# with:
127+
# name: ${{ matrix.os }}
128+
# path: dist
129+
130+
# - name: Release Electron app (Windows)
131+
# uses: softprops/action-gh-release@v1
132+
# if: startsWith(matrix.os, 'windows')
133+
# with:
134+
# draft: true
135+
# tag_name: v${{ steps.package_json.outputs.version }}
136+
# files: "dist/**"
137+
# env:
138+
# GITHUB_TOKEN: ${{ secrets.github_token }}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
55
*Unreleased*
66

77
*Released*
8+
## [v1.4.7] - 2024-01-16
9+
### Additions
10+
- Security enhancement on DApp Browser
811
## [v1.4.6] - 2023-12-04
912
### Additions
1013
- Adapt to Christmas Theme

electron/main.ts

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function createWindow() {
160160

161161
// DevTools
162162
installExtension(REACT_DEVELOPER_TOOLS)
163-
.then(name => console.log(`Added Extension: ${name}`))
163+
.then()
164164
.catch(err => console.log('An error occurred: ', err));
165165

166166
if (isDev) {
@@ -197,14 +197,50 @@ app.on('ready', async function () {
197197
});
198198

199199
app.on('web-contents-created', (event, contents) => {
200+
201+
if (contents.getType() == 'window') {
202+
contents.on('will-navigate', (event, url) => {
203+
if (!isValidURL(url)) {
204+
event.preventDefault();
205+
return;
206+
}
207+
})
208+
}
209+
200210
if (contents.getType() == 'webview') {
211+
// blocks any new windows from being opened
212+
contents.setWindowOpenHandler((detail) => {
213+
214+
if (isValidURL(detail.url)) {
215+
return {action: 'allow'};
216+
}
217+
218+
console.log('open url reject, not valid', detail.url);
219+
return {action: 'deny'};
220+
})
221+
222+
// new-window api deprecated, but still working for now
223+
contents.on('new-window', (event, url, frameName, disposition, options) => {
224+
options.webPreferences = {
225+
...options.webPreferences,
226+
javascript: false,
227+
};
228+
229+
if (!isValidURL(url)) {
230+
event.preventDefault();
231+
return;
232+
}
233+
234+
require('electron').shell.openExternal(url);
235+
})
236+
201237
contents.on('will-navigate', (event, url) => {
202238
if (!isValidURL(url)) {
203239
event.preventDefault();
204240
}
205241
})
206242

207-
// bolcks 301/302 redirect if the url is not valid
243+
// blocks 301/302 redirect if the url is not valid
208244
contents.on('will-redirect', (event, url) => {
209245
if (!isValidURL(url)) {
210246
event.preventDefault();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "chain-desktop-wallet",
3-
"version": "1.4.6",
3+
"version": "1.4.7",
44
"description": "Crypto.com DeFi Desktop Wallet App",
55
"repository": "github:crypto-com/chain-desktop-wallet",
66
"author": "Crypto.com <contact@crypto.com>",

public/icon.png

-19 KB
Loading

0 commit comments

Comments
 (0)