From cfe327537a9f683fa9313df8b140aa9dce1d41e5 Mon Sep 17 00:00:00 2001 From: Filippos Sakellaropoulos Date: Mon, 14 Oct 2024 01:19:12 +0300 Subject: [PATCH] Refactor EudiWallet.swift to handle pending issuance outcome --- Sources/EudiWalletKit/EudiWallet.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/EudiWalletKit/EudiWallet.swift b/Sources/EudiWalletKit/EudiWallet.swift index 1603198..7564ad6 100644 --- a/Sources/EudiWalletKit/EudiWallet.swift +++ b/Sources/EudiWalletKit/EudiWallet.swift @@ -205,7 +205,7 @@ public final class EudiWallet: ObservableObject, @unchecked Sendable { let issueReq = try IssueRequest(id: pendingDoc.id, docType: pendingDoc.docType, privateKeyType: pkt, keyData: pk) try await openId4VCIService.initSecurityKeys(pendingDoc.privateKeyType == .secureEnclaveP256) let outcome = try await openId4VCIService.resumePendingIssuance(pendingDoc: pendingDoc, webUrl: webUrl) - guard case .issued(_, _) = outcome else { return pendingDoc } + if case let .pending(_) = outcome { return pendingDoc } let res = try await finalizeIssuing(id: pendingDoc.id, data: outcome, docType: pendingDoc.docType, format: format, issueReq: issueReq, openId4VCIService: openId4VCIService) return res }