Skip to content

Commit e652426

Browse files
authored
Merge pull request #1871 from nervosnetwork/rc/v0.33.0
Rc/v0.33.0-rc1
2 parents 4a82a1b + ef0bb3f commit e652426

File tree

36 files changed

+1006
-328
lines changed

36 files changed

+1006
-328
lines changed

.ckb-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.32.0
1+
v0.35.1

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# 0.33.0-rc1 (2020-09-27)
2+
3+
This is a release candidate to preview the changes in the next official release and may not be stable. Welcome any questions or suggestions.
4+
5+
[CKB v0.35.1](https://github.com/nervosnetwork/ckb/releases/tag/v0.35.1) was released on Sept. 14th, 2020. This version of
6+
CKB node is now bundled and preconfigured in Neuron.
7+
8+
Note: There will be a data migration for the new bundled node [CKB v0.35.1](https://github.com/nervosnetwork/ckb/releases/tag/v0.35.1), which may take several minutes to boot up for the first time after upgraded from the earlier versions.
9+
10+
### Refactor
11+
12+
* Upgrade from Electron 7 to Electron 9.
13+
* Refactor the wallet address storage to be based on an SQLite table rather than a JSON file.
14+
* Deprecate LevelDB and use SQLite instead.
15+
* Refactor send component.
16+
17+
### New features
18+
19+
* Reduce the confirmation block height from 300 to 24.
20+
* Enable `Asset Accounts` for mainnet.
21+
* Support transfer to multisig address.
22+
23+
### Bug fixes
24+
25+
* Fixed `InsufficientCellCapacity` error for CKB ACP transfer when there are cells with data.
26+
* Fixed `too many SQL variables` error when there are too many addresses in wallets.
27+
* Fixed the autofill description on unlocking assets.
28+
* Refine error message when the fee for dao withdrawal transaction is insufficient.
29+
30+
31+
# 0.32.3 (2020-09-22)
32+
[CKB v0.32.0](https://github.com/nervosnetwork/ckb/releases/tag/v0.32.0) was released on May 22nd, 2020. This version of CKB node is now bundled and preconfigured in Neuron.
33+
34+
### Bug fixes
35+
36+
* Fix a bug of lumos query for multisign lock.
37+
138
# 0.33.0-beta.1 (2020-09-12)
239

340
This is a beta version to preview the changes in the next release and may not be stable. It is not suggested to install this version for asset management. Welcome any questions or suggestions.

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ trigger:
55
- master
66
- develop
77
- rc/*
8+
- hotfix/*
89
tags:
910
include:
1011
- refs/tags/v*

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.33.0-beta.1",
5+
"version": "0.33.0-rc1",
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.33.0-beta.1",
5+
"version": "0.33.0-rc1",
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.33.0-beta.1",
3+
"version": "0.33.0-rc1",
44
"private": true,
55
"author": {
66
"name": "Nervos Core Dev",

packages/neuron-ui/src/components/PasswordRequest/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const PasswordRequest = () => {
9797
if (isSending) {
9898
break
9999
}
100-
await sendTransaction({ walletID, tx: generatedTx, description, password })(dispatch).then(status => {
100+
await sendTransaction({ walletID, tx: generatedTx, password })(dispatch).then(status => {
101101
if (isSuccessResponse({ status })) {
102102
dispatch({
103103
type: AppActions.SetGlobalDialog,

packages/neuron-ui/src/components/SpecialAssetList/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ const SpecialAssetList = () => {
6666
const isMainnet = isMainnetUtil(networks, networkID)
6767

6868
useEffect(() => {
69-
dispatch({
70-
type: AppActions.UpdateGeneratedTx,
71-
payload: null,
72-
})
69+
dispatch({ type: AppActions.ClearSendState })
7370
}, [dispatch])
7471

7572
const fetchList = useCallback(

packages/neuron-ui/src/components/Transaction/index.tsx

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
import React, { useEffect, useState, useMemo, useCallback } from 'react'
22
import { useTranslation } from 'react-i18next'
33
import { currentWallet as currentWalletCache } from 'services/localCache'
4-
import {
5-
getSystemCodeHash,
6-
getTransaction,
7-
showErrorMessage,
8-
getAllNetworks,
9-
getCurrentNetworkID,
10-
} from 'services/remote'
11-
import { ckbCore } from 'services/chain'
4+
import { getTransaction, showErrorMessage, getAllNetworks, getCurrentNetworkID } from 'services/remote'
125

136
import { transactionState } from 'states'
147

@@ -21,6 +14,7 @@ import {
2114
shannonToCKBFormatter,
2215
useExitOnWalletChange,
2316
isSuccessResponse,
17+
scriptToAddress,
2418
} from 'utils'
2519
import CopyZone from 'widgets/CopyZone'
2620

@@ -30,12 +24,10 @@ const { MAINNET_TAG } = CONSTANTS
3024

3125
const Transaction = () => {
3226
const [t, i18n] = useTranslation()
33-
const [systemCodeHash, setSystemCodeHash] = useState<string>('')
3427
const [transaction, setTransaction] = useState(transactionState)
3528
const [isMainnet, setIsMainnet] = useState(false)
3629
const [error, setError] = useState({ code: '', message: '' })
3730

38-
const addressPrefix = isMainnet ? ckbCore.utils.AddressPrefix.Mainnet : ckbCore.utils.AddressPrefix.Testnet
3931
const hash = useMemo(() => window.location.href.split('/').pop(), [])
4032

4133
useOnLocaleChange(i18n)
@@ -46,11 +38,6 @@ const Transaction = () => {
4638
}, [i18n.language, hash])
4739

4840
useEffect(() => {
49-
getSystemCodeHash().then(res => {
50-
if (isSuccessResponse(res)) {
51-
setSystemCodeHash(res.result)
52-
}
53-
})
5441
Promise.all([getAllNetworks(), getCurrentNetworkID()])
5542
.then(([networksRes, idRes]) => {
5643
if (isSuccessResponse(networksRes) && isSuccessResponse(idRes)) {
@@ -149,23 +136,7 @@ const Transaction = () => {
149136
address = t('transaction.cell-from-cellbase')
150137
} else {
151138
try {
152-
if (cell.lock.codeHash === systemCodeHash && cell.lock.hashType === 'type') {
153-
address = ckbCore.utils.bech32Address(cell.lock.args, {
154-
prefix: addressPrefix,
155-
type: ckbCore.utils.AddressType.HashIdx,
156-
codeHashOrCodeHashIndex: '0x00',
157-
})
158-
} else {
159-
address = ckbCore.utils.fullPayloadToAddress({
160-
arg: cell.lock.args,
161-
prefix: addressPrefix,
162-
type:
163-
cell.lock.hashType === 'data'
164-
? ckbCore.utils.AddressType.DataCodeHash
165-
: ckbCore.utils.AddressType.TypeCodeHash,
166-
codeHash: cell.lock.codeHash,
167-
})
168-
}
139+
address = scriptToAddress(cell.lock, isMainnet)
169140
} catch (err) {
170141
console.error(err)
171142
}
@@ -188,7 +159,7 @@ const Transaction = () => {
188159
</tr>
189160
)
190161
}),
191-
[t, addressPrefix, systemCodeHash]
162+
[t, isMainnet]
192163
)
193164

194165
if (error.code) {

packages/neuron-ui/src/containers/Main/hooks.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
import { ckbCore, getBlockchainInfo, getTipHeader } from 'services/chain'
2222
import { networks as networksCache, currentNetworkID as currentNetworkIDCache } from 'services/localCache'
2323
import { WalletWizardPath } from 'components/WalletWizard'
24-
import { ConnectionStatus, ErrorCode, RoutePath } from 'utils'
24+
import { ErrorCode, RoutePath, getConnectionStatus } from 'utils'
2525

2626
const SYNC_INTERVAL_TIME = 4000
2727
const CONNECTING_BUFFER = 15_000
@@ -60,12 +60,7 @@ export const useSyncChainData = ({ chainURL, dispatch }: { chainURL: string; dis
6060
}
6161
})
6262
.catch(() => {
63-
if (isCurrentUrl(chainURL)) {
64-
dispatch({
65-
type: NeuronWalletActions.UpdateConnectionStatus,
66-
payload: Date.now() > CONNECTING_DEADLINE ? ConnectionStatus.Offline : ConnectionStatus.Connecting,
67-
})
68-
}
63+
// ignore, unconnected events are handled in subscription
6964
})
7065
}
7166
clearInterval(timer!)
@@ -175,13 +170,9 @@ export const useSubscription = ({
175170
})
176171
const connectionStatusSubscription = ConnectionStatusSubject.subscribe(status => {
177172
if (isCurrentUrl(status.url)) {
178-
let payload = status.connected ? ConnectionStatus.Online : ConnectionStatus.Offline
179-
if (payload === ConnectionStatus.Offline && Date.now() <= CONNECTING_DEADLINE) {
180-
payload = ConnectionStatus.Connecting
181-
}
182173
dispatch({
183174
type: NeuronWalletActions.UpdateConnectionStatus,
184-
payload,
175+
payload: getConnectionStatus({ ...status, isTimeout: Date.now() > CONNECTING_DEADLINE }),
185176
})
186177
}
187178
})

0 commit comments

Comments
 (0)