Skip to content

Commit dae9980

Browse files
committed
Merge branch 'develop' into dependabot/npm_and_yarn/packages/neuron-ui/canvg-4.0.3
2 parents 2438afd + 38cca1d commit dae9980

File tree

7 files changed

+52
-64
lines changed

7 files changed

+52
-64
lines changed

.github/workflows/check-code-style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Changed Files
3333
id: changed-files
34-
uses: tj-actions/changed-files@v44
34+
uses: tj-actions/changed-files@v46
3535
with:
3636
files: "packages/**/*.{js,cjs,mjs,jsx,ts,tsx,css,scss}"
3737

packages/neuron-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"storybook": "8.6.4",
109109
"storybook-addon-react-router-v6": "2.0.10",
110110
"terser": "5.39.0",
111-
"vite": "6.2.1",
111+
"vite": "6.2.4",
112112
"vite-plugin-commonjs": "0.10.4",
113113
"vite-plugin-eslint": "1.8.1",
114114
"vite-plugin-node-polyfills": "0.23.0",

packages/neuron-ui/src/containers/Navbar/index.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ const Navbar = () => {
116116
}, [i18n.language])
117117

118118
useEffect(() => {
119+
if (verifyCkbResult && !verifyCkbResult.withIndexer) {
120+
showGlobalAlertDialog({
121+
type: 'warning',
122+
message: t('navbar.ckb-without-indexer'),
123+
action: 'ok',
124+
})(dispatch)
125+
return
126+
}
127+
119128
// isUpdated is true or version is not empty means check update has return
120129
if (!verifyCkbResult || (isUpdated !== true && !version)) {
121130
return
@@ -142,12 +151,6 @@ const Navbar = () => {
142151
),
143152
action: 'ok',
144153
})(dispatch)
145-
} else if (!verifyCkbResult.withIndexer) {
146-
showGlobalAlertDialog({
147-
type: 'warning',
148-
message: t('navbar.ckb-without-indexer'),
149-
action: 'ok',
150-
})(dispatch)
151154
}
152155
}, [verifyCkbResult, version, isUpdated])
153156

packages/neuron-wallet/src/block-sync-renderer/sync/full-synchronizer.ts

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,23 @@ export default class FullSynchronizer extends Synchronizer {
2626
}
2727

2828
private async initSync() {
29-
await this.processNextBlockNumber()
29+
try {
30+
await this.processNextBlockNumber()
3031

31-
while (this.pollingIndexer) {
32-
const indexerTipBlock = await this.indexer.tip()
33-
await this.synchronize(indexerTipBlock)
34-
await CommonUtils.sleep(5000)
32+
while (this.pollingIndexer) {
33+
const indexerTipBlock = await this.indexer.tip()
34+
await this.synchronize(indexerTipBlock)
35+
await CommonUtils.sleep(5000)
36+
}
37+
} catch (error) {
38+
logger.error(`Error connecting to Indexer: ${error.message}`)
3539
}
3640
}
3741

3842
public async connect() {
39-
try {
40-
this.pollingIndexer = true
43+
this.pollingIndexer = true
4144

42-
this.initSync()
43-
} catch (error) {
44-
logger.error(`Error connecting to Indexer: ${error.message}`)
45-
throw error
46-
}
45+
this.initSync()
4746
}
4847

4948
async processTxsInNextBlockNumber() {

packages/neuron-wallet/src/block-sync-renderer/sync/light-synchronizer.ts

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,18 @@ export default class LightSynchronizer extends Synchronizer {
280280
}
281281

282282
private async initSync(syncMultisig?: boolean) {
283-
if (syncMultisig) {
284-
await this.initMultisigSyncProgress()
285-
} else {
286-
await this.initSyncProgress()
287-
}
288-
while (this.pollingIndexer) {
289-
await this.synchronize()
290-
await scheduler.wait(5000)
283+
try {
284+
if (syncMultisig) {
285+
await this.initMultisigSyncProgress()
286+
} else {
287+
await this.initSyncProgress()
288+
}
289+
while (this.pollingIndexer) {
290+
await this.synchronize()
291+
await scheduler.wait(5000)
292+
}
293+
} catch (error) {
294+
logger.error(`Error connecting to Light: ${error.message}`)
291295
}
292296
}
293297

@@ -324,15 +328,10 @@ export default class LightSynchronizer extends Synchronizer {
324328
}
325329

326330
public async connect(syncMultisig?: boolean) {
327-
try {
328-
logger.info('LightConnector:\tconnect ...:')
329-
this.pollingIndexer = true
330-
this.syncMultisig = syncMultisig
331-
this.initSync(syncMultisig)
332-
} catch (error) {
333-
logger.error(`Error connecting to Light: ${error.message}`)
334-
throw error
335-
}
331+
logger.info('LightConnector:\tconnect ...:')
332+
this.pollingIndexer = true
333+
this.syncMultisig = syncMultisig
334+
this.initSync(syncMultisig)
336335
}
337336

338337
private async checkTxExist(txHashes: string[]) {

packages/neuron-wallet/src/services/node.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ class NodeService {
280280
const network = NetworksService.getInstance().getCurrent()
281281
try {
282282
const res = await rpcRequest<{ error?: { code: number } }>(network.remote, { method: 'get_indexer_tip' })
283-
if (res.error?.code === START_WITHOUT_INDEXER) {
283+
284+
if (res.error?.code === START_WITHOUT_INDEXER || (Array.isArray(res) && res.length === 0)) {
284285
logger.info('Node:\tthe ckb node does not start with --indexer')
285286
return false
286287
}

yarn.lock

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,24 +1351,10 @@
13511351
"@babel/plugin-transform-modules-commonjs" "^7.23.3"
13521352
"@babel/plugin-transform-typescript" "^7.23.3"
13531353

1354-
"@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.7":
1355-
version "7.22.5"
1356-
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.5.tgz#8564dd588182ce0047d55d7a75e93921107b57ec"
1357-
integrity sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==
1358-
dependencies:
1359-
regenerator-runtime "^0.13.11"
1360-
1361-
"@babel/runtime@^7.23.2":
1362-
version "7.23.6"
1363-
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.6.tgz#c05e610dc228855dc92ef1b53d07389ed8ab521d"
1364-
integrity sha512-zHd0eUrf5GZoOWVCXp6koAKQTfZV07eit6bGPmJgnZdnSAvvZee6zniW2XMF7Cmc4ISOOnPy3QaSiIJGJkVEDQ==
1365-
dependencies:
1366-
regenerator-runtime "^0.14.0"
1367-
1368-
"@babel/runtime@^7.25.0", "@babel/runtime@^7.8.4":
1369-
version "7.26.9"
1370-
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.9.tgz#aa4c6facc65b9cb3f87d75125ffd47781b475433"
1371-
integrity sha512-aA63XwOkcl4xxQa3HjPMqOP6LiK0ZDv3mUPYEFXkpHbaFjtGggE1A61FjFzJnB+p7/oy2gA8E+rcBNl/zC1tMg==
1354+
"@babel/runtime@^7.12.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.17.8", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.25.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7":
1355+
version "7.27.0"
1356+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.0.tgz#fbee7cf97c709518ecc1f590984481d5460d4762"
1357+
integrity sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw==
13721358
dependencies:
13731359
regenerator-runtime "^0.14.0"
13741360

@@ -14190,7 +14176,7 @@ regenerate@^1.4.2:
1419014176
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
1419114177
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
1419214178

14193-
regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.7:
14179+
regenerator-runtime@^0.13.7:
1419414180
version "0.13.11"
1419514181
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
1419614182
integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==
@@ -15477,9 +15463,9 @@ symbol-tree@^3.2.4:
1547715463
integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==
1547815464

1547915465
tar-fs@^2.0.0:
15480-
version "2.1.1"
15481-
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784"
15482-
integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==
15466+
version "2.1.2"
15467+
resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.2.tgz#425f154f3404cb16cb8ff6e671d45ab2ed9596c5"
15468+
integrity sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==
1548315469
dependencies:
1548415470
chownr "^1.1.1"
1548515471
mkdirp-classic "^0.5.2"
@@ -16340,10 +16326,10 @@ vite-plugin-svgr@4.3.0:
1634016326
"@svgr/core" "^8.1.0"
1634116327
"@svgr/plugin-jsx" "^8.1.0"
1634216328

16343-
vite@6.2.1, "vite@^5.0.0 || ^6.0.0":
16344-
version "6.2.1"
16345-
resolved "https://registry.yarnpkg.com/vite/-/vite-6.2.1.tgz#ae865d4bb93a11844be1bc647c8b2dd1856ea180"
16346-
integrity sha512-n2GnqDb6XPhlt9B8olZPrgMD/es/Nd1RdChF6CBD/fHW6pUyUTt2sQW2fPRX5GiD9XEa6+8A6A4f2vT6pSsE7Q==
16329+
vite@6.2.4, "vite@^5.0.0 || ^6.0.0":
16330+
version "6.2.4"
16331+
resolved "https://registry.yarnpkg.com/vite/-/vite-6.2.4.tgz#05809de3f918fded87f73a838761995a4d66a680"
16332+
integrity sha512-veHMSew8CcRzhL5o8ONjy8gkfmFJAd5Ac16oxBUjlwgX3Gq2Wqr+qNC3TjPIpy7TPV/KporLga5GT9HqdrCizw==
1634716333
dependencies:
1634816334
esbuild "^0.25.0"
1634916335
postcss "^8.5.3"

0 commit comments

Comments
 (0)