Skip to content

Commit

Permalink
Merge pull request #973 from nervosnetwork/rc/v0.22.0
Browse files Browse the repository at this point in the history
[ᚬmaster] Rc/v0.22.0
  • Loading branch information
ashchan authored Oct 9, 2019
2 parents 530e421 + e2dfb20 commit d7ead83
Show file tree
Hide file tree
Showing 50 changed files with 642 additions and 251 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# [0.22.0](https://github.com/nervosnetwork/neuron/compare/v0.21.0-beta.1...v0.22.0) (2019-10-09)


### Bug Fixes

* address balance error in indexer mode ([0a35d61](https://github.com/nervosnetwork/neuron/commit/0a35d61))
* **neuron-ui:** add an auto match on speed of price from 20 to 40 ([160c844](https://github.com/nervosnetwork/neuron/commit/160c844))
* **neuron-ui:** fix the relationship between transaction price and speed ([541ab94](https://github.com/nervosnetwork/neuron/commit/541ab94))
* **neuron-ui:** show 0 confirmations if the real data is negative ([e974a21](https://github.com/nervosnetwork/neuron/commit/e974a21))
* change `hasData` to 0 in `output` ([04b1176](https://github.com/nervosnetwork/neuron/commit/04b1176))


### Features

* bump sdk to v0.22.0 ([b6e3035](https://github.com/nervosnetwork/neuron/commit/b6e3035))
* **neuron-ui:** add a toggle of skip-data-and-type ([9cb7c62](https://github.com/nervosnetwork/neuron/commit/9cb7c62))
* **neuron-ui:** extend the width of tx type field to 70 px ([513c7d9](https://github.com/nervosnetwork/neuron/commit/513c7d9))
* **neuron-ui:** update the view of transaction detail ([#965](https://github.com/nervosnetwork/neuron/issues/965)) ([ca38b40](https://github.com/nervosnetwork/neuron/commit/ca38b40))
* enable copy the mainnet addresses when it's not connected to the mainnet ([6b3952f](https://github.com/nervosnetwork/neuron/commit/6b3952f))



# [0.21.0-beta.1](https://github.com/nervosnetwork/neuron/compare/v0.21.0-beta.0...v0.21.0-beta.1) (2019-09-27)


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.21.0-beta.1",
"version": "0.22.0",
"npmClient": "yarn",
"useWorkspaces": true
}
2 changes: 1 addition & 1 deletion 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.21.0-beta.1",
"version": "0.22.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neuron-ui",
"version": "0.21.0-beta.1",
"version": "0.22.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -43,7 +43,7 @@
"last 2 chrome versions"
],
"dependencies": {
"@nervosnetwork/ckb-sdk-core": "0.21.0",
"@nervosnetwork/ckb-sdk-core": "0.22.0",
"@uifabric/experiments": "7.16.1",
"@uifabric/styling": "7.6.2",
"canvg": "2.0.0",
Expand Down
11 changes: 8 additions & 3 deletions packages/neuron-ui/src/components/Addresses/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ const Addresses = ({
},
wallet: { addresses = [], id: walletID },
chain: { networkID },
settings: { showAddressBook = false, networks = [] },
settings: {
general: { showAddressBook = false },
networks = [],
},
history,
dispatch,
}: React.PropsWithoutRef<StateWithDispatch & RouteComponentProps>) => {
Expand Down Expand Up @@ -80,7 +83,7 @@ const Addresses = ({
maxWidth: 500,
onRender: (item?: State.Address, _index?: number, column?: IColumn) => {
if (item) {
if (column && (column.calculatedWidth || 0) < 400) {
if (column && (column.calculatedWidth || 0) < 420) {
return (
<div
title={item.address}
Expand Down Expand Up @@ -204,7 +207,9 @@ const Addresses = ({
: addr.address,
}))}
onItemContextMenu={item => {
if (!showMainnetAddress) {
if (showMainnetAddress) {
contextMenu({ type: 'copyMainnetAddress', id: item.identifier })
} else {
contextMenu({ type: 'addressList', id: item.identifier })
}
}}
Expand Down
27 changes: 20 additions & 7 deletions packages/neuron-ui/src/components/GeneralSetting/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
import React, { useCallback } from 'react'
import React, { useMemo } from 'react'
import { Stack, Toggle } from 'office-ui-fabric-react'
import { useTranslation } from 'react-i18next'

import { StateWithDispatch } from 'states/stateProvider/reducer'
import { toggleAddressBook } from 'states/stateProvider/actionCreators'
import { toggleAddressBook, setSkipDataAndType } from 'states/stateProvider/actionCreators'

const GeneralSetting = ({ settings: { showAddressBook }, dispatch }: React.PropsWithoutRef<StateWithDispatch>) => {
const GeneralSetting = ({
settings: {
general: { showAddressBook, skipDataAndType },
},
dispatch,
}: React.PropsWithoutRef<StateWithDispatch>) => {
const [t] = useTranslation()
const onToggle = useCallback(() => {
dispatch(toggleAddressBook())
}, [dispatch])
const [onToggleAddressVisibility, onSetSkipDataAndType] = useMemo(
() => [() => dispatch(toggleAddressBook()), () => setSkipDataAndType(!skipDataAndType)(dispatch)],
[dispatch, skipDataAndType]
)
return (
<Stack tokens={{ childrenGap: 15 }}>
<Toggle
checked={showAddressBook}
label={t('settings.general.display-address-book-in-the-navbar')}
onText={t('common.toggle.on')}
offText={t('common.toggle.off')}
onChange={onToggle}
onChange={onToggleAddressVisibility}
/>
<Toggle
checked={skipDataAndType}
label={t('settings.general.skip-data-and-type')}
onText={t('common.toggle.on')}
offText={t('common.toggle.off')}
onChange={onSetSkipDataAndType}
/>
</Stack>
)
Expand Down
Loading

0 comments on commit d7ead83

Please sign in to comment.