Skip to content

Commit

Permalink
Merge pull request #1984 from nervosnetwork/rc/release-ledger
Browse files Browse the repository at this point in the history
Rc/release v0.35.0
  • Loading branch information
kellyshang authored Jan 12, 2021
2 parents 6bb7961 + 02d70ad commit 2bdbcc5
Show file tree
Hide file tree
Showing 42 changed files with 839 additions and 166 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 0.35.0 (2021-01-12)

[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.

### New features

* Enable hardware wallet of Ledger. Please note that this is an **experimental** feature, please pay attention to the risk and use with caution.
* Support address verification on hardware wallet device.

### Bug fixes

* Fix problems in searching transactions by address or tx hash.

# 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.
Expand All @@ -9,6 +22,16 @@
* Fix version updater error when clicking the install button too soon.
* Fix bug of `too many open files` error.

# 0.35.0-rc1 (2020-12-19)

This is a release candidate to preview the changes in the next official release and may not be stable. Welcome any questions or suggestions.

[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.

### New features

* Enable hardware wallet of Ledger.
* Support address verification on hardware wallet device.

# 0.34.1 (2020-12-19)

Expand Down
18 changes: 9 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ stages:
vmImage: 'macos-10.14'
strategy:
matrix:
node_14_x:
node_version: 14.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
Expand All @@ -47,8 +47,8 @@ stages:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
node_14_x:
node_version: 14.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
Expand All @@ -74,8 +74,8 @@ stages:
vmImage: 'vs2017-win2016'
strategy:
matrix:
node_14_x:
node_version: 14.x
node_12_x:
node_version: 12.x
steps:
- task: NodeTool@0
inputs:
Expand Down Expand Up @@ -104,7 +104,7 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
versionSpec: 12.x
displayName: 'Install Node.js'
- script: |
yarn global add lerna
Expand Down Expand Up @@ -134,7 +134,7 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
versionSpec: 12.x
displayName: 'Install Node.js'
- script: |
sudo apt-get install -y libudev-dev
Expand All @@ -158,7 +158,7 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
versionSpec: 12.x
displayName: 'Install Node.js'
- script: yarn global add lerna
displayName: 'Install lerna'
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "0.34.2",
"version": "0.35.0",
"npmClient": "yarn",
"useWorkspaces": true
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "neuron",
"productName": "Neuron",
"description": "CKB Neuron Wallet",
"version": "0.34.2",
"version": "0.35.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand All @@ -22,7 +22,7 @@
"packages/*"
],
"scripts": {
"bootstrap": "yarn policies set-version 1.19.2 && npx cross-env LUMOS_NODE_RUNTIME=electron LUMOS_NODE_RUNTIME_VERSION=9.0.2 lerna bootstrap && lerna link",
"bootstrap": "npx cross-env LUMOS_NODE_RUNTIME=electron LUMOS_NODE_RUNTIME_VERSION=9.0.2 lerna bootstrap && lerna link",
"start:ui": "cd packages/neuron-ui && yarn run start",
"start:wallet": "cd packages/neuron-wallet && yarn run start:dev",
"start": "concurrently \"cross-env BROWSER=none yarn run start:ui\" \"wait-on http://localhost:3000 && yarn run start:wallet\"",
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neuron-ui",
"version": "0.34.2",
"version": "0.35.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
11 changes: 11 additions & 0 deletions packages/neuron-ui/src/components/HardwareSign/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
sendCreateSUDTAccountTransaction,
sendSUDTTransaction,
AppActions,
migrateAcp,
} from 'states'
import { ControllerResponse } from 'services/remote/remoteApiWrapper'
import Spinner from 'widgets/Spinner'
Expand Down Expand Up @@ -284,6 +285,16 @@ const HardwareSign = ({
})
break
}
case 'migrate-acp': {
await migrateAcp({ id: wallet.id })(dispatch).then(res => {
if (isSuccessResponse(res)) {
history!.push(RoutePath.History)
} else {
setError(res.message.content)
}
})
break
}
default: {
break
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next'
import { RouteComponentProps } from 'react-router-dom'
import Button from 'widgets/Button'
import { ReactComponent as PendingIcon } from 'widgets/Icons/Pending.svg'
import { getDevicePublickey } from 'services/remote'
import { getDeviceExtendedPublickey } from 'services/remote'
import { isSuccessResponse, useDidMount } from 'utils'
import { RoutePath, LocationState } from './common'

Expand All @@ -17,7 +17,7 @@ const Confirming = ({ history, location }: RouteComponentProps<{}, {}, LocationS
}, [history, entryPath])

useDidMount(() => {
getDevicePublickey().then(res => {
getDeviceExtendedPublickey().then(res => {
if (isSuccessResponse(res)) {
history.push({
pathname: entryPath + RoutePath.NameWallet,
Expand Down
3 changes: 3 additions & 0 deletions packages/neuron-ui/src/components/ImportHardware/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useRef, useEffect } from 'react'
import { Switch, Route, RouteComponentProps } from 'react-router-dom'
import Experimental from 'widgets/ExperimentalRibbon'
import Comfirming from './confirming'
import ImportError from './import-error'
import SelectModel from './select-model'
Expand All @@ -12,13 +13,15 @@ import styles from './findDevice.module.scss'

const ImportHardware = ({ match }: RouteComponentProps) => {
const dialogRef = useRef<HTMLDialogElement | null>(null)
const EXPERIMENTAL_TAG = 'import-hardware'

useEffect(() => {
dialogRef.current!.showModal()
}, [])

return (
<dialog ref={dialogRef} className={styles.dialog}>
<Experimental tag={EXPERIMENTAL_TAG} showRibbon={false} message="messages.experimental-message-hardware" />
<Switch>
<Route component={SelectModel} exact path={match.url} />
<Route component={DetectDevice} exact path={match.url + RoutePath.DetectDevice} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { RouteComponentProps } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import Button from 'widgets/Button'
import Select from 'widgets/Select'
import { Text } from 'office-ui-fabric-react'
import styles from './findDevice.module.scss'
import { LocationState, Model, RoutePath } from './common'

Expand Down Expand Up @@ -56,6 +57,7 @@ const SelectModel = ({ match, history }: RouteComponentProps<{}, {}, LocationSta
placeholder={t('import-hardware.select-model')}
options={supportedHardwareModels}
/>
<Text variant="tiny">{t('messages.experimental-message-hardware')}</Text>
</section>
<footer className={styles.footer}>
<Button type="cancel" label={t('import-hardware.actions.cancel')} onClick={onBack} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ const PasswordRequest = () => {
break
}
case 'migrate-acp': {
await migrateAcp({ id: walletID, password })(dispatch).then(status => {
await migrateAcp({ id: walletID, password })(dispatch).then(({ status }) => {
if (isSuccessResponse({ status })) {
history.push(RoutePath.History)
} else if (status === ErrorCode.PasswordIncorrect) {
Expand Down
30 changes: 26 additions & 4 deletions packages/neuron-ui/src/components/Receive/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import React, { useCallback, useMemo } from 'react'
import React, { useCallback, useMemo, useState } from 'react'
import { useRouteMatch, useHistory } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import Button from 'widgets/Button'
import QRCode from 'widgets/QRCode'
import CopyZone from 'widgets/CopyZone'
import { RoutePath } from 'utils'
import { useState as useGlobalState, useDispatch } from 'states'
import VerifyHardwareAddress from 'components/VerifyHardwareAddress'
import styles from './receive.module.scss'

const Receive = () => {
const {
wallet: { addresses = [] },
} = useGlobalState()
const { wallet } = useGlobalState()
const dispatch = useDispatch()
const [t] = useTranslation()
const {
params: { address },
} = useRouteMatch()
const history = useHistory()
const [displayVerifyDialog, setDisplayVerifyDialog] = useState(false)
const { addresses } = wallet
const isSingleAddress = addresses.length === 1

const accountAddress = useMemo(() => {
Expand All @@ -31,6 +32,10 @@ const Receive = () => {
history.push(RoutePath.Addresses)
}, [history])

const onVerifyAddressClick = useCallback(() => {
setDisplayVerifyDialog(true)
}, [])

if (!accountAddress) {
return <div>{t('receive.address-not-found')}</div>
}
Expand Down Expand Up @@ -58,6 +63,23 @@ const Receive = () => {
onClick={onAddressBookClick}
/>
)}
{isSingleAddress && (
<Button
type="primary"
className={styles.addressBook}
label={t('receive.verify-address')}
onClick={onVerifyAddressClick}
/>
)}
{displayVerifyDialog && (
<VerifyHardwareAddress
address={accountAddress}
wallet={wallet}
onDismiss={() => {
setDisplayVerifyDialog(false)
}}
/>
)}
</div>
)
}
Expand Down
Loading

0 comments on commit 2bdbcc5

Please sign in to comment.