Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.114.3 #3127

Merged
merged 18 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3462268
chore(deps): bump ip from 2.0.0 to 2.0.1 (#3041)
dependabot[bot] Mar 19, 2024
0ac858e
chore(deps): bump undici from 5.28.2 to 5.28.3 (#3039)
dependabot[bot] Mar 20, 2024
68d77c4
chore(deps): bump follow-redirects from 1.15.4 to 1.15.6 (#3083)
dependabot[bot] Mar 21, 2024
baee37b
chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 (#3092)
dependabot[bot] Mar 22, 2024
acfe4b0
fix: typos error (#3104)
devchenyan Apr 7, 2024
4d1b3bb
fix: Fix sending sudt to a new acp cell with extra 142 CKB by offline…
yanguoyu Apr 8, 2024
2ec01b8
fix: Add react-refresh@0.14.0 to resolutions in root package.json (#3…
twhy Apr 8, 2024
7118fb2
Update ckb client versions (#3097)
github-actions[bot] Apr 8, 2024
129aa3c
fix: Neuron for MacOS crashes on quitting (#3103)
devchenyan Apr 10, 2024
f4027aa
chore(deps): bump undici from 5.28.3 to 5.28.4 in /packages/neuron-wa…
dependabot[bot] Apr 10, 2024
71bb064
refactor: rewrite shannonToCKB with lumos formatUnit (#3114)
twhy Apr 11, 2024
476e982
feat: Remove unnecessary package electron-build-env (#3116)
devchenyan Apr 11, 2024
e039824
feat: Displaying DAO rewards (#3054)
devchenyan Apr 11, 2024
3d3e767
feat: Keep screen awake (#3066)
yanguoyu Apr 12, 2024
de1df5d
refactor: rewrite sudtValueToAmount with formatUnit in neuron-wallet …
twhy Apr 12, 2024
5fe467e
Update ckb client versions (#3122)
github-actions[bot] Apr 13, 2024
f05cff7
chore: Update ckb node assume valid target (#3123)
github-actions[bot] Apr 14, 2024
59fef75
chore: update versions and changelogs
Keith-CY Apr 14, 2024
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-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

- [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.
- [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

### 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
Loading