Skip to content

Commit

Permalink
Merge pull request #1963 from nervosnetwork/0.35.0-rc1
Browse files Browse the repository at this point in the history
0.35.0 rc1
  • Loading branch information
katat authored Dec 19, 2020
2 parents 1c5dec8 + 6a4ca5e commit 3342d04
Show file tree
Hide file tree
Showing 25 changed files with 655 additions and 53 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 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.0 (2020-12-16)

[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 Down
24 changes: 15 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_12_x:
node_version: 12.x
node_14_x:
node_version: 14.x
steps:
- task: NodeTool@0
inputs:
Expand All @@ -47,13 +47,16 @@ stages:
vmImage: 'ubuntu-18.04'
strategy:
matrix:
node_12_x:
node_version: 12.x
node_14_x:
node_version: 14.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'
- script: |
sudo apt-get install -y libudev-dev
displayName: Install libudev
- script: |
yarn global add lerna
yarn bootstrap
Expand All @@ -71,8 +74,8 @@ stages:
vmImage: 'vs2017-win2016'
strategy:
matrix:
node_12_x:
node_version: 12.x
node_14_x:
node_version: 14.x
steps:
- task: NodeTool@0
inputs:
Expand Down Expand Up @@ -101,7 +104,7 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
versionSpec: 14.x
displayName: 'Install Node.js'
- script: |
yarn global add lerna
Expand Down Expand Up @@ -131,8 +134,11 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
versionSpec: 14.x
displayName: 'Install Node.js'
- script: |
sudo apt-get install -y libudev-dev
displayName: Install libudev
- script: |
yarn global add lerna
yarn bootstrap
Expand All @@ -152,7 +158,7 @@ stages:
steps:
- task: NodeTool@0
inputs:
versionSpec: 12.x
versionSpec: 14.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.0",
"version": "0.35.0-rc1",
"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.0",
"version": "0.35.0-rc1",
"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.0",
"version": "0.35.0-rc1",
"private": true,
"author": {
"name": "Nervos Core Dev",
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
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 3342d04

Please sign in to comment.