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

shareDescription always being empty #39

Open
AyushBherwani1998 opened this issue Jan 24, 2025 · 5 comments
Open

shareDescription always being empty #39

AyushBherwani1998 opened this issue Jan 24, 2025 · 5 comments

Comments

@AyushBherwani1998
Copy link
Member

Description

shareDescriptions in MpcKeyDetails is always empty. Also, it should be a Dictionary instead of an JSON encoded string.

@metalurgical
Copy link
Contributor

Was the description set? If no, then this is correct.

No, we don't want dictionaries being created from json. It'll just end up back with the whole anycodable nonsense we spent a lot of time correcting.

@AyushBherwani1998
Copy link
Member Author

For the first, share a description that at least has information on the type of the factor. This is very important for deleteFactor functionality. getAllFactorPub has just a list of factors pub key, and can't be determined what type of factor it's to delete.

You can check the web implementation, it returns Map of factor pubs with it's information like type and any additional metadata.

@metalurgical
Copy link
Contributor

If the description has not been added using this function, then there is nothing to return:
https://github.com/tkey/tkey-mpc-swift/blob/74ea5301e316163b48e653ba107fd9edd4fe6bf8/Sources/ThresholdKey/ThresholdKey.swift#L797

If there are no descriptions set then there is nothing to return as finalKeyDetails.share_descriptions will be validly empty.

So were they set or not?

@AyushBherwani1998
Copy link
Member Author

The factor key type description is always mandatory when creating the factor so that information should be available regardless of whether the additional metadata is available.

@metalurgical
Copy link
Contributor

Ah, see what you mean. This will probably take a while to track down.

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

No branches or pull requests

2 participants