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

multi-level msig required cosignatures, txs issues fixed, signer selector&filter tree view, misc. bugfixes #1698

Merged

Conversation

yilmazbahadir
Copy link
Contributor

@yilmazbahadir yilmazbahadir commented Sep 8, 2021

fixes #1687 , #1688, #1697

Changes:

  • Signer class holds references to its parents as a tree (parentSigners), all Signer's requiredCosigApproval and requiredCosigRemovals are pre-calculated while constructing the tree. This info is used to decide on creating AGGREGATE_COMPLETE when there is only 1 cosigner needed to approve(minApproval === 1).

  • SignerSelector and SignerFilter dropdowns show signers as grouped and in a tree structure (starting from the leave(current account) going down to the root signer (supporting multiple, multi-level multisig structures)
    image

  • SignerSelector and SignerFilter components refactored to use the same base and became => SignerSelector, SignerListFilter => extending/using SignerBaseFilter

  • Several bugs noticed during the testing are fixed.

@yilmazbahadir yilmazbahadir force-pushed the fix/gh-1687-refactor-multilevel-msig-required-cosignatures branch from 635b073 to bea6972 Compare September 8, 2021 21:47
…fix: partial txs cannot be shown consistently issue fixed
@yilmazbahadir yilmazbahadir force-pushed the fix/gh-1687-refactor-multilevel-msig-required-cosignatures branch from bea6972 to a427920 Compare September 8, 2021 21:58
@cryptoBeliever
Copy link
Contributor

@yilmazbahadir all looks good for me 👍

@@ -736,7 +736,7 @@ export class FormTransferTransactionTs extends FormTransactionBase {
this.networkType,
this.networkConfiguration,
this.transactionFees,
this.currentSignerMultisigInfo ? this.currentSignerMultisigInfo.minApproval : this.selectedSigner.requiredCosignatures,
this.currentSignerMultisigInfo ? this.currentSignerMultisigInfo.minApproval : this.selectedSigner.requiredCosigApproval,
Copy link
Contributor

@bassemmagdy bassemmagdy Sep 13, 2021

Choose a reason for hiding this comment

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

Why not using the selectedSigner.requiredCosigApproval directly for both cases same as FormMetadataCreationTs.ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, just refactored this line.
After the signer changes in place, I think most of the places using currentSignerMultisigInfo can be refactored to use the signer instead. I just didn't want to make this PR too big and introduce too much change. But I think this line could be change, tested locally seems fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, We should do the other places in a separate PR.

AnthonyLaw
AnthonyLaw previously approved these changes Sep 14, 2021
@sonarcloud
Copy link

sonarcloud bot commented Sep 14, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@yilmazbahadir yilmazbahadir merged commit d0ae53e into dev Sep 14, 2021
@yilmazbahadir yilmazbahadir deleted the fix/gh-1687-refactor-multilevel-msig-required-cosignatures branch September 14, 2021 10:47
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.

Rewrite of multisigRequiredCosignatures and multisigRequiredCosignaturesForRemoval
4 participants