Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
84692c7
feat(neuron-ui): show confirmations on the History View
Keith-CY Aug 22, 2019
c31dccb
Merge pull request #892 from Keith-CY/add-confirmations-in-history
ashchan Aug 22, 2019
4d0cede
refactor(neuron-ui): refactor the Overview View
Keith-CY Aug 22, 2019
64166cc
feat(neuron-ui): set the cycles to empty if the transaction is invalid
Keith-CY Aug 22, 2019
eeb7891
Merge pull request #893 from Keith-CY/refactor-overview
Keith-CY Aug 22, 2019
4926d39
Merge pull request #894 from Keith-CY/set-cycles-empty-if-tx-invalid
ashchan Aug 22, 2019
6c2c618
Use error code for i18n (#895)
Keith-CY Aug 27, 2019
d45bd7b
refactor(neuron-ui): rename outputsToTotalCapacity to outputsToTotalA…
Keith-CY Aug 27, 2019
6ca8200
feat: bump sdk to v0.19.0 in neuron-wallet
classicalliu Aug 27, 2019
3b6ede9
feat: bump sdk to v0.19.0 in neuron-ui
classicalliu Aug 27, 2019
07d35a8
chore: update alter deps migration
classicalliu Aug 27, 2019
5c1800c
Merge pull request #896 from Keith-CY/add-more-tests-of-formatter
ashchan Aug 27, 2019
9c25b4a
refactor: regenerate migrations
classicalliu Aug 28, 2019
33cc4cf
fix: remove default hash_type=data
classicalliu Aug 28, 2019
f2432eb
fix: add outputsData and headerDeps
classicalliu Aug 28, 2019
19c6673
fix: hide some tests in lock utils tests
classicalliu Aug 28, 2019
c851963
fix: fix filterOutputs for async filter
classicalliu Aug 28, 2019
90ced3f
chore: add default headerDeps and cellDeps to transaction entity
classicalliu Aug 28, 2019
c0ce206
Merge pull request #897 from nervosnetwork/bump-sdk-to-v0.19.0
classicalliu Aug 28, 2019
816bcab
refactor: crypto.scryptSync accepts plain password string
ashchan Aug 28, 2019
1c73d37
test: Add a ckb cli light keystore failing test case
ashchan Aug 28, 2019
2c68e34
refactor: Extract keystore derived key and mac logic
ashchan Aug 28, 2019
dd6c721
refactor: Allow keystore creation to customize salt and iv
ashchan Aug 28, 2019
7ea91f0
refactor: Reuse Keystore.mac
ashchan Aug 28, 2019
ff95102
test: Update ckb cli light keystore json fixture
ashchan Aug 28, 2019
34e3370
test: Add failing test case for cli standard keystore import
ashchan Aug 28, 2019
eac4339
fix: Error when handling crypto.scryptSync with N > 16384
ashchan Aug 28, 2019
f865177
test: Add test case for loading private key from standard keystore
ashchan Aug 28, 2019
06f5ac6
feat: Increase KDF params N value to 2**18 to produce more secure key…
ashchan Aug 28, 2019
3f1bc59
chore: Bump to v0.19.0-beta.0
ashchan Aug 28, 2019
ac61a5b
feat: Update TypeScript to 3.6
ashchan Aug 28, 2019
e40c5cf
feat: Remove MenuCommand enum (#900)
ashchan Aug 29, 2019
9792f9b
Merge pull request #899 from nervosnetwork/typescript-3.6
Keith-CY Aug 29, 2019
d057490
Merge pull request #898 from nervosnetwork/keystore-compatibility-wit…
ashchan Aug 29, 2019
3e94c01
docs: Draft changlog for v0.19.0-beta.0
ashchan Aug 29, 2019
170a8d8
docs: Update changlog
ashchan Aug 29, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# [0.19.0-beta.0](https://github.com/nervosnetwork/neuron/compare/v0.18.0-beta.1...v0.19.0-beta.0) (2019-08-29)

### BREAKING CHANGES

* Code signing certification was updated. Manual installation of this version is required as automatic update won't work.
* There was a bug that caused the keystore mac to calculate incorrectly. Older exported keystore files might not be able to be imported.
* DB structure was changed per CKB transaction and other types' changes.

### Bug Fixes

* Fix keystore mac calculation
* add outputsData and headerDeps ([f2432eb](https://github.com/nervosnetwork/neuron/commit/f2432eb))
* Error when handling crypto.scryptSync with N > 16384 ([eac4339](https://github.com/nervosnetwork/neuron/commit/eac4339))
* fix filterOutputs for async filter ([c851963](https://github.com/nervosnetwork/neuron/commit/c851963))
* hide some tests in lock utils tests ([19c6673](https://github.com/nervosnetwork/neuron/commit/19c6673))
* remove default hash_type=data ([33cc4cf](https://github.com/nervosnetwork/neuron/commit/33cc4cf))


### Features

* bump sdk to v0.19.0 in neuron-ui ([3b6ede9](https://github.com/nervosnetwork/neuron/commit/3b6ede9))
* bump sdk to v0.19.0 in neuron-wallet ([6ca8200](https://github.com/nervosnetwork/neuron/commit/6ca8200))
* Increase KDF params N value to 2**18 to produce more secure keystore ([06f5ac6](https://github.com/nervosnetwork/neuron/commit/06f5ac6))
* Remove MenuCommand enum ([#900](https://github.com/nervosnetwork/neuron/issues/900)) ([e40c5cf](https://github.com/nervosnetwork/neuron/commit/e40c5cf))
* Update TypeScript to 3.6 ([ac61a5b](https://github.com/nervosnetwork/neuron/commit/ac61a5b))
* **neuron-ui:** set the cycles to empty if the transaction is invalid ([64166cc](https://github.com/nervosnetwork/neuron/commit/64166cc))
* **neuron-ui:** show confirmations on the History View ([84692c7](https://github.com/nervosnetwork/neuron/commit/84692c7))



# [0.18.0-beta.1](https://github.com/nervosnetwork/neuron/compare/v0.18.0-beta.0...v0.18.0-beta.1) (2019-08-22)


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.18.0-beta.1",
"version": "0.19.0-beta.0",
"npmClient": "yarn",
"useWorkspaces": true
}
8 changes: 4 additions & 4 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.18.0-beta.1",
"version": "0.19.0-beta.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -44,8 +44,8 @@
},
"devDependencies": {
"@types/jest": "24.0.13",
"@typescript-eslint/eslint-plugin": "1.10.2",
"@typescript-eslint/parser": "1.10.2",
"@typescript-eslint/eslint-plugin": "2.0.0",
"@typescript-eslint/parser": "2.0.0",
"concurrently": "4.1.1",
"cross-env": "5.2.0",
"eslint": "5.16.0",
Expand All @@ -61,7 +61,7 @@
"nodemon": "1.19.1",
"prettier": "1.17.1",
"ts-jest": "24.0.2",
"typescript": "3.5.3",
"typescript": "3.6.2",
"wait-on": "3.3.0"
},
"dependencies": {}
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.18.0-beta.1",
"version": "0.19.0-beta.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.18.0",
"@nervosnetwork/ckb-sdk-core": "0.19.0",
"@uifabric/experiments": "7.10.0",
"@uifabric/styling": "7.4.0",
"canvg": "2.0.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/neuron-ui/src/components/History/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ import { useSearch } from './hooks'

const History = ({
app: {
tipBlockNumber: chainBlockNumber,
loadings: { transactionList: isLoading, updateDescription: isUpdatingDescription },
},
wallet: { id },
chain: {
tipBlockNumber: syncedBlockNumber,
transactions: { pageNo = 1, pageSize = 15, totalCount = 0, items = [] },
},
history,
Expand All @@ -33,6 +35,10 @@ const History = ({
}, [id, history])
const onSearch = useCallback(() => history.push(`${Routes.History}?keywords=${keywords}`), [history, keywords])

const tipBlockNumber = useMemo(() => {
return Math.max(+syncedBlockNumber, +chainBlockNumber).toString()
}, [syncedBlockNumber, chainBlockNumber])

const List = useMemo(() => {
return (
<Stack>
Expand All @@ -51,6 +57,7 @@ const History = ({
isUpdatingDescription={isUpdatingDescription}
walletID={id}
items={items}
tipBlockNumber={tipBlockNumber}
dispatch={dispatch}
/>
<Pagination
Expand Down Expand Up @@ -83,6 +90,7 @@ const History = ({
isUpdatingDescription,
id,
items,
tipBlockNumber,
dispatch,
pageNo,
totalCount,
Expand Down
26 changes: 20 additions & 6 deletions packages/neuron-ui/src/components/ImportKeystore/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ import { importWalletWithKeystore } from 'states/stateProvider/actionCreators'
import { StateWithDispatch } from 'states/stateProvider/reducer'
import { useGoBack } from 'utils/hooks'
import generateWalletName from 'utils/generateWalletName'
import { ErrorCode, MAX_WALLET_NAME_LENGTH, MAX_PASSWORD_LENGTH } from 'utils/const'

const defaultFields = {
interface KeystoreFields {
path: string
name: string | undefined
password: string
}

const defaultFields: KeystoreFields = {
path: '',
name: '',
name: undefined,
password: '',
}

Expand All @@ -25,7 +32,7 @@ const ImportKeystore = (props: React.PropsWithoutRef<StateWithDispatch & RouteCo
const goBack = useGoBack(history)

useEffect(() => {
if (fields.name === '') {
if (fields.name === undefined) {
const name = generateWalletName(wallets, wallets.length + 1, t)
setFields({
...fields,
Expand Down Expand Up @@ -60,7 +67,7 @@ const ImportKeystore = (props: React.PropsWithoutRef<StateWithDispatch & RouteCo

const onSubmit = useCallback(() => {
importWalletWithKeystore({
name: fields.name,
name: fields.name || '',
keystorePath: fields.path,
password: fields.password,
})(dispatch, history)
Expand All @@ -70,6 +77,12 @@ const ImportKeystore = (props: React.PropsWithoutRef<StateWithDispatch & RouteCo
<Stack verticalFill verticalAlign="center" tokens={{ childrenGap: 15 }}>
<Stack tokens={{ childrenGap: 15 }}>
{Object.entries(fields).map(([key, value]) => {
let maxLength: number | undefined
if (key === 'name') {
maxLength = MAX_WALLET_NAME_LENGTH
} else if (key === 'password') {
maxLength = MAX_PASSWORD_LENGTH
}
return (
<TextField
key={key}
Expand All @@ -78,14 +91,15 @@ const ImportKeystore = (props: React.PropsWithoutRef<StateWithDispatch & RouteCo
placeholder={t(`import-keystore.placeholder.${key}`)}
type={key === 'password' ? 'password' : 'text'}
readOnly={key === 'path'}
maxLength={maxLength}
value={value}
validateOnLoad={false}
onGetErrorMessage={(text?: string) => {
if (text === '') {
return t('messages.is-required', { field: t(`import-keystore.label.${key}`) })
return t(`messages.codes.${ErrorCode.FieldRequired}`, { fieldName: `keystore-${key}` })
}
if (key === 'name' && isNameUsed) {
return t('messages.is-used', { field: t(`import-keystore.label.${key}`) })
return t(`messages.codes.${ErrorCode.FieldUsed}`, { fieldName: `name`, fieldValue: text })
}
return ''
}}
Expand Down
Loading