Skip to content

fix: Manage Nervos DAO with multisig address - #3329

Merged
Keith-CY merged 7 commits into
nervosnetwork:developfrom
devchenyan:fix-dao
Mar 20, 2025
Merged

fix: Manage Nervos DAO with multisig address#3329
Keith-CY merged 7 commits into
nervosnetwork:developfrom
devchenyan:fix-dao

Conversation

@Danie0918

Copy link
Copy Markdown

@Keith-CY Please have a review.

@Keith-CY
Keith-CY requested a review from Copilot March 14, 2025 06:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes and enhances the Nervos DAO management when using a multisig address. Key changes include:

  • Introducing daoDisabledMessage logic in the multisig address UI to control dialog rendering.
  • Refactoring multisig cell fetching by splitting getCells and getLiveCells, and adding a new method (saveMultisigDaoTx) to persist DAO-related transactions.
  • Updating cell query filters to restrict output statuses and defining a new constant (DAO_DATA).

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

File Description
packages/neuron-ui/src/components/MultisigAddress/index.tsx Adds daoDisabledMessage logic and displays an AlertDialog when necessary.
packages/neuron-wallet/src/services/multisig.ts Refactors cell fetching and introduces DAO transaction persistence logic.
packages/neuron-wallet/src/services/cells.ts Modifies output status filtering for cell balance calculations.
packages/neuron-wallet/src/utils/const.ts Adds the DAO_DATA constant to support DAO transaction processing.
Comments suppressed due to low confidence (3)

packages/neuron-ui/src/components/MultisigAddress/index.tsx:220

  • [nitpick] Consider renaming 'daoDisabledMessage' to a more descriptive name (e.g. 'daoWarningKey') to better reflect that it holds an i18n message key rather than a boolean flag.
return canSign ? 'dao-ledger-notice' : 'dao-hardware-not-match'

packages/neuron-wallet/src/services/multisig.ts:1

  • The method name 'removeDulpicateConfig' contains a typo. Rename it to 'removeDuplicateConfig' for clarity.
private static removeDulpicateConfig(multisigConfigs: MultisigConfig[]) {

packages/neuron-wallet/src/services/cells.ts:1339

  • The filter for output statuses was changed from '[OutputStatus.Live, OutputStatus.Sent]' to '[OutputStatus.Live]'. Please confirm that excluding 'Sent' outputs is intentional, as it might omit valid outputs from balance calculations.
statuses: [OutputStatus.Live],

Comment thread packages/neuron-ui/src/components/MultisigAddress/index.tsx Outdated
Comment thread packages/neuron-wallet/src/services/multisig.ts Outdated
Comment thread packages/neuron-wallet/src/services/multisig.ts Outdated
@devchenyan
devchenyan requested a review from Keith-CY March 14, 2025 12:00
Comment thread packages/neuron-ui/src/components/MultisigAddress/index.tsx Outdated
Comment thread packages/neuron-ui/src/components/WithdrawDialog/index.tsx
@silySuper

silySuper commented Mar 17, 2025

Copy link
Copy Markdown

/package
Packaging for test is done in 13893691008. @silySuper

@silySuper

silySuper commented Mar 17, 2025

Copy link
Copy Markdown

1.This package:https://github.com/nervosnetwork/neuron/actions/runs/13893691008
截屏2025-03-17 15 49 48
the latest version is normal.
https://github.com/nervosnetwork/neuron/releases

@devchenyan

devchenyan commented Mar 17, 2025

Copy link
Copy Markdown
Contributor Author

@silySuper

silySuper commented Mar 17, 2025

Copy link
Copy Markdown

/package
Packaging for test is done in 13896033871. @silySuper

@Keith-CY
Keith-CY added this pull request to the merge queue Mar 20, 2025
Merged via the queue into nervosnetwork:develop with commit 7f3bc48 Mar 20, 2025
@Keith-CY Keith-CY mentioned this pull request May 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants