-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -126,7 +126,11 @@ export class VcIssuer<DIDDoc extends object> { | |||
if (grants?.[PRE_AUTH_GRANT_LITERAL]) { | ||||
preAuthorizedCode = grants?.[PRE_AUTH_GRANT_LITERAL]?.[PRE_AUTH_CODE_LITERAL] | ||||
txCode = grants?.[PRE_AUTH_GRANT_LITERAL]?.tx_code | ||||
|
||||
if (txCode !== undefined) { | ||||
if (!txCode?.length) { | ||||
txCode.length = opts.pinLength ?? 4 | ||||
} | ||||
grants[PRE_AUTH_GRANT_LITERAL].tx_code = txCode | ||||
} | ||||
if (!preAuthorizedCode) { | ||||
|
@@ -187,7 +191,8 @@ export class VcIssuer<DIDDoc extends object> { | |||
lastUpdatedAt, | ||||
status, | ||||
notification_id: v4(), | ||||
...(userPin && { userPin }), | ||||
...(userPin && { txCode: userPin }), // We used to use userPin according to older specs. We map these onto txCode now. If both are used, txCode in the end wins, even if they are different | ||||
...(txCode && { txCode }), | ||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nklomp
Author
Contributor
|
export interface TxCode { |
@nklomp This line has to be removed since it will overwrite the value of the
userPin
in the line above.We do not need the save txCode on the low level since it's value is in the grants and therefore stored in the object