Skip to content

Commit 6bb7961

Browse files
authored
Merge pull request #1973 from nervosnetwork/hotfix/0.34.2
hotfix 0.34.2
2 parents dd6ffb1 + 6bbb9a5 commit 6bb7961

File tree

10 files changed

+52
-23
lines changed

10 files changed

+52
-23
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 0.34.2 (2020-12-31)
2+
3+
[CKB v0.35.1](https://github.com/nervosnetwork/ckb/releases/tag/v0.35.1) was released on Sept. 14th, 2020. This version of CKB node is now bundled and preconfigured in Neuron.
4+
5+
### Hotfix
6+
7+
* Update the CKB logo.
8+
* Rename the default network name to `Default`.
9+
* Fix version updater error when clicking the install button too soon.
10+
* Fix bug of `too many open files` error.
11+
12+
113
# 0.34.1 (2020-12-19)
214

315
[CKB v0.35.1](https://github.com/nervosnetwork/ckb/releases/tag/v0.35.1) was released on Sept. 14th, 2020. This version of CKB node is now bundled and preconfigured in Neuron.

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.34.1",
5+
"version": "0.34.2",
66
"npmClient": "yarn",
77
"useWorkspaces": true
88
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "neuron",
33
"productName": "Neuron",
44
"description": "CKB Neuron Wallet",
5-
"version": "0.34.1",
5+
"version": "0.34.2",
66
"private": true,
77
"author": {
88
"name": "Nervos Core Dev",

packages/neuron-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neuron-ui",
3-
"version": "0.34.1",
3+
"version": "0.34.2",
44
"private": true,
55
"author": {
66
"name": "Nervos Core Dev",

packages/neuron-ui/src/widgets/Icons/Nervos.svg

Lines changed: 9 additions & 10 deletions
Loading

packages/neuron-wallet/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"productName": "Neuron",
44
"description": "CKB Neuron Wallet",
55
"homepage": "https://www.nervos.org/",
6-
"version": "0.34.1",
6+
"version": "0.34.2",
77
"private": true,
88
"author": {
99
"name": "Nervos Core Dev",
@@ -85,7 +85,7 @@
8585
"electron-notarize": "0.2.1",
8686
"jest-when": "2.7.2",
8787
"lint-staged": "9.2.5",
88-
"neuron-ui": "0.34.1",
88+
"neuron-ui": "0.34.2",
8989
"rimraf": "3.0.0",
9090
"ttypescript": "1.5.10"
9191
}

packages/neuron-wallet/src/controllers/update.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ export default class UpdateController {
6464
})
6565

6666
autoUpdater.on('download-progress', progress => {
67-
this.notify(progress.percent / 100)
67+
const progressPercent = progress.percent / 100
68+
if (progressPercent !== 1) {
69+
this.notify(progressPercent)
70+
}
6871
})
6972

7073
autoUpdater.on('update-downloaded', () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const presetNetworks: { selected: string, networks: Network[] } = {
1414
networks: [
1515
{
1616
id: 'mainnet',
17-
name: 'Mainnet',
17+
name: 'Default',
1818
remote: 'http://localhost:8114',
1919
genesisHash: MAINNET_GENESIS_HASH,
2020
type: NetworkType.Default,

packages/neuron-wallet/src/services/sdk-core.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,29 @@ import CKB from '@nervosnetwork/ckb-sdk-core'
22
import https from 'https'
33
import http from 'http'
44

5+
let httpsAgent: https.Agent
6+
let httpAgent: http.Agent
7+
8+
const getHttpsAgent = () => {
9+
if (!httpsAgent) {
10+
httpsAgent = new https.Agent({ keepAlive: true })
11+
}
12+
return httpsAgent
13+
}
14+
15+
const getHttpAgent = () => {
16+
if (!httpAgent) {
17+
httpAgent = new http.Agent({ keepAlive: true })
18+
}
19+
return httpAgent
20+
}
21+
522
export const generateCKB = (url: string): CKB => {
623
const ckb = new CKB(url)
724
if (url.startsWith('https')) {
8-
const httpsAgent = new https.Agent({ keepAlive: true })
9-
ckb.rpc.setNode({ url, httpsAgent })
25+
ckb.rpc.setNode({ url, httpsAgent: getHttpsAgent() })
1026
} else {
11-
const httpAgent = new http.Agent({ keepAlive: true })
12-
ckb.rpc.setNode({ url, httpAgent })
27+
ckb.rpc.setNode({ url, httpAgent: getHttpAgent() })
1328
}
1429
return ckb
1530
}

packages/neuron-wallet/tests/services/networks.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ describe(`Unit tests of networks service`, () => {
150150
})
151151

152152
describe(`validation on network existence`, () => {
153-
it(`create network with existing name of Mainnet`, () => {
154-
expect(service.create('Mainnet', 'http://localhost:8114')).rejects.toThrowError(t(ERROR_MESSAGE.NAME_USED))
153+
it(`create network with existing name of Default`, () => {
154+
expect(service.create('Default', 'http://localhost:8114')).rejects.toThrowError(t(ERROR_MESSAGE.NAME_USED))
155155
})
156156

157157
it(`update network which is not existing`, () => {

0 commit comments

Comments
 (0)