Skip to content

Commit

Permalink
Merge pull request #3127 from nervosnetwork/rc/v0.114.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Apr 16, 2024
2 parents 4d3aa8b + 59fef75 commit 4cf6d96
Show file tree
Hide file tree
Showing 37 changed files with 415 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .ckb-light-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.6
v0.3.7
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.114.0
v0.115.0
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# 0.114.3 (2024-04-16)

### CKB Node & Light Client

- [[email protected]](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.
- [CKB Light [email protected]](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

### Assumed valid target

Block before `0x9443ad8da9172d484367bc5467988cba7a0c46028398309edfdda7d2d79be897`(at height `12,703,957`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/3123)

---

## New features

- #3054: Displaying DAO rewards.(@devchenyan)
- #3066: Support keeping screen awake.(@yanguoyu)

## Bug fixes

- #3055: Fix sending sudt to a new acp cell with extra 142 CKB by offline sign.(@yanguoyu)
- #3103: Handle MacOS crash properly on quitting.(@devchenyan)

## New Contributors

- @twhy made their first contribution in https://github.com/nervosnetwork/neuron/pull/3110

**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.114.2...v0.114.3

# 0.114.2 (2024-03-15)

### CKB Node & Light Client
Expand Down
2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[default.extend-words]
thur = "thur"
numer = "numer"
HD = "HD"
hd = "hd"

# defined in database schema
lastest = "lastest"
Expand Down
5 changes: 5 additions & 0 deletions compatible.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"fullVersions": [
"0.115",
"0.114",
"0.113",
"0.112",
Expand All @@ -20,6 +21,7 @@
"compatible": {
"0.111": {
"full": [
"0.115",
"0.114",
"0.113",
"0.112",
Expand All @@ -34,6 +36,7 @@
},
"0.110": {
"full": [
"0.115",
"0.114",
"0.113",
"0.112",
Expand Down Expand Up @@ -64,6 +67,7 @@
},
"0.112": {
"full": [
"0.115",
"0.114",
"0.113",
"0.112",
Expand All @@ -78,6 +82,7 @@
},
"0.114": {
"full": [
"0.115",
"0.114",
"0.113",
"0.112",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": ["packages/*"],
"version": "0.114.2",
"version": "0.114.3",
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
5 changes: 3 additions & 2 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.114.2",
"version": "0.114.3",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -64,7 +64,8 @@
"dependencies": {},
"resolutions": {
"@types/react": "18.2.45",
"react-i18next": ">=11.16.4"
"react-i18next": ">=11.16.4",
"react-refresh": "0.14.0"
},
"volta": {
"node": "20.10.0"
Expand Down
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.114.2",
"version": "0.114.3",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@import '../../styles/mixin.scss';

.container {
width: 680px;
}

.slider {
margin-top: 16px;
margin-top: 10px;

:global(.ms-Slider-thumb) {
top: -8px;
Expand Down Expand Up @@ -32,65 +36,89 @@
margin-top: 16px;
}

.depositValueLabel {
line-height: 20px;
color: var(--secondary-text-color);
font-size: 14px;
.depositValueLabelWrap {
display: flex;

.depositValueLabel {
line-height: 20px;
color: var(--secondary-text-color);
font-size: 14px;
}
.tooltip {
margin-left: 120px;
}
.tip {
width: 400px;
word-break: normal;
white-space: normal;
line-height: 180%;
}

svg {
margin: 2px 4px 0;
cursor: pointer;
path {
fill: var(--primary-color);
}
}
}

.fee {
display: flex;
justify-content: space-between;
font-size: 14px;
line-height: 20px;
margin-top: 4px;
color: var(--main-text-color);
gap: 24px;

& > div {
&:nth-last-child(1) {
width: 230px;
text-align: right;
&:first-child {
flex-shrink: 0;
}
}
}

.notice {
$lineHeight: 24px;
display: flex;
box-sizing: border-box;
margin-top: 22px;
border: 1px solid rgba(252, 136, 0, 0.2);
padding: 7px 54px;
border-radius: 4px;
background: #fff6eb;
color: #f68c2a;
font-weight: 500;
font-size: 12px;
line-height: $lineHeight;
text-align: center;

& > svg {
$size: 14px;
flex-shrink: 0;
margin: calc(($lineHeight - $size) / 2) 4px 0 0;
width: $size;
height: $size;

g[fill='#D50000'] {
fill: currentColor;
.rewards {
padding: 6px 16px;
background: var(--tag-green-bg-color);
border-radius: 8px;
margin-top: 14px;
div {
display: flex;
justify-content: space-between;
color: var(--primary-color);
p {
margin: 0;
padding: 4px 0;
font-size: 14px;
line-height: 20px;
}
}
}

@media (prefers-color-scheme: dark) {
border-color: #4b391c;
background: #4b391c;
.acpContent {
display: flex;
.tip {
min-width: 190px;
word-break: normal;
white-space: normal;
line-height: 180%;
}
svg {
margin: 2px 4px 0;
cursor: pointer;
path {
fill: var(--primary-color);
}
}
}

.rfcLink {
font-weight: 500;
font-size: 12px;
background: inherit;
color: #f68c2a;
color: var(--primary-color);
border: none;
padding: 0;
margin: 0;
Expand All @@ -111,6 +139,7 @@
gap: 8px;

& > svg {
flex-shrink: 0;
path {
fill: #e5e5e5;

Expand Down
33 changes: 33 additions & 0 deletions packages/neuron-ui/src/components/DepositDialog/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,36 @@ export const useOnDepositDialogCancel = ({
clearGeneratedTx()
}, [dispatch, onCloseDepositDialog, resetDepositValue, clearGeneratedTx])
}

export const useDepositRewards = ({
depositValue,
maxDepositValue,
disabled,
globalAPC,
}: {
depositValue: string
maxDepositValue: string | null
disabled: boolean
globalAPC: number
}) => {
const [annualRewards, monthRewards] = useMemo(() => {
if (disabled) return ['0', '0']

const value = CKBToShannonFormatter(
(Number(maxDepositValue || depositValue) - MIN_DEPOSIT_AMOUNT).toFixed(MAX_DECIMAL_DIGITS).toString()
)

const dpc = globalAPC / 365 / 100

const mRewards = (Number(value) * dpc * 30).toFixed(0).toString()

const rewerds = (Number(value) * dpc * 360).toFixed(0).toString()

return [rewerds, mRewards]
}, [depositValue, maxDepositValue, disabled, globalAPC])

return {
annualRewards,
monthRewards,
}
}
Loading

1 comment on commit 4cf6d96

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 8709866115

Please sign in to comment.