Skip to content

Commit 4cf6d96

Browse files
authored
Merge pull request #3127 from nervosnetwork/rc/v0.114.3
2 parents 4d3aa8b + 59fef75 commit 4cf6d96

File tree

37 files changed

+415
-167
lines changed

37 files changed

+415
-167
lines changed

.ckb-light-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.3.6
1+
v0.3.7

.ckb-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.114.0
1+
v0.115.0

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# 0.114.3 (2024-04-16)
2+
3+
### CKB Node & Light Client
4+
5+
- [CKB@v0.114.0](https://github.com/nervosnetwork/ckb/releases/tag/v0.114.0) was released on Feb. 29st, 2024. This version of CKB node is now bundled and preconfigured in Neuron.
6+
- [CKB Light Client@v0.3.7](https://github.com/nervosnetwork/ckb-light-client/releases/tag/v0.3.7) was released on Apr. 13th, 2024. This version of CKB Light Client is now bundled and preconfigured in Neuron
7+
8+
### Assumed valid target
9+
10+
Block before `0x9443ad8da9172d484367bc5467988cba7a0c46028398309edfdda7d2d79be897`(at height `12,703,957`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/3123)
11+
12+
---
13+
14+
## New features
15+
16+
- #3054: Displaying DAO rewards.(@devchenyan)
17+
- #3066: Support keeping screen awake.(@yanguoyu)
18+
19+
## Bug fixes
20+
21+
- #3055: Fix sending sudt to a new acp cell with extra 142 CKB by offline sign.(@yanguoyu)
22+
- #3103: Handle MacOS crash properly on quitting.(@devchenyan)
23+
24+
## New Contributors
25+
26+
- @twhy made their first contribution in https://github.com/nervosnetwork/neuron/pull/3110
27+
28+
**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.114.2...v0.114.3
29+
130
# 0.114.2 (2024-03-15)
231

332
### CKB Node & Light Client

_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[default.extend-words]
22
thur = "thur"
33
numer = "numer"
4+
HD = "HD"
5+
hd = "hd"
46

57
# defined in database schema
68
lastest = "lastest"

compatible.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"fullVersions": [
3+
"0.115",
34
"0.114",
45
"0.113",
56
"0.112",
@@ -20,6 +21,7 @@
2021
"compatible": {
2122
"0.111": {
2223
"full": [
24+
"0.115",
2325
"0.114",
2426
"0.113",
2527
"0.112",
@@ -34,6 +36,7 @@
3436
},
3537
"0.110": {
3638
"full": [
39+
"0.115",
3740
"0.114",
3841
"0.113",
3942
"0.112",
@@ -64,6 +67,7 @@
6467
},
6568
"0.112": {
6669
"full": [
70+
"0.115",
6771
"0.114",
6872
"0.113",
6973
"0.112",
@@ -78,6 +82,7 @@
7882
},
7983
"0.114": {
8084
"full": [
85+
"0.115",
8186
"0.114",
8287
"0.113",
8388
"0.112",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"packages": ["packages/*"],
3-
"version": "0.114.2",
3+
"version": "0.114.3",
44
"npmClient": "yarn",
55
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
66
}

package.json

Lines changed: 3 additions & 2 deletions
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.114.2",
5+
"version": "0.114.3",
66
"private": true,
77
"author": {
88
"name": "Nervos Core Dev",
@@ -64,7 +64,8 @@
6464
"dependencies": {},
6565
"resolutions": {
6666
"@types/react": "18.2.45",
67-
"react-i18next": ">=11.16.4"
67+
"react-i18next": ">=11.16.4",
68+
"react-refresh": "0.14.0"
6869
},
6970
"volta": {
7071
"node": "20.10.0"

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.114.2",
3+
"version": "0.114.3",
44
"private": true,
55
"author": {
66
"name": "Nervos Core Dev",

packages/neuron-ui/src/components/DepositDialog/depositDialog.module.scss

Lines changed: 65 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@import '../../styles/mixin.scss';
22

3+
.container {
4+
width: 680px;
5+
}
6+
37
.slider {
4-
margin-top: 16px;
8+
margin-top: 10px;
59

610
:global(.ms-Slider-thumb) {
711
top: -8px;
@@ -32,65 +36,89 @@
3236
margin-top: 16px;
3337
}
3438

35-
.depositValueLabel {
36-
line-height: 20px;
37-
color: var(--secondary-text-color);
38-
font-size: 14px;
39+
.depositValueLabelWrap {
40+
display: flex;
41+
42+
.depositValueLabel {
43+
line-height: 20px;
44+
color: var(--secondary-text-color);
45+
font-size: 14px;
46+
}
47+
.tooltip {
48+
margin-left: 120px;
49+
}
50+
.tip {
51+
width: 400px;
52+
word-break: normal;
53+
white-space: normal;
54+
line-height: 180%;
55+
}
56+
57+
svg {
58+
margin: 2px 4px 0;
59+
cursor: pointer;
60+
path {
61+
fill: var(--primary-color);
62+
}
63+
}
3964
}
4065

4166
.fee {
4267
display: flex;
4368
justify-content: space-between;
4469
font-size: 14px;
4570
line-height: 20px;
71+
margin-top: 4px;
4672
color: var(--main-text-color);
73+
gap: 24px;
4774

4875
& > div {
49-
&:nth-last-child(1) {
50-
width: 230px;
51-
text-align: right;
76+
&:first-child {
77+
flex-shrink: 0;
5278
}
5379
}
5480
}
5581

56-
.notice {
57-
$lineHeight: 24px;
58-
display: flex;
59-
box-sizing: border-box;
60-
margin-top: 22px;
61-
border: 1px solid rgba(252, 136, 0, 0.2);
62-
padding: 7px 54px;
63-
border-radius: 4px;
64-
background: #fff6eb;
65-
color: #f68c2a;
66-
font-weight: 500;
67-
font-size: 12px;
68-
line-height: $lineHeight;
69-
text-align: center;
70-
71-
& > svg {
72-
$size: 14px;
73-
flex-shrink: 0;
74-
margin: calc(($lineHeight - $size) / 2) 4px 0 0;
75-
width: $size;
76-
height: $size;
77-
78-
g[fill='#D50000'] {
79-
fill: currentColor;
82+
.rewards {
83+
padding: 6px 16px;
84+
background: var(--tag-green-bg-color);
85+
border-radius: 8px;
86+
margin-top: 14px;
87+
div {
88+
display: flex;
89+
justify-content: space-between;
90+
color: var(--primary-color);
91+
p {
92+
margin: 0;
93+
padding: 4px 0;
94+
font-size: 14px;
95+
line-height: 20px;
8096
}
8197
}
98+
}
8299

83-
@media (prefers-color-scheme: dark) {
84-
border-color: #4b391c;
85-
background: #4b391c;
100+
.acpContent {
101+
display: flex;
102+
.tip {
103+
min-width: 190px;
104+
word-break: normal;
105+
white-space: normal;
106+
line-height: 180%;
107+
}
108+
svg {
109+
margin: 2px 4px 0;
110+
cursor: pointer;
111+
path {
112+
fill: var(--primary-color);
113+
}
86114
}
87115
}
88116

89117
.rfcLink {
90118
font-weight: 500;
91119
font-size: 12px;
92120
background: inherit;
93-
color: #f68c2a;
121+
color: var(--primary-color);
94122
border: none;
95123
padding: 0;
96124
margin: 0;
@@ -111,6 +139,7 @@
111139
gap: 8px;
112140

113141
& > svg {
142+
flex-shrink: 0;
114143
path {
115144
fill: #e5e5e5;
116145

packages/neuron-ui/src/components/DepositDialog/hooks.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,36 @@ export const useOnDepositDialogCancel = ({
275275
clearGeneratedTx()
276276
}, [dispatch, onCloseDepositDialog, resetDepositValue, clearGeneratedTx])
277277
}
278+
279+
export const useDepositRewards = ({
280+
depositValue,
281+
maxDepositValue,
282+
disabled,
283+
globalAPC,
284+
}: {
285+
depositValue: string
286+
maxDepositValue: string | null
287+
disabled: boolean
288+
globalAPC: number
289+
}) => {
290+
const [annualRewards, monthRewards] = useMemo(() => {
291+
if (disabled) return ['0', '0']
292+
293+
const value = CKBToShannonFormatter(
294+
(Number(maxDepositValue || depositValue) - MIN_DEPOSIT_AMOUNT).toFixed(MAX_DECIMAL_DIGITS).toString()
295+
)
296+
297+
const dpc = globalAPC / 365 / 100
298+
299+
const mRewards = (Number(value) * dpc * 30).toFixed(0).toString()
300+
301+
const rewerds = (Number(value) * dpc * 360).toFixed(0).toString()
302+
303+
return [rewerds, mRewards]
304+
}, [depositValue, maxDepositValue, disabled, globalAPC])
305+
306+
return {
307+
annualRewards,
308+
monthRewards,
309+
}
310+
}

0 commit comments

Comments
 (0)