Skip to content

Commit

Permalink
Merge branch 'develop' into fix-288
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan authored Jan 5, 2024
2 parents 12c6c7c + 1eea695 commit add3673
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 5 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
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: 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 @@ -138,6 +138,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 @@ -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
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 @@ -128,6 +128,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 comment on commit add3673

@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 7421983898

Please sign in to comment.