Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8912dab
chore(deps): bump parse-url from 6.0.0 to 6.0.2
dependabot[bot] Jul 6, 2022
bd61dd5
Merge pull request #2445 from nervosnetwork/master
Keith-CY Jul 11, 2022
23b7b0b
chore(deps): bump moment from 2.29.3 to 2.29.4
dependabot[bot] Jul 11, 2022
c30350f
fix: Show confirm error.
yanguoyu Jul 11, 2022
66cef47
Merge pull request #2446 from nervosnetwork/dependabot/npm_and_yarn/m…
Keith-CY Jul 12, 2022
c25cfb1
Merge pull request #2447 from yanguoyu/fix-add-warning-create-error
Keith-CY Jul 13, 2022
e5c4d8b
Merge pull request #2440 from nervosnetwork/dependabot/npm_and_yarn/p…
Keith-CY Jul 13, 2022
65c1423
fix: Add typeRoots (#2452)
yanguoyu Jul 15, 2022
2c38013
fix: If input is not focus, it also trigger onBlur. So it need add a …
yanguoyu Jul 15, 2022
ce2c08f
fix: Fix send multisig tx when input cell's length is more than 1. (#…
yanguoyu Jul 15, 2022
9b9287a
feat: Multisig import and export config compatible with ckb-cli (#2442)
yanguoyu Jul 18, 2022
06b87bf
feat: add 'contact us' in the menu -> help submenu (#2454)
Keith-CY Jul 20, 2022
8bb2438
chore(deps): bump terser from 4.8.0 to 4.8.1
dependabot[bot] Jul 21, 2022
f1aa5b2
Merge pull request #2457 from nervosnetwork/dependabot/npm_and_yarn/t…
Keith-CY Jul 28, 2022
65d441e
fix: Fix ckb process kill unexpected. (#2467)
yanguoyu Aug 17, 2022
5f5ccf7
fix: Optimization data path set (#2464)
yanguoyu Aug 17, 2022
6b73c14
feat: The header dep's block no need 4 epochs ago. (#2461)
yanguoyu Aug 22, 2022
eb3cdf0
feat: bump ckb to v0.104.0
Keith-CY Aug 23, 2022
81342e9
Create dependabot.yml
Keith-CY Aug 23, 2022
d1e7c57
Create codeql-analysis.yml
Keith-CY Aug 23, 2022
3d8f6a1
Merge pull request #2473 from nervosnetwork/ci-add-dependabot-auto-up…
Keith-CY Aug 23, 2022
f79f5b8
Merge pull request #2472 from nervosnetwork/bump-ckb-version
Keith-CY Aug 23, 2022
6acaf1d
chore(deps): bump @ckb-lumos/rpc in /packages/ckb-indexer
dependabot[bot] Aug 23, 2022
e7e9086
Merge pull request #2474 from nervosnetwork/ci-add-codeQL
Keith-CY Aug 23, 2022
efc0af3
feat: Adapt new UAN (#2465)
yanguoyu Aug 24, 2022
68fa9f5
chore(deps-dev): bump eslint from 8.15.0 to 8.22.0 in /packages/ckb-i…
dependabot[bot] Aug 24, 2022
9e28940
Merge pull request #2477 from nervosnetwork/dependabot/npm_and_yarn/p…
Keith-CY Aug 25, 2022
cb6aedf
chore(deps): bump @ckb-lumos/base in /packages/ckb-indexer
dependabot[bot] Aug 25, 2022
12be178
Merge pull request #2476 from nervosnetwork/dependabot/npm_and_yarn/p…
Keith-CY Aug 25, 2022
b6889d9
fix: Fix some exception from set ckb node path (#2478)
yanguoyu Aug 30, 2022
c4dcd61
chore: update neuron version and changelog
Keith-CY Sep 2, 2022
961e914
chore: update assumed valid target
Keith-CY Sep 13, 2022
37a7063
Merge pull request #2485 from nervosnetwork/update-assumed-valid-target
Keith-CY Sep 14, 2022
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
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.103.0
v0.104.0
29 changes: 29 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"

updates:
- package-ecosystem: "npm"
directory: "/packages/neuron-ui"
schedule:
interval: "weekly"

updates:
- package-ecosystem: "npm"
directory: "/packages/neuron-wallet"
schedule:
interval: "weekly"

updates:
- package-ecosystem: "npm"
directory: "/packages/ckb-indexer"
schedule:
interval: "weekly"
72 changes: 72 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "develop", master, rc/* ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '24 10 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# 0.104.0 (2022-09-07)

### CKB
[CKB v0.104.0](https://github.com/nervosnetwork/ckb/releases/tag/v0.104.0) was released on Jul. 19th, 2022. This version of CKB node is now bundled and preconfigured in Neuron.

### Assumed valid target

// TODO
Blocks before `` will be skipped in validation.


### New features
* #2442: Import and export multisig configuration which is compatible with ckb-cli.(@yanguoyu)
* #2454: Add the 'contact us' item in the help menu.(@Keith-CY)
* #2461: Remove maturity restriction of header deps.(@yanguoyu)
* #2465: Adapt new UAN for sUDT.(@yanguoyu)
* #2472: Bump ckb to v0.104.0 (@Keith-CY)

### Bug fixes
* #2447: Show friendly error on creating multisig address.(@yanguoyu)
* #2450: Fix sending multisig tx of multiple input cells.(@yanguoyu)
* #2451: Refine textfield component.(@yanguoyu
* #2464, #2478: Optimize setting data path of ckb node/indexer.(@yanguoyu)
* #2467: Fix ckb process killed unexpectedly.(@yanguoyu)


**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.103.2...v0.104.0



# 0.103.2 (2022-07-09)

### New features
Expand Down
6 changes: 2 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"packages": [
"packages/*"
],
"version": "0.103.2",
"packages": ["packages/*"],
"version": "0.104.0",
"npmClient": "yarn",
"useWorkspaces": true
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@babel/core": "7.17.10",
"@types/jest": "27.5.0",
"@types/node": "16.11.7",
"@types/npmlog": "4.1.2",
"@typescript-eslint/eslint-plugin": "5.23.0",
"@typescript-eslint/parser": "5.23.0",
"concurrently": "7.0.0",
Expand Down
7 changes: 4 additions & 3 deletions packages/ckb-indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
"test": "__tests__"
},
"dependencies": {
"@ckb-lumos/base": "0.18.0-rc2",
"@ckb-lumos/rpc": "0.18.0-rc2",
"@ckb-lumos/base": "0.18.0",
"@ckb-lumos/rpc": "0.18.0",
"ckb-js-toolkit": "0.100.0-rc1",
"cross-fetch": "3.1.5"
},
"devDependencies": {
"events": "3.3.0"
"events": "3.3.0",
"eslint": "8.22.0"
},
"scripts": {
"build": "tsc",
Expand Down
2 changes: 1 addition & 1 deletion packages/ckb-indexer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"lib": ["es2020", "dom"],
"module": "commonjs",
"declaration": true,
"sourceMap": true,
"sourceMap": true
},
"include": ["src"]
}
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.103.2",
"version": "0.104.0",
"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 { getCompensatedTime, getCompensationPeriod, CONSTANTS, CompensationPeriod, uniformTimeFormatter } from 'utils'
import styles from './compensationPeriodTooltip.module.scss'

const { WITHDRAW_EPOCHS, IMMATURE_EPOCHS } = CONSTANTS
const { WITHDRAW_EPOCHS } = CONSTANTS

const HOUR = 3_600_000
const HOURS_PER_EPOCH = 4 * HOUR
Expand Down Expand Up @@ -47,22 +47,6 @@ const CompensationPeriodTooltip = ({
endEpochTimestamp - (1 - CompensationPeriod.REQUEST_START) * WITHDRAW_EPOCHS * HOURS_PER_EPOCH

const { days, hours } = getCompensatedTime({ currentEpochValue: baseEpochValue, depositEpochValue })
const isImmature = baseEpochValue < depositEpochValue + IMMATURE_EPOCHS

if (isImmature) {
return (
<div className={styles.container}>
<div className={styles.compensated}>
<span>{t('nervos-dao.compensation-period.tooltip.compensated-period')}</span>
<span>{t('nervos-dao.compensation-period.tooltip.days-hours', { days, hours })}</span>
</div>
<div className={styles.divider} />
<div className={styles.times}>
<div className={styles.immature}>{t('nervos-dao.compensation-period.tooltip.immature-for-withdraw')}</div>
</div>
</div>
)
}

let stage = 'normal'
if (baseEpochTimestamp > endingStartEpochTimestamp) {
Expand Down
34 changes: 26 additions & 8 deletions packages/neuron-ui/src/components/DataSetting/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const useDataPath = (
type: Parameters<typeof stopProcessMonitor>[0]
) => {
const [t] = useTranslation()
const [isSaving, setIsSaveing] = useState(false)
const [savingType, setSavingType] = useState<string | null>()
const [prevPath, setPrevPath] = useState<string>()
const [currentPath, setCurrentPath] = useState<string | undefined>()
const { dialogRef, openDialog, closeDialog } = useDialogWrapper()
Expand Down Expand Up @@ -49,21 +51,37 @@ export const useDataPath = (
}
})
}, [closeDialog, type])
const onConfirm = useCallback(() => {
setPath(currentPath!).then(res => {
if (isSuccessResponse(res)) {
setPrevPath(currentPath)
closeDialog()
}
})
}, [currentPath, closeDialog, setPrevPath, setPath])
const onConfirm = useCallback(
e => {
const { dataset } = e.currentTarget
setIsSaveing(true)
setSavingType(dataset.syncType)
setPath({
dataPath: currentPath!,
clearCache: type === 'ckb' && dataset?.resync === 'true',
})
.then(res => {
if (isSuccessResponse(res)) {
setPrevPath(currentPath)
closeDialog()
}
})
.finally(() => {
setIsSaveing(false)
setSavingType(null)
})
},
[currentPath, closeDialog, setPrevPath, setPath]
)
return {
prevPath,
currentPath,
onSetting,
dialogRef,
onCancel,
onConfirm,
isSaving,
savingType,
}
}

Expand Down
28 changes: 27 additions & 1 deletion packages/neuron-ui/src/components/DataSetting/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

.name {
font-weight: bold;
display: flex;
}

.content {
Expand Down Expand Up @@ -63,4 +64,29 @@
& > svg {
flex-shrink: 0;
}
}
}

.infoIconContainer {
position: relative;
display: inline-flex;
align-items: center;
padding-left: 4px;
z-index: 11;

&::after {
display: none;
position: absolute;
left: -20px;
top: 120%;
content: attr(data-tip);
padding: 4px 12px;
border-radius: 6px;
background: #cccccc;
font-weight: 300;
width: 400px;
}

&:hover::after {
display: block;
}
}
Loading