Skip to content

Commit

Permalink
Merge pull request #2552 from nervosnetwork/rc/v0.103.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Dec 21, 2022
2 parents bc8e13a + 4275a3d commit 454ba8f
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
node:
- 16.10.0
os:
- macos-latest
- macos-11
- ubuntu-20.04
- windows-2019

Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
path: |
node_modules
*/*/node_modules
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
key: 2022-12-21-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}

- name: Add msbuild to PATH
if: matrix.os == 'windows-2019'
Expand All @@ -67,7 +67,7 @@ jobs:
CI: false

- name: Package for MacOS
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-11'
run: |
./scripts/download-ckb.sh mac
yarn release mac
Expand Down Expand Up @@ -99,14 +99,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Neuron App Zip
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-11'
uses: actions/upload-artifact@v2
with:
name: Neuron-Mac
path: release/Neuron-*-mac.zip

- name: Upload Neuron Dmg
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-11'
uses: actions/upload-artifact@v2
with:
name: Neuron-Dmg
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
node:
- 16.10.0
os:
- macos-latest
- macos-11
- ubuntu-20.04
- windows-2019

Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
path: |
node_modules
*/*/node_modules
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
key: 2022-12-21-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}

- name: Add msbuild to PATH
if: matrix.os == 'windows-2019'
Expand All @@ -62,7 +62,7 @@ jobs:
CI: false

- name: Package for MacOS
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-11'
run: |
./scripts/download-ckb.sh mac
yarn package:test mac
Expand Down Expand Up @@ -94,14 +94,14 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Neuron App Zip
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-11'
uses: actions/upload-artifact@v2
with:
name: Neuron-Mac
path: release/Neuron-*-mac.zip

- name: Upload Neuron Dmg
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-11'
uses: actions/upload-artifact@v2
with:
name: Neuron-Dmg
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 0.103.3 (2022-12-21)

### Certificate

We've updated the certificate of Neuron for windows, which is issued by **DigiCert** and distributed to [Magickbase](https://github.com/Magickbase/), the active developer team of Neuron. With this update, a warning may appear on updating Neuron by `check for update` inside Neuron, please don't worry and download Neuron from [GitHub Release](https://github.com/nervosnetwork/neuron/releases) to adopt the new certificate.

### Bug Fixes

* #2551: Fix sending multisig tx when input cell's length is greater than 1.(@yanguoyu)


**Full Changelog**: https://github.com/nervosnetwork/neuron/compare/v0.103.2...v0.103.3



# 0.103.2 (2022-07-09)

### New features
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "0.103.2",
"version": "0.103.3",
"npmClient": "yarn",
"useWorkspaces": true
}
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.103.2",
"version": "0.103.3",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down
8 changes: 7 additions & 1 deletion packages/neuron-ui/src/components/PasswordRequest/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
OfflineSignType,
signAndExportTransaction,
requestOpenInExplorer,
invokeShowErrorMessage,
} from 'services/remote'
import { PasswordIncorrectException } from 'exceptions'
import DropdownButton from 'widgets/DropdownButton'
Expand Down Expand Up @@ -152,11 +153,16 @@ const PasswordRequest = () => {
break
}
await sendTransaction({ walletID, tx: generatedTx, description, password, multisigConfig })(dispatch).then(
(res: { result: string; status: number }) => {
(res: { result: string; status: number; message: string | { content: string } }) => {
if (isSuccessResponse(res)) {
requestOpenInExplorer({ type: 'transaction', key: res.result })
} else if (res.status === ErrorCode.PasswordIncorrect) {
throw new PasswordIncorrectException()
} else {
invokeShowErrorMessage({
title: t('messages.error'),
content: typeof res.message === 'string' ? res.message : res.message.content!,
})
}
}
)
Expand Down
4 changes: 2 additions & 2 deletions packages/neuron-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "Neuron",
"description": "CKB Neuron Wallet",
"homepage": "https://www.nervos.org/",
"version": "0.103.2",
"version": "0.103.3",
"private": true,
"author": {
"name": "Nervos Core Dev",
Expand Down Expand Up @@ -91,7 +91,7 @@
"eslint-plugin-prettier": "3.1.1",
"jest-when": "2.7.2",
"lint-staged": "9.2.5",
"neuron-ui": "0.103.2",
"neuron-ui": "0.103.3",
"prettier": "1.19.1",
"rimraf": "3.0.0",
"ttypescript": "1.5.10",
Expand Down
3 changes: 0 additions & 3 deletions packages/neuron-wallet/src/services/transaction-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@ export default class TransactionSender {
const lockArgs: string = input.lock!.args!
const wit: WitnessArgs | string = tx.witnesses[index]
const witnessArgs: WitnessArgs = wit instanceof WitnessArgs ? wit : WitnessArgs.generateEmpty()
if (typeof wit === 'string' && wit.length) {
witnessArgs.lock = wit
}
return {
witnessArgs,
lockHash: input.lockHash!,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,47 @@ describe('TransactionSender Test', () => {
expect(res.witnesses[0]).toBe(expectedValue)
})
})

it(`input cell's length is 2`, async() => {
const addresses = [
'ckt1qyq89x5ggpt0a5epm2k2gyxeffwkgfdxeg0s543mh4',
'ckt1qyqql0vgjyxjxjxknkj6nq8jxa485xsyl66sy7c5f6'
]
const [multiArgs, multisigConfig] = createMultisigConfig(1, 1, addresses)
const addr = {
walletId: fakeWallet.id,
path: `m/44'/309'/0'/0/0`,
blake160: addressToScript(addresses[0]).args,
version: 'testnet'
}

const mockGAI = jest.fn()
mockGAI.mockReturnValueOnce([addr])
transactionSender.getAddressInfos = mockGAI.bind(transactionSender)
const tx = Transaction.fromObject(transcationObject)
tx.inputs[0]!.setLock(SystemScriptInfo.generateMultiSignScript(multiArgs))
tx.inputs.push(
Input.fromObject({
previousOutput: OutPoint.fromObject({
txHash: '0x1879851943fa686af29bed5c95acd566d0244e7b3ca89cf7c435622a5a5b4cb3',
index: '0x0'
}),
since: '0x0',
lock: Script.fromObject({
args: multiArgs,
codeHash: SystemScriptInfo.MULTI_SIGN_CODE_HASH,
hashType: SystemScriptInfo.MULTI_SIGN_HASH_TYPE
})
})
)
tx.witnesses = ['0x', '0x']
const res = await transactionSender.signMultisig(fakeWallet.id, tx, '1234', [multisigConfig])
expect(res.witnesses).toHaveLength(2)
expect(res.witnesses[1]).toBe('0x')
expect(res.witnesses[0]).toBe(
'0x810000001000000081000000810000006d00000000010102729a884056fed321daaca410d94a5d6425a6ca1f0fbd88910d2348d69da5a980f2376a7a1a04feb595163e5edf15f297453a64f3248c69823afcfdaabc6771b088e4f6250e2e2f91136f5c6a9cbf49a79d955644d7381481f3c5c8ab93bcc52a71de4b072e0697c001'
)
})
})
})
})

3 comments on commit 454ba8f

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

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

'
'### Downloads'
''
'OS | Arch | Package | SHA256 Checksum'
'-- | -- | -- | --'
'Windows | x64 | exe | 894cc0c0bdbc55c5d41f10bf4cd819c2154e165feb3871e04d2f58f1f2ef364f'
'macOS | x64 | zip | 525e16a5d22600924efe0837c248744a6b4a2e851dccd90536aad242c215e5d8'
'macOS | x64 | DMG | d1996ccf62e5783bf0e9f16673c2f2aee205c2c40c9738090696e6551be7e98a'
'Linux | x64 | AppImage | 5db4c7af21f55d550daabf0fa8113b2d9be21795b7485baf43ba10d36cc80c6f

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

Please sign in to comment.