Skip to content

Commit

Permalink
Merge branch 'nervosnetwork:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Aug 27, 2024
2 parents 13e7073 + 5c11fff commit 0f9b12c
Show file tree
Hide file tree
Showing 74 changed files with 797 additions and 241 deletions.
2 changes: 1 addition & 1 deletion .ckb-light-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.7
v0.3.8
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.116.1
v0.117.0
5 changes: 5 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ jobs:
env:
CI: false

# Inject LOG_ENCRYPTION_PUBLIC_KEY to encrypt sensitive log
- name: Inject environment variables
run: |
echo "LOG_ENCRYPTION_PUBLIC_KEY=${{ secrets.LOG_ENCRYPTION_PUBLIC_KEY }}" >> packages/neuron-wallet/.env
- name: Package for MacOS
if: matrix.os == 'macos-latest'
run: |
Expand Down
60 changes: 51 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
# 0.117.0 (2024-08-12)

### CKB Node & Light Client

- [[email protected]](https://github.com/nervosnetwork/ckb/releases/tag/v0.117.0) was released on Jul. 29th, 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 `0xca44ae8f7bc12ba8eab3224cbe3156c913e2284693e36dc1d01e4d30f362f3c2`(at height `13,705,152`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/3227)

---

[![[email protected]](https://github.com/user-attachments/assets/7d2eba67-e33e-4fca-a714-7ba1709d8bd3)](https://youtu.be/zf78Y094m60)

YouTube: https://youtu.be/zf78Y094m60

---

## New features

- #3206: Support XUDT asset management.(@yanguoyu)
- #3207: Support connecting to an external light client.(@devchenyan)
- #3167: Support cells consolidation.(@devchenyan)
- #3199: Validate pending transactions periodically.(@devchenyan)
- #3200: Optimize the process of generating a wallet.(@devchenyan)
- #3176: Support setting start block numbers of multisig addresses.(@yanguoyu)
- #3160: Optimize synchronization in light client mode for multiple wallets.(@yanguoyu)
- #3169: Be compatible with multisig transaction JSON file exported from CKB CLI.(@devchenyan)
- #3197: Support resetting pin code for window lock.(@yanguoyu)
- #3194: Add a tip for multisig addresses.(@yanguoyu)

## Bug fixes

- #3195: Fix the synchronization status check.(@yanguoyu)

## New Contributors

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

**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.116.2...v0.117.0

# 0.116.2 (2024-05-29)

### CKB Node & Light Client
Expand Down Expand Up @@ -57,18 +99,18 @@ YouTube: https://youtu.be/QXv8by2C8zU

## New features

- 3134: Support 'replace-by-fee' nervos dao transactions and sudt transactions.(@devchenyan)
- 3144: Reduce size of light client log in debug information and reveal start-block-number in log.(@yanguoyu)
- 3064: Support locking window by pin code.(@yanguoyu)
- 3131: Add detailed result for nervos dao transaction.(@devchenyan)
- #3134: Support 'replace-by-fee' nervos dao transactions and sudt transactions.(@devchenyan)
- #3144: Reduce size of light client log in debug information and reveal start-block-number in log.(@yanguoyu)
- #3064: Support locking window by pin code.(@yanguoyu)
- #3131: Add detailed result for nervos dao transaction.(@devchenyan)

## Bug fixes

- 3121: Locate the first transaction on Explorer directly when users want to set the start-block-number for light client.(@yanguoyu)
- 3101: Show migration instruction properly.(@devchenyan)
- 3062: Migrate legacy ACP to active ACP account(@yanguoyu)
- 3141: Fix some issues about light client synchronizaiton.(@yanguoyu)
- 3120: Remove all sync data when start-block-number is set less than before.(@yanguoyu)
- #3121: Locate the first transaction on Explorer directly when users want to set the start-block-number for light client.(@yanguoyu)
- #3101: Show migration instruction properly.(@devchenyan)
- #3062: Migrate legacy ACP to active ACP account(@yanguoyu)
- #3141: Fix some issues about light client synchronizaiton.(@yanguoyu)
- #3120: Remove all sync data when start-block-number is set less than before.(@yanguoyu)

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

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ $ yarn start:ui
$ yarn start:wallet
```

If you want to develop with devnet, replace the testnet script with the dev script in the `packages/neuron-wallet/.env` file.

Here is a script env example, it is constructed by network、script name and filed name.

```
TESTNET_SUDT_DEP_TXHASH=0xe12877ebd2c3c364dc46c5c992bcfaf4fee33fa13eebdf82c591fc9825aab769
TESTNET_SUDT_DEP_INDEX=0
TESTNET_SUDT_DEP_TYPE=code
TESTNET_SUDT_SCRIPT_CODEHASH=0xc5e5dcf215925f7ef4dfaf5f4b4f105bc321c02776d6e7d52a1db3fcd9d011a4
TESTNET_SUDT_SCRIPT_HASHTYPE=type
```

### Test

```shell
Expand Down
1 change: 1 addition & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ thur = "thur"
numer = "numer"
HD = "HD"
hd = "hd"
passin = 'passin'

# defined in database schema
lastest = "lastest"
Expand Down
23 changes: 23 additions & 0 deletions compatible.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"fullVersions": [
"0.117",
"0.116",
"0.115",
"0.114",
Expand All @@ -22,6 +23,7 @@
"compatible": {
"0.111": {
"full": [
"0.117",
"0.116",
"0.115",
"0.114",
Expand All @@ -38,6 +40,7 @@
},
"0.110": {
"full": [
"0.117",
"0.116",
"0.115",
"0.114",
Expand Down Expand Up @@ -70,6 +73,7 @@
},
"0.112": {
"full": [
"0.117",
"0.116",
"0.115",
"0.114",
Expand All @@ -86,6 +90,7 @@
},
"0.114": {
"full": [
"0.117",
"0.116",
"0.115",
"0.114",
Expand All @@ -102,6 +107,24 @@
},
"0.116": {
"full": [
"0.117",
"0.116",
"0.115",
"0.114",
"0.113",
"0.112",
"0.111",
"0.110",
"0.109"
],
"light": [
"0.3",
"0.2"
]
},
"0.117": {
"full": [
"0.117",
"0.116",
"0.115",
"0.114",
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.116.2",
"version": "0.117.0",
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
2 changes: 1 addition & 1 deletion 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.116.2",
"version": "0.117.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
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.116.2",
"version": "0.117.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,11 @@ export const useInitialize = ({
const fetchInitData = useCallback(async () => {
const res = await getOnChainTransaction(tx.hash)
const {
// @ts-expect-error Replace-By-Fee (RBF)
min_replace_fee: minFee,
minReplaceFee,
transaction: { outputsData },
} = res

if (!minFee) {
if (!minReplaceFee) {
setIsConfirmedAlertShown(true)
}

Expand All @@ -60,8 +59,8 @@ export const useInitialize = ({
})

setSize(txResult.size)
if (minFee) {
const mPrice = ((BigInt(minFee) * BigInt(FEE_RATIO)) / BigInt(txResult.size)).toString()
if (minReplaceFee) {
const mPrice = ((BigInt(minReplaceFee) * BigInt(FEE_RATIO)) / BigInt(txResult.size)).toString()
setMinPrice(mPrice)
setPrice(mPrice)
}
Expand All @@ -83,9 +82,8 @@ export const useInitialize = ({

const onSubmit = useCallback(async () => {
try {
// @ts-expect-error Replace-By-Fee (RBF)
const { min_replace_fee: minFee } = await getOnChainTransaction(tx.hash)
if (!minFee) {
const { minReplaceFee } = await getOnChainTransaction(tx.hash)
if (!minReplaceFee) {
setIsConfirmedAlertShown(true)
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ $noticeHeight: 60px;
padding: 20px 16px 18px;
border-radius: 16px;
margin-bottom: 16px;
.addresstField {
font-family: 'JetBrains Mono';
}
.textFieldClass {
margin-bottom: 10px;
}
Expand Down
14 changes: 6 additions & 8 deletions packages/neuron-ui/src/components/AmendSUDTSend/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ export const useInitialize = ({

const fetchInitData = useCallback(async () => {
const {
// @ts-expect-error Replace-By-Fee (RBF)
min_replace_fee: minFee,
minReplaceFee,
transaction: { outputsData },
} = await getOnChainTransaction(hash)
if (!minFee) {
if (!minReplaceFee) {
setIsConfirmedAlertShown(true)
}

Expand All @@ -76,8 +75,8 @@ export const useInitialize = ({
setTransaction({ ...tx, outputsData })

setSize(tx.size)
if (minFee) {
const mPrice = ((BigInt(minFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString()
if (minReplaceFee) {
const mPrice = ((BigInt(minReplaceFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString()
setMinPrice(mPrice)
setPrice(mPrice)
}
Expand All @@ -98,9 +97,8 @@ export const useInitialize = ({
return
}
try {
// @ts-expect-error Replace-By-Fee (RBF)
const { min_replace_fee: minFee } = await getOnChainTransaction(hash)
if (!minFee) {
const { minReplaceFee } = await getOnChainTransaction(hash)
if (!minReplaceFee) {
setIsConfirmedAlertShown(true)
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ $noticeHeight: 60px;
padding: 20px 16px 18px;
border-radius: 16px;
margin-bottom: 16px;
.addresstField {
font-family: 'JetBrains Mono';
}
.textFieldClass {
margin-bottom: 10px;
}
Expand Down
14 changes: 6 additions & 8 deletions packages/neuron-ui/src/components/AmendSend/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ export const useInitialize = ({
const fetchInitData = useCallback(async () => {
const res = await getOnChainTransaction(hash)
const {
// @ts-expect-error Replace-By-Fee (RBF)
min_replace_fee: minFee,
minReplaceFee,
transaction: { outputsData },
} = res
if (!minFee) {
if (!minReplaceFee) {
setIsConfirmedAlertShown(true)
}

Expand All @@ -87,8 +86,8 @@ export const useInitialize = ({
})

setSize(tx.size)
if (minFee) {
const mPrice = ((BigInt(minFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString()
if (minReplaceFee) {
const mPrice = ((BigInt(minReplaceFee) * BigInt(FEE_RATIO)) / BigInt(tx.size)).toString()
setMinPrice(mPrice)
updateTransactionPrice(mPrice)
}
Expand All @@ -113,9 +112,8 @@ export const useInitialize = ({
return
}
try {
// @ts-expect-error Replace-By-Fee (RBF)
const { min_replace_fee: minFee } = await getOnChainTransaction(hash)
if (!minFee) {
const { minReplaceFee } = await getOnChainTransaction(hash)
if (!minReplaceFee) {
setIsConfirmedAlertShown(true)
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@
border: 1px solid var(--divide-line-color);
background-color: var(--secondary-background-color);
position: relative;
overflow: hidden;

& > div {
position: absolute;
left: -1px;
top: -1px;
height: 100%;
border-radius: 8px;
Expand Down
3 changes: 1 addition & 2 deletions packages/neuron-ui/src/components/History/RowExtend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ const RowExtend = ({ column, columns, isMainnet, id, bestBlockNumber, isWatchOnl
setAmendabled(false)
if (status !== 'success' && column.type !== 'receive' && !isWatchOnly) {
getOnChainTransaction(hash).then(tx => {
// @ts-expect-error Replace-By-Fee (RBF)
const { min_replace_fee: minReplaceFee } = tx
const { minReplaceFee } = tx
if (minReplaceFee) {
setAmendabled(true)
}
Expand Down
6 changes: 1 addition & 5 deletions packages/neuron-ui/src/components/MultisigAddress/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ const MultisigAddress = () => {
const { deleteAction, infoAction, sendAction, approveAction } = useActions({ deleteConfigById })
const [showDeleteDialog, setShowDeleteDialog] = useState(false)

const showMainDialog = useMemo(
() => !(infoAction.isDialogOpen || sendAction.isDialogOpen || approveAction.isDialogOpen || isCreateDialogOpen),
[infoAction.isDialogOpen, sendAction.isDialogOpen, approveAction.isDialogOpen, isCreateDialogOpen]
)
const onClickItem = useCallback(
(multisigConfig: MultisigConfig) => (e: React.SyntheticEvent<HTMLButtonElement>) => {
const {
Expand Down Expand Up @@ -226,7 +222,7 @@ const MultisigAddress = () => {
return (
<div>
<Dialog
show={showMainDialog}
show
title={
<div ref={titleRef} className={styles.title}>
{t('multisig-address.window-title')}
Expand Down
Loading

0 comments on commit 0f9b12c

Please sign in to comment.