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.112.0 #2956

Merged
merged 18 commits into from
Nov 24, 2023
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
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.0
v0.3.1
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.111.0
v0.112.1
2 changes: 1 addition & 1 deletion .github/workflows/update_ckb_client_versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: update_versions
run: |
npm run update:client-versions
git add .ckb-version .ckb-light-version
git add .ckb-version .ckb-light-version compatible.json

- name: Set GPG
uses: crazy-max/ghaction-import-gpg@v5
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/update_neuron_compatible.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Update Neuron compatibility table

on:
push:
branches:
- 'rc/**'
paths:
- 'package.json'

jobs:
update-neuron-compatible:
name: Update Neuron compatibility table
runs-on: ubuntu-latest
permissions:
pull-requests: write # open PR
contents: write # update version files

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x

- name: Update versions
id: update_versions
run: |
npm run update:neuron-compatible
git add compatible.json

- name: Set GPG
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true

- name: Open PR to RC branch
uses: peter-evans/create-pull-request@v5
with:
title: Update Neuron compatibility table
commit-message: 'feat: Update Neuron compatibility table'
body: 'Update Neuron compatibility table for a new release'
committer: Chen Yu <[email protected]>
branch: update-neuron-compatible
base: ${{ github.ref_name }}
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# 0.112.0 (2023-11-27)

### CKB Node & Light Client

- [[email protected]](https://github.com/nervosnetwork/ckb/releases/tag/v0.112.1) was released on Nov. 21st, 2023. 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.1) was released on Nov. 22nd, 2023. This version of CKB Light Client is now bundled and preconfigured in Neuron

### Assumed valid target

Block before `0xef2e2f0ee78e8fcf5bb5ad16892a49724e5f2d4fbc2779396e3d6c93100b9275`(at height `11,373,036`) will be skipped in validation.(https://github.com/nervosnetwork/neuron/pull/2955)

---

## New features

- #2810: Support Spore Protocol.(@homura)
- #2916: Add light client in compatibility table.(@yanguoyu)
- #2926: Refactor switch between light client mainnet and light client testnet to make it more intuitive.(@yanguoyu)

## Bug fixes

- #2928: Fix condition of compatibility alert.(@yanguoyu)
- #2935: Fix migration settings.(@yanguoyu)
- #2945: Fix Nervos DAO withdrawal on light client mode.(@homura)
- #2944: Fix requests jam when a synced transaction includes cellbase cells.(@yanguoyu)


**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.111.1...v0.112.0


# 0.111.1 (2023-11-08)

### CKB Node & Light Client
Expand Down
6 changes: 0 additions & 6 deletions compatible.csv

This file was deleted.

72 changes: 72 additions & 0 deletions compatible.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"fullVersions": [
"0.112",
"0.111",
"0.110",
"0.109",
"0.108",
"0.107",
"0.106",
"0.105",
"0.104",
"0.103"
],
"lightVersions": [
"0.3",
"0.2"
],
"compatible": {
"0.111": {
"full": [
"0.112",
"0.111",
"0.110",
"0.109"
],
"light": [
"0.3",
"0.2"
]
},
"0.110": {
"full": [
"0.112",
"0.111",
"0.110",
"0.109"
],
"light": [
"0.3",
"0.2"
]
},
"0.106": {
"full": [
"0.108",
"0.107",
"0.106",
"0.105"
],
"light": []
},
"0.103": {
"full": [
"0.104",
"0.103"
],
"light": []
},
"0.112": {
"full": [
"0.112",
"0.111",
"0.110",
"0.109"
],
"light": [
"0.3",
"0.2"
]
}
}
}
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.111.1",
"version": "0.112.0",
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
11 changes: 6 additions & 5 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.111.1",
"version": "0.112.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -37,23 +37,24 @@
"postinstall": "husky install",
"db:chain": "node ./node_modules/.bin/typeorm",
"update:valid-target": "node ./scripts/update-valid-target.js",
"update:neuron-compatible": "node ./scripts/add-neuron-version-in-compatibility-table.js",
"update:client-versions": "node ./scripts/update-ckb-client-versions.js"
},
"devDependencies": {
"@babel/core": "7.22.5",
"@babel/core": "7.23.2",
"@types/jest": "27.5.2",
"@types/node": "18.16.18",
"@types/npmlog": "4.1.4",
"@typescript-eslint/eslint-plugin": "5.60.1",
"@typescript-eslint/parser": "5.60.1",
"concurrently": "8.2.0",
"concurrently": "8.2.1",
"cross-env": "7.0.3",
"eslint": "8.38.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-prettier": "4.2.1",
"husky": "8.0.3",
"lerna": "7.1.0",
"lint-staged": "13.2.2",
"lint-staged": "13.3.0",
"ncp": "2.0.0",
"prettier": "2.8.8",
"ts-jest": "27.1.5",
Expand All @@ -62,7 +63,7 @@
},
"dependencies": {},
"resolutions": {
"@types/react": "17.0.62",
"@types/react": "17.0.65",
"react-i18next": ">=11.16.4",
"usb": "1.8.8"
},
Expand Down
12 changes: 7 additions & 5 deletions packages/neuron-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neuron-ui",
"version": "0.111.1",
"version": "0.112.0",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -50,6 +50,8 @@
"last 2 chrome versions"
],
"dependencies": {
"@ckb-lumos/base": "0.21.0-next.1",
"@ckb-lumos/codec": "0.21.0-next.1",
"@nervosnetwork/ckb-sdk-core": "0.109.0",
"@nervosnetwork/ckb-sdk-utils": "0.109.0",
"canvg": "2.0.0",
Expand All @@ -67,7 +69,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@babel/preset-typescript": "7.22.5",
"@babel/preset-typescript": "7.23.2",
"@storybook/addon-actions": "7.0.24",
"@storybook/addon-essentials": "7.0.24",
"@storybook/addon-interactions": "7.0.24",
Expand All @@ -80,10 +82,10 @@
"@types/enzyme": "3.10.13",
"@types/enzyme-adapter-react-16": "1.0.6",
"@types/node": "18.16.18",
"@types/react": "17.0.62",
"@types/react": "17.0.65",
"@types/react-dom": "17.0.20",
"@types/react-router-dom": "5.3.3",
"@types/styled-components": "5.1.26",
"@types/styled-components": "5.1.27",
"@wojtekmaj/enzyme-adapter-react-17": "0.8.0",
"babel-jest": "25.5.1",
"electron": "24.8.5",
Expand All @@ -99,7 +101,7 @@
"react-test-renderer": "16.14.0",
"storybook": "7.0.24",
"storybook-addon-react-router-v6": "1.0.2",
"webpack": "5.88.0"
"webpack": "5.88.2"
},
"resolutions": {
"react-i18next": "12.1.5"
Expand Down
27 changes: 23 additions & 4 deletions packages/neuron-ui/src/components/NFTSend/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React, { useState, useCallback, useReducer, useMemo, useRef, useEffect } from 'react'
import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { useState as useGlobalState, useDispatch, AppActions } from 'states'
import { AppActions, useDispatch, useState as useGlobalState } from 'states'
import { isMainnet as isMainnetUtil, isSuccessResponse, validateAddress } from 'utils'
import useGetCountDownAndFeeRateStats from 'utils/hooks/useGetCountDownAndFeeRateStats'
import TextField from 'widgets/TextField'
import Dialog from 'widgets/Dialog'
import { generateNFTSendTransaction } from 'services/remote'
import { isErrorWithI18n } from 'exceptions'
import styles from './NFTSend.module.scss'
import { NFTType } from '../SpecialAssetList'
import { generateSporeSendTransaction } from '../../services/remote/spore'

enum Fields {
Address = 'address',
Expand Down Expand Up @@ -38,7 +40,9 @@ const NFTSend = ({
onCancel,
cell,
onSuccess,
nftType = NFTType.NFT,
}: {
nftType?: NFTType
onCancel: () => void
cell: {
nftId: string
Expand Down Expand Up @@ -138,7 +142,17 @@ const NFTSend = ({
feeRate: `${suggestFeeRate}`,
}

generateNFTSendTransaction(params)
const generate = (() => {
switch (nftType) {
case NFTType.Spore: {
return generateSporeSendTransaction
}
default:
return generateNFTSendTransaction
}
})()

generate(params)
.then(res => {
if (isSuccessResponse(res)) {
globalDispatch({
Expand All @@ -156,10 +170,15 @@ const NFTSend = ({
return clearTimer
}, [isSubmittable, globalDispatch, sendState, walletId, outPoint, suggestFeeRate])

const displayNftType = (() => {
if (nftType === NFTType.Spore) return 'Spore'
return 'mNFT'
})()

return (
<Dialog
show
title={`${t('special-assets.transfer-nft')} #${nftId} mNFT`}
title={`${t('special-assets.transfer-nft')} #${nftId} ${displayNftType}`}
disabled={!isSubmittable}
onCancel={onCancel}
onConfirm={onSubmit}
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/components/NervosDAO/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ const NervosDAO = () => {
cacheTipBlockNumber,
currentTimestamp: Date.now(),
url: getCurrentUrl(networkID, networks),
networkID,
})

const MemoizedRecords = useMemo(() => {
Expand Down
Loading