Skip to content

Commit

Permalink
fix for sessionIds that dont have persona attached
Browse files Browse the repository at this point in the history
  • Loading branch information
endimion committed Jun 10, 2024
1 parent 26ff9b1 commit 7273605
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ function checkIfExistsIssuanceStatus(
if (index < 0) {
sessions.forEach((value, _index) => {
console.log("checking value to " + value.replace(/-persona=\s+$/, "") +"-checking vs" + sessionId)
if (value.replace(/-persona=\s+$/, "") === sessionId) {
if (value.replace(/-persona=.*$/, "") === sessionId) {
console.log("updated index")
index = _index;
}
Expand Down
3 changes: 2 additions & 1 deletion routes/verifierRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ verifierRouter.get(["/verificationStatus"], (req, res) => {
let index = sessions.indexOf(sessionId); // sessions.indexOf(sessionId+""); //
if (index < 0) {
sessions.forEach((value, _index) => {
if (value.replace(/-persona=\d+$/, "") === sessionId) {
if (value.replace(/-persona=.*$/, "") === sessionId) {
console.log("updated index");
index = _index;
}
});
Expand Down

0 comments on commit 7273605

Please sign in to comment.