Skip to content

Commit 5e5c406

Browse files
authored
Merge pull request nervosnetwork#3302 from nervosnetwork/rc/v0.121.0
2 parents 5d2ecf9 + 0b99eaf commit 5e5c406

File tree

34 files changed

+598
-58
lines changed

34 files changed

+598
-58
lines changed

.ckb-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.120.0
1+
v0.121.0-rc1
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Spam detection
2+
3+
on:
4+
issue_comment:
5+
types: [created, edited]
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
detect-spam:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Set up Node.js
15+
uses: actions/setup-node@main
16+
17+
- name: Check for Spam
18+
uses: actions/github-script@v7
19+
with:
20+
script: |
21+
const comment = process.env.COMMENT_BODY.toLowerCase()
22+
const spam_words = process.env.SPAM_WORDS.split(',').map(w => w.toLowerCase())
23+
const comment_id = process.env.COMMENT_ID
24+
const issue_number = process.env.ISSUE_NUMBER
25+
const owner = process.env.REPO_OWNER
26+
const repo = process.env.REPO_NAME
27+
const EXTERNAL_LINK_REGEXT = /https?:\/\/(?!((\w+\.)?github\.com|github\.com|(\w+\.)?magickbase\.com|(\w+\.)?nervos\.org))/gi
28+
if (spam_words.some(w => comment.includes(w))) {
29+
console.info(`Spam comment: ${comment}`)
30+
github.rest.issues.deleteComment({ owner, repo, comment_id })
31+
} else if (EXTERNAL_LINK_REGEXT.test(comment)) {
32+
console.info(`External link detected, append an annotation`)
33+
github.rest.issues.createComment({
34+
owner,
35+
repo,
36+
issue_number,
37+
body: `An external link is mentioned in the comment above. Please verify the link's safety before visiting.`
38+
})
39+
} else {
40+
console.info("No spam detected")
41+
}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
COMMENT_BODY: ${{ github.event.comment.body }}
45+
COMMENT_ID: ${{ github.event.comment.id }}
46+
ISSUE_NUMBER: ${{ github.event.issue.number }}
47+
REPO_OWNER: ${{github.repository_owner }}
48+
REPO_NAME: ${{ github.event.repository.name }}
49+
SPAM_WORDS: ${{ secrets.SPAM_WORDS }}

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# 0.121.0 (2025-01-16)
2+
3+
### CKB Node & Light Client
4+
5+
- [[email protected]](https://github.com/nervosnetwork/ckb/releases/tag/v0.121.0-rc1) was released on Jan. 9th, 2025. This version of CKB node is now bundled and preconfigured in Neuron.
6+
- [CKB Light [email protected]](https://github.com/nervosnetwork/ckb-light-client/releases/tag/v0.4.1) was released on Nov. 13th, 2024. This version of CKB Light Client is now bundled and preconfigured in Neuron
7+
8+
### Assumed valid target
9+
10+
Block before `0x1381f9e4f70ce521256c4095fa536d11165488171a8a2cbac687f8cf53907afa`(at height `15,119,157`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/3300)
11+
12+
---
13+
14+
## New features
15+
16+
- #3290: Support inspecting and exporting private key for specific addresses.(@devchenyan)
17+
- #3293: Refine interaction of Sign and Verify Message.(@devchenyan)
18+
19+
20+
**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.120.0...v0.121.0
21+
22+
123
# 0.120.0 (2024-12-13)
224

325
### CKB Node & Light Client

compatible.json

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"fullVersions": [
3+
"0.121",
34
"0.120",
45
"0.119",
56
"0.118",
@@ -27,6 +28,7 @@
2728
"compatible": {
2829
"0.111": {
2930
"full": [
31+
"0.121",
3032
"0.120",
3133
"0.119",
3234
"0.118",
@@ -48,6 +50,7 @@
4850
},
4951
"0.110": {
5052
"full": [
53+
"0.121",
5154
"0.120",
5255
"0.119",
5356
"0.118",
@@ -85,6 +88,7 @@
8588
},
8689
"0.112": {
8790
"full": [
91+
"0.121",
8892
"0.120",
8993
"0.119",
9094
"0.118",
@@ -106,6 +110,7 @@
106110
},
107111
"0.114": {
108112
"full": [
113+
"0.121",
109114
"0.120",
110115
"0.119",
111116
"0.118",
@@ -127,6 +132,7 @@
127132
},
128133
"0.116": {
129134
"full": [
135+
"0.121",
130136
"0.120",
131137
"0.119",
132138
"0.118",
@@ -148,6 +154,7 @@
148154
},
149155
"0.117": {
150156
"full": [
157+
"0.121",
151158
"0.120",
152159
"0.119",
153160
"0.118",
@@ -169,6 +176,8 @@
169176
},
170177
"0.119": {
171178
"full": [
179+
"0.121",
180+
"0.120",
172181
"0.119",
173182
"0.118",
174183
"0.117",
@@ -189,6 +198,30 @@
189198
},
190199
"0.120": {
191200
"full": [
201+
"0.121",
202+
"0.120",
203+
"0.119",
204+
"0.118",
205+
"0.117",
206+
"0.116",
207+
"0.115",
208+
"0.114",
209+
"0.113",
210+
"0.112",
211+
"0.111",
212+
"0.110",
213+
"0.109"
214+
],
215+
"light": [
216+
"0.4",
217+
"0.3",
218+
"0.2"
219+
]
220+
},
221+
"0.121": {
222+
"full": [
223+
"0.121",
224+
"0.120",
192225
"0.119",
193226
"0.118",
194227
"0.117",
@@ -208,4 +241,4 @@
208241
]
209242
}
210243
}
211-
}
244+
}

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.120.0",
5+
"version": "0.121.0",
66
"npmClient": "yarn",
77
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
88
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "neuron",
33
"productName": "Neuron",
44
"description": "CKB Neuron Wallet",
5-
"version": "0.120.0",
5+
"version": "0.121.0",
66
"private": true,
77
"author": {
88
"name": "Nervos Core Dev",

packages/neuron-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "neuron-ui",
3-
"version": "0.120.0",
3+
"version": "0.121.0",
44
"private": true,
55
"author": {
66
"name": "Nervos Core Dev",

packages/neuron-ui/src/components/AddressBook/addressBook.module.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,20 @@
168168
}
169169
}
170170

171+
.privateKey {
172+
background: transparent;
173+
border: none;
174+
cursor: pointer;
175+
&:hover {
176+
svg {
177+
g,
178+
path {
179+
stroke: var(--primary-color);
180+
}
181+
}
182+
}
183+
}
184+
171185
@media screen and (max-width: 1330px) {
172186
.container {
173187
.balance {

packages/neuron-ui/src/components/AddressBook/index.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { useTranslation } from 'react-i18next'
33
import { useState as useGlobalState, useDispatch } from 'states'
44
import Dialog from 'widgets/Dialog'
55
import CopyZone from 'widgets/CopyZone'
6-
import { Copy } from 'widgets/Icons/icon'
6+
import ViewPrivateKey from 'components/ViewPrivateKey'
7+
import { Copy, PrivateKey } from 'widgets/Icons/icon'
78
import Table, { TableProps, SortType } from 'widgets/Table'
89
import { shannonToCKBFormatter, useLocalDescription } from 'utils'
910
import { HIDE_BALANCE } from 'utils/const'
@@ -44,6 +45,7 @@ const AddressBook = ({ onClose }: { onClose?: () => void }) => {
4445

4546
const dispatch = useDispatch()
4647
const { onChangeEditStatus, onSubmitDescription } = useLocalDescription('address', walletId, dispatch)
48+
const [viewPrivateKeyAddress, setViewPrivateKeyAddress] = useState('')
4749

4850
const columns = useMemo<TableProps<State.Address>['columns']>(
4951
() => [
@@ -149,6 +151,21 @@ const AddressBook = ({ onClose }: { onClose?: () => void }) => {
149151
return 0
150152
},
151153
},
154+
{
155+
title: '',
156+
dataIndex: 'key',
157+
align: 'left',
158+
width: '40px',
159+
render(_, __, { address }) {
160+
return (
161+
<Tooltip tip={t('addresses.view-private-key')} placement="left">
162+
<button type="button" className={styles.privateKey} onClick={() => setViewPrivateKeyAddress(address)}>
163+
<PrivateKey />
164+
</button>
165+
</Tooltip>
166+
)
167+
},
168+
},
152169
],
153170
[t]
154171
)
@@ -179,6 +196,10 @@ const AddressBook = ({ onClose }: { onClose?: () => void }) => {
179196
}
180197
/>
181198
</div>
199+
200+
{!!viewPrivateKeyAddress && (
201+
<ViewPrivateKey address={viewPrivateKeyAddress} onClose={() => setViewPrivateKeyAddress('')} />
202+
)}
182203
</div>
183204
</Dialog>
184205
)

packages/neuron-ui/src/components/Receive/index.tsx

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Button from 'widgets/Button'
77
import CopyZone from 'widgets/CopyZone'
88
import QRCode from 'widgets/QRCode'
99
import Tooltip from 'widgets/Tooltip'
10-
import { AddressTransform, Download, Copy, Attention, SuccessNoBorder } from 'widgets/Icons/icon'
10+
import ViewPrivateKey from 'components/ViewPrivateKey'
11+
import { AddressTransform, Download, Copy, Attention, SuccessNoBorder, PrivateKey } from 'widgets/Icons/icon'
1112
import VerifyHardwareAddress from './VerifyHardwareAddress'
1213
import styles from './receive.module.scss'
1314
import { useCopyAndDownloadQrCode, useSwitchAddress } from './hooks'
@@ -29,6 +30,7 @@ export const AddressQrCodeWithCopyZone = ({
2930
)
3031

3132
const [isCopySuccess, setIsCopySuccess] = useState(false)
33+
const [showViewPrivateKey, setShowViewPrivateKey] = useState(false)
3234
const timer = useRef<ReturnType<typeof setTimeout>>()
3335
const { ref, onCopyQrCode, onDownloadQrCode, showCopySuccess } = useCopyAndDownloadQrCode()
3436

@@ -70,19 +72,27 @@ export const AddressQrCodeWithCopyZone = ({
7072
<CopyZone content={showAddress} className={styles.showAddress}>
7173
{showAddress}
7274
</CopyZone>
73-
<button
74-
type="button"
75-
className={styles.addressToggle}
76-
onClick={onClick}
77-
title={transformLabel}
78-
onFocus={stopPropagation}
79-
onMouseOver={stopPropagation}
80-
onMouseUp={stopPropagation}
81-
>
82-
<AddressTransform />
83-
{transformLabel}
84-
</button>
75+
<div className={styles.actionWrap}>
76+
<button
77+
type="button"
78+
className={styles.addressToggle}
79+
onClick={onClick}
80+
title={transformLabel}
81+
onFocus={stopPropagation}
82+
onMouseOver={stopPropagation}
83+
onMouseUp={stopPropagation}
84+
>
85+
<AddressTransform />
86+
{transformLabel}
87+
</button>
88+
<button type="button" className={styles.privateKey} onClick={() => setShowViewPrivateKey(true)}>
89+
<PrivateKey />
90+
{t('addresses.view-private-key')}
91+
</button>
92+
</div>
8593
</div>
94+
95+
{showViewPrivateKey && <ViewPrivateKey address={showAddress} onClose={() => setShowViewPrivateKey(false)} />}
8696
</div>
8797
)
8898
}

0 commit comments

Comments
 (0)