Skip to content

Commit

Permalink
Fix: Release/1.3.1 (eu-digital-green-certificates#131)
Browse files Browse the repository at this point in the history
* no message

* added new UI

* Ticketing solution logic update

- Added model to handle QR scan from ticket service
- Added blueprint of method to obtain list of auth services

* Refactored list of service method

* Implemented method to fetch list of services

* added new UI

* server list view controller

* Access token for ticketing

- Request implemented
- Model for response added

* added selected and deselected state

* List of services implemented

* Public key generation added

* Small refactoring to avoid crash

* AccessTokenRequest fixed

- Filtering for certificates added

* Selection code adjusted with model

* Comment removed

* fixed small UI bugs

* Consent screen added

- request for validation added

* Fixed UI part of selection of cert

* xnonce added

* Fixed navigation in wallet app

* Fixed navigation and cells. Added Certificate controller to navigation.

* Added services controller

* Remove obsolete sources

* Removed unnecessary fields

* minor fixes

* Replaced x-buttons

* Removed unnecessary code

* Validation request added

* Refactored ut8 string to base64decoded data

* Code clean up

* Identity services refactored

* Code clean up

* Validation Result view controller added

* fixed QR class

* Fixed navigation

* Fixed navigation

* Bug fix session

eu-digital-green-certificates#108
eu-digital-green-certificates#111
eu-digital-green-certificates#113

* Added remove certificate functionality

* Added delete alert

* Fixed deleting

* Fixed reload bug in ListCertificates

* Add Developer Team

* Changed cert compare

* Fixed certificates table with edit

* Added 2 controller files to storyboard

* Fixed crash on verification result if no validation info passed

* Update project

* Scan Moved from Core

* Added viewers to storyboard

* Added remove messages to ImageViewer and PDF

* Fixed Remove action

* Removed xibs from controllers

* Minor fix storyboard

* Removed last xib

* Fixed deleting, crash with race and some textes

* Fix public in Date extention

* Added activity check

* Fixed crash with reload table

* Added flash of added item

* Added OK button

* Fixed rule cell

* Updated buttons

* Fixed Grant layout

* Minor fix

* Fix crash with adding certs

* minor fix

* Fix selecting of sertificates

* Added new version

* added logsto requests

* remove print

* Fixed posting certificates

* Added delete button

* Removed FloatingPanel, Added delete certificate button

* Finalized remove certificate

* Fixed layout

* Fixed deleting calbacks

* Removed FloatingPanel package

* Removed FloatingPanel resources

* removed unnecessary import directives

* Aded common core

* Removed errors with cert

* Fixed wallet app after core mege

* fix in project tree

* Access token info added on Certificate list screen

* fixed storyboards

* minor fixes

* Added activity indicator

* Added config

* Fixed navigation issues

* Fixed classe names in storyboards

* fixed fetch time

* Fixed reloadingData

* fixed storyboard - added reload cell

* Added reload after dismissing

* Fixed Scan of ticketing QR code

* minor changes in project tree

* Fixed page controller

* removed selected country code

* Fixed landscape orientation for iPad

* refactor UI cells

* increased build num

* temp data

* correct data

* fixed project settings

* Fixed issue - Certificate for Ticketing can not be found

* Added loading to confirm validity

* x5c type changed in PublicKeyJWK structure

Replaced x5c type of String with [String] in order to follow backend changes

* Refactor controller names and data managers

* fixed crash in ticketing

* Business data were removed from TicketingAcceptanceController controller

* Fixed back buttons

* added background

* Added Alerts to the Ticketing

* refactor project tree

* Replaced UserDefaults storage with keyChain

* removed queue from request

* Updated localization strings

* Changed in localizations

* Removed keys from Localization file

* Added Safe thread array.

* Fixed string format

* Added de-localization

* Added localisations to resource files

* Added app localised name

* Fixed localizations

* Added localized property. Added alert on save PDF, fixed alerts

* Optimised loading on main screen

* Fixed reload page on main screen

* Fixed layout in Image and PDF cells

* Fixed reload table on main screen

* upgrade version num

* Fixed Localized strings

* Added one line to localization

* Refactored Access Token functionality

* Added error processing to the ticketing

* Fix verification fields

* Fixed search of validation data

* Fixed main thread methods

* Fixed incorrect alert messages

* Updated localized strings

* Fixed json logic

* Added revocation to walllet

* removed database

* removed dismiss delegate (added timer)

* feat: revocation

* fix: revocation lookup

* chore: version 1.3.1

* fix: exp bug

* fix: certString contains revocation status

Co-authored-by: Alexandr Chernyy <[email protected]>
Co-authored-by: Illia Vlasov <[email protected]>
Co-authored-by: Test <[email protected]>
Co-authored-by: ikhomiak <[email protected]>
Co-authored-by: IgorKhomiak <[email protected]>
  • Loading branch information
6 people authored Mar 2, 2022
1 parent d23a50c commit 455a15a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 46 deletions.
7 changes: 4 additions & 3 deletions DGCAWallet/Components/WalletCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ class WalletCell: UITableViewCell {

func setupCell(_ dated: DatedCertString) {
guard let cert = dated.cert else { return }

typeLabel.text = cert.certTypeString
nameLabel.text = cert.fullName
dateLabel.text = String(format: "Scanned %@".localized, dated.date.localDateString)
guard let cert = dated.cert else { return }
revocationLabel.isHidden = cert.isRevoked ?? true
revocationLabel.text = cert.isRevoked == true ? "Certificate revoked" : ""
if let isRevoked = cert.isRevoked {
revocationLabel.isHidden = !isRevoked
}
revocationLabel.text = "Certificate revoked"
}
}
75 changes: 39 additions & 36 deletions DGCAWallet/Models/DataStorageManagement/DataStuctures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,58 @@
//
// Created by Igor Khomiak on 11/3/21.
//


import Foundation
import SwiftDGC
import CertLogic

class DatedCertString: Codable {
var isSelected: Bool = false
let date: Date
let certString: String
let storedTAN: String?
var cert: HCert? {
return try? HCert(from: certString)
}


init(date: Date, certString: String, storedTAN: String?) {
self.date = date
self.certString = certString
self.storedTAN = storedTAN
}
var isSelected: Bool = false
let date: Date
let certString: String
let storedTAN: String?
var cert: HCert? {
return try? HCert(from: certString)
}

init(date: Date, certString: String, storedTAN: String?, isRevoked: Bool?) {
self.date = date
if isRevoked != nil && isRevoked == true {
self.certString = "x" + certString
} else {
self.certString = certString
}
self.storedTAN = storedTAN
}
}

class LocalData: Codable {
var encodedPublicKeys = [String: [String]]()
var certStrings = [DatedCertString]()

var countryCodes = [CountryModel]()
var valueSets = [ValueSet]()
var rules = [Rule]()
var resumeToken: String?
var lastFetchRaw: Date?
var lastFetch: Date {
get {
lastFetchRaw ?? Date.distantPast
}
set {
lastFetchRaw = newValue
}
}
var config = Config.load()
var lastLaunchedAppVersion = "0.0"
var encodedPublicKeys = [String: [String]]()
var certStrings = [DatedCertString]()
var countryCodes = [CountryModel]()
var valueSets = [ValueSet]()
var rules = [Rule]()
var resumeToken: String?
var lastFetchRaw: Date?
var lastFetch: Date {
get {
lastFetchRaw ?? Date.distantPast
}
set {
lastFetchRaw = newValue
}
}
var config = Config.load()
var lastLaunchedAppVersion = "0.0"
}

class ImageDataStorage: Codable {
var images = [SavedImage]()
var images = [SavedImage]()
}

class PdfDataStorage: Codable {
var pdfs = [SavedPDF]()
var pdfs = [SavedPDF]()
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class LocalDataManager {
}

func add(_ cert: HCert, with tan: String?, completion: @escaping DataCompletionHandler) {
localData.certStrings.append(DatedCertString(date: Date(), certString: cert.fullPayloadString, storedTAN: tan))
localData.certStrings.append(DatedCertString(date: Date(), certString: cert.fullPayloadString, storedTAN: tan, isRevoked: cert.isRevoked))
storage.save(localData, completion: completion)
}

Expand Down
10 changes: 5 additions & 5 deletions DGCAWallet/Services/GatewayConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ class GatewayConnection: ContextConnection {
let revokedHashes = response as [String]
for revokedHash in revokedHashes {
certs.forEach { date, cert in
if revokedHash.elementsEqual(cert.uvciHash!.toHexString()) ||
revokedHash.elementsEqual(cert.signatureHash!.toHexString()) ||
revokedHash.elementsEqual(cert.countryCodeUvciHash!.toHexString()) {
if revokedHash.elementsEqual(cert.uvciHash![0..<cert.uvciHash!.count/2].toHexString()) ||
revokedHash.elementsEqual(cert.signatureHash![0..<cert.signatureHash!.count/2].toHexString()) ||
revokedHash.elementsEqual(cert.countryCodeUvciHash![0..<cert.countryCodeUvciHash!.count/2].toHexString()) {
cert.isRevoked = true
// remove old certificate and add new
DataCenter.localDataManager.remove(withDate: date) { status in
Expand Down Expand Up @@ -177,7 +177,7 @@ class GatewayConnection: ContextConnection {
}

}

/*
static func fetchContext(completion: @escaping CompletionHandler) {
request( ["context"] ).response {
guard let data = $0.data, let string = String(data: data, encoding: .utf8) else { return }
Expand All @@ -192,7 +192,7 @@ class GatewayConnection: ContextConnection {
completion()
}
}
}
}*/

static var config: JSON {
return DataCenter.localDataManager.versionedConfig
Expand Down
2 changes: 1 addition & 1 deletion DGCAWallet/Storyboards/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@
</scenes>
<designables>
<designable name="MID-ne-Jur">
<size key="intrinsicContentSize" width="88" height="39"/>
<size key="intrinsicContentSize" width="112" height="51"/>
</designable>
<designable name="Rcx-o5-KDY">
<size key="intrinsicContentSize" width="71" height="51"/>
Expand Down

0 comments on commit 455a15a

Please sign in to comment.