Fix nits
This commit is contained in:
Родитель
855a7e3697
Коммит
dbf02010e7
|
@ -3,7 +3,6 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
public protocol ResponseContaining {
|
||||
var audienceUrl: String { get }
|
||||
var audienceDid: String { get }
|
||||
|
|
|
@ -18,8 +18,13 @@ public struct PresentationResponseContainer: ResponseContaining {
|
|||
|
||||
public init(from presentationRequest: PresentationRequest, expiryInSeconds exp: Int = 3000) throws {
|
||||
|
||||
self.audienceUrl = presentationRequest.content.redirectURI ?? ""
|
||||
self.audienceDid = presentationRequest.content.issuer ?? ""
|
||||
guard let aud = presentationRequest.content.redirectURI,
|
||||
let did = presentationRequest.content.issuer else {
|
||||
throw PresentationResponseError.noAudienceSpecifiedInRequest
|
||||
}
|
||||
|
||||
self.audienceDid = did
|
||||
self.audienceUrl = aud
|
||||
self.request = presentationRequest
|
||||
self.expiryInSeconds = exp
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче