iancoleman / slip39

A web tool for SLIP39 mnemonic shares
https://iancoleman.io/slip39/
MIT License
54 stars 23 forks source link

Combining all shares of a group throws and error #7

Open grempe opened 4 years ago

grempe commented 4 years ago

Steps to reproduce:

1) Generate a 2/3 set of shares. 2) Copy all three shares 3) Paste all three shares into the Combine > Shares text box

Expected result: The proper secret is decoded, matching the original secret.

Actual result: An error is immediately shown in the UI: Error: Wrong number of mnemonic groups. Expected $groupThreshold groups, but undefined were provided.

This also behaves the same with 3/5 split. Where an error is thrown unless exactly three shares are provided.

It should be possible to reconstruct a split secret from all of the shares, not just threshold shares.

iancoleman commented 4 years ago

Yes I agree, where there's excess shares it would be good to use only the required number instead of showing an error. I'll add this feature.

Also related to https://github.com/iancoleman/slip39/issues/6 Improve error messages for share recovery