diff --git a/CHANGELOG.md b/CHANGELOG.md index c6dc41a3b1..08ef1561fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# 0.34.2 (2020-12-31) + +[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. + +### Hotfix + +* Update the CKB logo. +* Rename the default network name to `Default`. +* Fix version updater error when clicking the install button too soon. +* Fix bug of `too many open files` error. + + # 0.34.1 (2020-12-19) [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. diff --git a/lerna.json b/lerna.json index 8ef6ae4c4a..4b7da27334 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "packages/*" ], - "version": "0.34.1", + "version": "0.34.2", "npmClient": "yarn", "useWorkspaces": true } diff --git a/package.json b/package.json index 8ef61224c4..37622e73ab 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "neuron", "productName": "Neuron", "description": "CKB Neuron Wallet", - "version": "0.34.1", + "version": "0.34.2", "private": true, "author": { "name": "Nervos Core Dev", diff --git a/packages/neuron-ui/package.json b/packages/neuron-ui/package.json index 8289f183f3..9a0552eb20 100644 --- a/packages/neuron-ui/package.json +++ b/packages/neuron-ui/package.json @@ -1,6 +1,6 @@ { "name": "neuron-ui", - "version": "0.34.1", + "version": "0.34.2", "private": true, "author": { "name": "Nervos Core Dev", diff --git a/packages/neuron-ui/src/widgets/Icons/Nervos.svg b/packages/neuron-ui/src/widgets/Icons/Nervos.svg index 2ef2114b08..d333cfe6d0 100644 --- a/packages/neuron-ui/src/widgets/Icons/Nervos.svg +++ b/packages/neuron-ui/src/widgets/Icons/Nervos.svg @@ -1,15 +1,14 @@ + - - + logo/token/ckb + + - - - - - - - - + + + + + diff --git a/packages/neuron-wallet/package.json b/packages/neuron-wallet/package.json index ff8f1c1556..aa85a8b3d4 100644 --- a/packages/neuron-wallet/package.json +++ b/packages/neuron-wallet/package.json @@ -3,7 +3,7 @@ "productName": "Neuron", "description": "CKB Neuron Wallet", "homepage": "https://www.nervos.org/", - "version": "0.34.1", + "version": "0.34.2", "private": true, "author": { "name": "Nervos Core Dev", @@ -85,7 +85,7 @@ "electron-notarize": "0.2.1", "jest-when": "2.7.2", "lint-staged": "9.2.5", - "neuron-ui": "0.34.1", + "neuron-ui": "0.34.2", "rimraf": "3.0.0", "ttypescript": "1.5.10" } diff --git a/packages/neuron-wallet/src/controllers/update.ts b/packages/neuron-wallet/src/controllers/update.ts index 65f075b83a..5c323878e2 100644 --- a/packages/neuron-wallet/src/controllers/update.ts +++ b/packages/neuron-wallet/src/controllers/update.ts @@ -64,7 +64,10 @@ export default class UpdateController { }) autoUpdater.on('download-progress', progress => { - this.notify(progress.percent / 100) + const progressPercent = progress.percent / 100 + if (progressPercent !== 1) { + this.notify(progressPercent) + } }) autoUpdater.on('update-downloaded', () => { diff --git a/packages/neuron-wallet/src/services/networks.ts b/packages/neuron-wallet/src/services/networks.ts index 48698d4807..c07d055760 100644 --- a/packages/neuron-wallet/src/services/networks.ts +++ b/packages/neuron-wallet/src/services/networks.ts @@ -14,7 +14,7 @@ const presetNetworks: { selected: string, networks: Network[] } = { networks: [ { id: 'mainnet', - name: 'Mainnet', + name: 'Default', remote: 'http://localhost:8114', genesisHash: MAINNET_GENESIS_HASH, type: NetworkType.Default, diff --git a/packages/neuron-wallet/src/services/sdk-core.ts b/packages/neuron-wallet/src/services/sdk-core.ts index 37758be25b..915c8a6d70 100644 --- a/packages/neuron-wallet/src/services/sdk-core.ts +++ b/packages/neuron-wallet/src/services/sdk-core.ts @@ -2,14 +2,29 @@ import CKB from '@nervosnetwork/ckb-sdk-core' import https from 'https' import http from 'http' +let httpsAgent: https.Agent +let httpAgent: http.Agent + +const getHttpsAgent = () => { + if (!httpsAgent) { + httpsAgent = new https.Agent({ keepAlive: true }) + } + return httpsAgent +} + +const getHttpAgent = () => { + if (!httpAgent) { + httpAgent = new http.Agent({ keepAlive: true }) + } + return httpAgent +} + export const generateCKB = (url: string): CKB => { const ckb = new CKB(url) if (url.startsWith('https')) { - const httpsAgent = new https.Agent({ keepAlive: true }) - ckb.rpc.setNode({ url, httpsAgent }) + ckb.rpc.setNode({ url, httpsAgent: getHttpsAgent() }) } else { - const httpAgent = new http.Agent({ keepAlive: true }) - ckb.rpc.setNode({ url, httpAgent }) + ckb.rpc.setNode({ url, httpAgent: getHttpAgent() }) } return ckb } diff --git a/packages/neuron-wallet/tests/services/networks.test.ts b/packages/neuron-wallet/tests/services/networks.test.ts index 0fb14ed6dd..23cc40a637 100644 --- a/packages/neuron-wallet/tests/services/networks.test.ts +++ b/packages/neuron-wallet/tests/services/networks.test.ts @@ -150,8 +150,8 @@ describe(`Unit tests of networks service`, () => { }) describe(`validation on network existence`, () => { - it(`create network with existing name of Mainnet`, () => { - expect(service.create('Mainnet', 'http://localhost:8114')).rejects.toThrowError(t(ERROR_MESSAGE.NAME_USED)) + it(`create network with existing name of Default`, () => { + expect(service.create('Default', 'http://localhost:8114')).rejects.toThrowError(t(ERROR_MESSAGE.NAME_USED)) }) it(`update network which is not existing`, () => {