Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/npm_and_yarn/undici-5.28.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Apr 10, 2024
2 parents 1205e92 + 7118fb2 commit 78e7f7b
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 19 deletions.
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
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
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: 2 additions & 0 deletions packages/neuron-ui/src/components/HardwareSign/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ export default ({
switch (offlineSignJSON?.type) {
case OfflineSignType.CreateSUDTAccount:
return 'create-sudt-account'
case OfflineSignType.SendAcpSUDTToNewCell:
return 'send-acp-sudt-to-new-cell'
case OfflineSignType.SendSUDT:
return 'send-sudt'
case OfflineSignType.UnlockDAO:
Expand Down
3 changes: 2 additions & 1 deletion packages/neuron-ui/src/components/PasswordRequest/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ export default ({
switch (actionType) {
case 'create-sudt-account':
return OfflineSignType.CreateSUDTAccount
case 'send-acp-sudt-to-new-cell':
return OfflineSignType.SendAcpSUDTToNewCell
case 'send-ckb-asset':
case 'send-acp-ckb-to-new-cell':
case 'send-acp-sudt-to-new-cell':
case 'transfer-to-sudt':
case 'send-sudt':
return OfflineSignType.SendSUDT
Expand Down
1 change: 1 addition & 0 deletions packages/neuron-ui/src/services/remote/offline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export enum OfflineSignType {
UnlockDAO = 'UnlockDAO',
CreateSUDTAccount = 'CreateSUDTAccount',
SendSUDT = 'SendSUDT',
SendAcpSUDTToNewCell = 'SendAcpSUDTToNewCell',
SendFromMultisigOnlySig = 'SendFromMultisigOnlySig',
Invalid = 'Invalid',
}
Expand Down
16 changes: 8 additions & 8 deletions packages/neuron-wallet/src/services/transaction-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,8 @@ export default class TransactionSender {

const currentNetwork = NetworksService.getInstance().getCurrent()
const rpcService = new RpcService(currentNetwork.remote, currentNetwork.type)
const depositeOutput = await CellsService.getLiveCell(outPoint)
if (!depositeOutput) {
const depositOutput = await CellsService.getLiveCell(outPoint)
if (!depositOutput) {
throw new CellIsNotYetLive()
}
const prevTx = await rpcService.getTransaction(outPoint.txHash)
Expand All @@ -690,7 +690,7 @@ export default class TransactionSender {
const tx: Transaction = await TransactionGenerator.startWithdrawFromDao(
walletID,
outPoint,
depositeOutput,
depositOutput,
depositBlockHeader!.number,
depositBlockHeader!.hash,
changeAddress!.address,
Expand Down Expand Up @@ -736,13 +736,13 @@ export default class TransactionSender {
if (!withdrawOutput.depositOutPoint) {
throw new Error('DAO has not finish step first withdraw')
}
const depositeTx = await rpcService.getTransaction(withdrawOutput.depositOutPoint.txHash)
if (!depositeTx?.txStatus.blockHash) {
throw new Error(`Get deposite block hash failed with tx hash ${withdrawOutput.depositOutPoint.txHash}`)
const depositTx = await rpcService.getTransaction(withdrawOutput.depositOutPoint.txHash)
if (!depositTx?.txStatus.blockHash) {
throw new Error(`Get deposit block hash failed with tx hash ${withdrawOutput.depositOutPoint.txHash}`)
}
const depositBlockHeader = await rpcService.getHeader(depositeTx.txStatus.blockHash)
const depositBlockHeader = await rpcService.getHeader(depositTx.txStatus.blockHash)
if (!depositBlockHeader) {
throw new Error(`Get Header failed with blockHash ${depositeTx.txStatus.blockHash}`)
throw new Error(`Get Header failed with blockHash ${depositTx.txStatus.blockHash}`)
}
const depositEpoch = this.parseEpoch(BigInt(depositBlockHeader.epoch))
const depositCapacity: bigint = BigInt(withdrawOutput.capacity)
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-wallet/tests/services/cells.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ describe('CellsService', () => {
)
).rejects.toThrow(new LiveCapacityNotEnough())
})
it('left capcity not enough for a cell throw CapacityNotEnoughForChange', async () => {
it('left capacity not enough for a cell throw CapacityNotEnoughForChange', async () => {
await createMultisigCell(toShannon('1000'), OutputStatus.Sent, multisigInfo)
await expect(
CellsService.gatherInputs(
Expand Down Expand Up @@ -660,7 +660,7 @@ describe('CellsService', () => {
)
).rejects.toThrow(new LiveCapacityNotEnough())
})
it('left capcity not enough for a cell throw CapacityNotEnoughForChange', async () => {
it('left capacity not enough for a cell throw CapacityNotEnoughForChange', async () => {
await expect(
CellsService.gatherInputs(
toShannon('990'),
Expand Down
7 changes: 1 addition & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17127,12 +17127,7 @@ react-is@^17.0.0, react-is@^17.0.1, react-is@^17.0.2:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-refresh@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==

react-refresh@^0.14.0:
[email protected], react-refresh@^0.11.0, react-refresh@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==
Expand Down

1 comment on commit 78e7f7b

@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 8627988645

Please sign in to comment.