@cheqd/did-provider-cheqd 3.3.0-develop.2 → 3.3.0-develop.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cheqd/did-provider-cheqd",
3
- "version": "3.3.0-develop.2",
3
+ "version": "3.3.0-develop.3",
4
4
  "description": "Veramo SDK plugin for the did:cheqd DID method",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Cheqd Foundation Limited (https://github.com/cheqd)",
@@ -1988,7 +1988,7 @@ export class Cheqd implements IAgentPlugin {
1988
1988
  const statusList = await StatusList.decode({ encodedList: statusList2021 })
1989
1989
 
1990
1990
  // early exit, if already suspended
1991
- if (statusList.getStatus(Number(credential.credentialStatus.statusListIndex))) return { suspended: false } satisfies SuspensionResult
1991
+ if (statusList.getStatus(Number(credential.credentialStatus.statusListIndex))) return { suspended: true } satisfies SuspensionResult
1992
1992
 
1993
1993
  // update suspension status
1994
1994
  statusList.setStatus(Number(credential.credentialStatus.statusListIndex), true)
@@ -2112,11 +2112,11 @@ export class Cheqd implements IAgentPlugin {
2112
2112
  // parse status list 2021
2113
2113
  const statusList = await StatusList.decode({ encodedList: statusList2021 })
2114
2114
 
2115
- // early exit, if already suspended
2116
- if (statusList.getStatus(Number(credential.credentialStatus.statusListIndex))) return { unsuspended: false } satisfies UnsuspensionResult
2115
+ // early exit, if already unsuspended
2116
+ if (!statusList.getStatus(Number(credential.credentialStatus.statusListIndex))) return { unsuspended: true } satisfies UnsuspensionResult
2117
2117
 
2118
2118
  // update suspension status
2119
- statusList.setStatus(Number(credential.credentialStatus.statusListIndex), true)
2119
+ statusList.setStatus(Number(credential.credentialStatus.statusListIndex), false)
2120
2120
 
2121
2121
  // set in-memory status list ref
2122
2122
  const bitstring = await statusList.encode() as Bitstring