Skip to content

Commit

Permalink
Fix claim_device.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed Jan 15, 2025
1 parent 9111465 commit 3d982d0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion client/src/parsec/claim_device.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ export class DeviceClaim {
if (!needsMocks()) {
const clientConfig = getClientConfig();
const result = await libparsec.claimerRetrieveInfo(clientConfig, eventCallback, invitationLink);
if (result.ok) {
if (result.ok && result.value.tag === AnyClaimRetrievedInfoTag.ShamirRecovery) {
throw Error('Shamir recovery is not supported yet');
}
if (result.ok && result.value.tag === AnyClaimRetrievedInfoTag.User) {
this.handle = result.value.handle;
this.greeter = result.value.greeterHumanHandle;
}
if (result.ok && result.value.tag === AnyClaimRetrievedInfoTag.Device) {
this.handle = result.value.handle;
this.greeter = result.value.greeterHumanHandle;
}
Expand Down

0 comments on commit 3d982d0

Please sign in to comment.