Skip to content

Commit

Permalink
Merge branch 'alpha/skip-unidentified-inputs' into for-polycrypt-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Jan 9, 2024
2 parents 784aa0b + a8d4660 commit 8881dcb
Show file tree
Hide file tree
Showing 15 changed files with 958 additions and 702 deletions.
2 changes: 1 addition & 1 deletion .ckb-light-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.3
v0.3.4
2 changes: 1 addition & 1 deletion .github/workflows/check-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Changed Files
id: changed-files
uses: tj-actions/changed-files@v37
uses: tj-actions/changed-files@v41
with:
files: "packages/**/*.{js,cjs,mjs,jsx,ts,tsx,css,scss}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_checksums.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
body="${body//$'\r'/'%0D'}"
echo "body=$body" >> $GITHUB_OUTPUT
- uses: peter-evans/commit-comment@v2
- uses: peter-evans/commit-comment@v3
with:
body: ${{ steps.comment_body.outputs.body }}

6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -69,4 +69,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
steps:
- name: Comment by push event
if: ${{ github.event_name == 'push' }}
uses: peter-evans/commit-comment@v2
uses: peter-evans/commit-comment@v3
with:
body: |
Packaging for test is done in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
"devDependencies": {
"@babel/core": "7.23.6",
"@types/jest": "27.5.2",
"@types/node": "18.19.3",
"@types/npmlog": "4.1.6",
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"@types/node": "20.10.5",
"@types/npmlog": "7.0.0",
"@typescript-eslint/eslint-plugin": "6.16.0",
"@typescript-eslint/parser": "6.16.0",
"concurrently": "8.2.2",
"cross-env": "7.0.3",
"eslint": "8.56.0",
"eslint-config-prettier": "8.10.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "4.2.1",
"husky": "8.0.3",
"lerna": "7.4.2",
"lint-staged": "13.3.0",
"lerna": "8.0.1",
"lint-staged": "15.2.0",
"ncp": "2.0.0",
"prettier": "2.8.8",
"ts-jest": "29.1.1",
Expand All @@ -67,6 +67,6 @@
"react-i18next": ">=11.16.4"
},
"volta": {
"node": "18.19.0"
"node": "20.10.0"
}
}
10 changes: 5 additions & 5 deletions packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "13.5.0",
"react-router-dom": "6.21.0",
"react-router-dom": "6.21.1",
"react-transition-group": "4.4.5",
"sass": "1.69.5",
"tslib": "2.6.2"
Expand All @@ -83,14 +83,14 @@
"@storybook/testing-library": "0.2.2",
"@types/enzyme": "3.10.18",
"@types/enzyme-adapter-react-16": "1.0.9",
"@types/node": "18.19.3",
"@types/node": "20.10.5",
"@types/react": "18.2.45",
"@types/react-dom": "18.2.18",
"@types/react-router-dom": "5.3.3",
"@types/styled-components": "5.1.34",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"babel-jest": "25.5.1",
"electron": "24.8.8",
"electron": "28.1.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.7",
"eslint-config-airbnb": "19.0.4",
Expand All @@ -102,10 +102,10 @@
"react-scripts": "5.0.1",
"react-test-renderer": "18.2.0",
"storybook": "7.6.6",
"storybook-addon-react-router-v6": "1.0.2",
"storybook-addon-react-router-v6": "2.0.10",
"webpack": "5.89.0"
},
"resolutions": {
"react-i18next": "12.3.1"
"react-i18next": "14.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/neuron-ui/src/services/subjects.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CONSTANTS } from 'utils'
import { ipcRenderer } from 'electron'
import { ipcRenderer, type IpcRendererEvent } from 'electron'

const { LOCALES } = CONSTANTS

Expand Down Expand Up @@ -37,7 +37,7 @@ const SubjectConstructor = <T>(
return ipcRenderer
? {
subscribe: (handler: (data: T) => void) => {
const handlerWrap = (_e: Event, data: T) => {
const handlerWrap = (_e: IpcRendererEvent, data: T) => {
handler(data)
}
ipcRenderer.on(channel, handlerWrap)
Expand Down
4 changes: 1 addition & 3 deletions packages/neuron-ui/src/widgets/AlertDialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const AlertDialog = ({
title,
message,
type,
onClose,
onOk,
onCancel,
action,
Expand All @@ -24,14 +23,13 @@ const AlertDialog = ({
title?: string
message?: string
type: AlertType
onClose?: () => void
onOk?: () => void
onCancel?: () => void
action?: Action
}) => {
const [t] = useTranslation()
const dialogRef = useRef<HTMLDialogElement | null>(null)
useDialog({ show, dialogRef, onClose: onClose || (() => {}) })
useDialog({ show, dialogRef, onClose: onCancel || (() => {}) })
const actions = useMemo<('cancel' | 'ok')[]>(() => {
if (action) {
return action === 'all' ? ['cancel', 'ok'] : [action]
Expand Down
8 changes: 4 additions & 4 deletions packages/neuron-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"@iarna/toml": "2.2.5",
"@ledgerhq/hw-transport-node-hid": "6.27.22",
"@spore-sdk/core": "0.1.0-beta.9",
"archiver": "5.3.2",
"archiver": "6.0.1",
"async": "3.2.5",
"bn.js": "4.12.0",
"chalk": "3.0.0",
Expand All @@ -80,7 +80,7 @@
"devDependencies": {
"@electron/notarize": "2.2.0",
"@nervosnetwork/ckb-types": "0.109.0",
"@types/archiver": "3.1.1",
"@types/archiver": "6.0.2",
"@types/async": "3.2.24",
"@types/electron-devtools-installer": "2.2.5",
"@types/elliptic": "6.4.18",
Expand All @@ -93,9 +93,9 @@
"@types/sqlite3": "3.1.11",
"@types/uuid": "8.3.4",
"devtron": "1.4.0",
"electron": "24.8.8",
"electron": "28.1.0",
"electron-build-env": "0.2.0",
"electron-builder": "23.6.0",
"electron-builder": "24.9.1",
"electron-devtools-installer": "3.2.0",
"jest-when": "3.6.0",
"neuron-ui": "0.112.0",
Expand Down
8 changes: 7 additions & 1 deletion packages/neuron-wallet/src/controllers/update.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { autoUpdater, UpdateInfo, CancellationToken, ProgressInfo } from 'electron-updater'
import { t } from 'i18next'
import AppUpdaterSubject, { AppUpdater } from '../models/subjects/app-updater'
import logger from '../utils/logger'

Expand Down Expand Up @@ -64,11 +65,16 @@ export default class UpdateController {

autoUpdater.on('error', error => {
UpdateController.isChecking = false
let errorMsg = error == null ? 'unknown' : (error.stack || error).toString()
logger.error('Update Controller:\t autoUpdater fail:', errorMsg)
if (errorMsg.includes('net::ERR_INTERNET_DISCONNECTED') || errorMsg.includes('net::ERR_TIMED_OUT')) {
errorMsg = t('messages.could-not-connect-service')
}
this.notify({
version: '',
releaseDate: '',
releaseNotes: '',
errorMsg: error == null ? 'unknown' : (error.stack || error).toString(),
errorMsg,
})
})

Expand Down
1 change: 1 addition & 0 deletions packages/neuron-wallet/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default {
'no-exist-ckb-node-data':
'{{path}} has no CKB Node config and storage, press confirm to synchronize from scratch',
'light-client-sudt-acp-error': "Light client mode doesn't support sending assets to other's asset account",
'could-not-connect-service': 'Could not connect to the service, please try again later.',
},
messageBox: {
button: {
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-wallet/src/locales/zh-tw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export default {
'target-lock-error': 'CKB 資產只能轉賬到 secp256k1 或者 acp 地址',
'no-exist-ckb-node-data': '{{path}} 目錄下沒有找到 CKB Node 配置和數據, 點擊確認重新同步',
'light-client-sudt-acp-error': '輕節點模式不支持發送資產給其他用戶的資產賬戶',
'could-not-connect-service': '無法連接到服務,請稍後再試。',
},
messageBox: {
button: {
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-wallet/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export default {
'target-lock-error': 'CKB 资产只能转账到 secp256k1 或者 acp 地址',
'no-exist-ckb-node-data': '{{path}} 目录下没有找到 CKB Node 配置和数据, 点击确认重新同步',
'light-client-sudt-acp-error': '轻节点模式不支持发送资产给其他用户的资产账户',
'could-not-connect-service': '无法连接到服务,请稍后再试。',
},
messageBox: {
button: {
Expand Down
Loading

1 comment on commit 8881dcb

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 7462805887

Please sign in to comment.