diff --git a/Kukai Mobile/Controls/ScanViewController.swift b/Kukai Mobile/Controls/ScanViewController.swift index a229de59..3b4854cb 100644 --- a/Kukai Mobile/Controls/ScanViewController.swift +++ b/Kukai Mobile/Controls/ScanViewController.swift @@ -353,9 +353,9 @@ class ScanViewController: UIViewController, AVCaptureMetadataOutputObjectsDelega if let metadataObject = metadataObjects.first { guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject else { return } guard let stringValue = readableObject.stringValue else { return } - AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate)) if previousString != stringValue { + AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate)) previousString = stringValue checkForBeaconAndReport(stringToCheck: stringValue) } @@ -363,7 +363,12 @@ class ScanViewController: UIViewController, AVCaptureMetadataOutputObjectsDelega } private func checkForBeaconAndReport(stringToCheck: String) { - if let data = Base58Check.decode(stringToCheck), let json = try? JSONSerialization.jsonObject(with: data) as? [String: String], let _ = json["relayServer"], let _ = json["publicKey"] { + + if stringToCheck.prefix(8) == "tezos://" { + self.windowError(withTitle: "error".localized(), description: "error-beacon-not-supported".localized()) + self.textfield.text = "" + + } else if let data = Base58Check.decode(stringToCheck), let json = try? JSONSerialization.jsonObject(with: data) as? [String: String], let _ = json["relayServer"], let _ = json["publicKey"] { self.windowError(withTitle: "error".localized(), description: "error-beacon-not-supported".localized()) self.textfield.text = "" diff --git a/Kukai Mobile/Modules/Discover/Cells/DiscoverFeaturedCell.swift b/Kukai Mobile/Modules/Discover/Cells/DiscoverFeaturedCell.swift index 5601c8b6..b3e2f960 100644 --- a/Kukai Mobile/Modules/Discover/Cells/DiscoverFeaturedCell.swift +++ b/Kukai Mobile/Modules/Discover/Cells/DiscoverFeaturedCell.swift @@ -113,7 +113,7 @@ extension DiscoverFeaturedCell: UICollectionViewDelegate, UICollectionViewDataSo guard let c = cell as? DiscoverFeaturedItemCell else { return } let item = discoverGroup.items[indexPath.row] - c.setupImage(imageURL: item.imageUri) + c.setupImage(imageURL: item.mobileCarouselUri) } func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { diff --git a/Kukai Mobile/Modules/Discover/Discover.storyboard b/Kukai Mobile/Modules/Discover/Discover.storyboard index a23d244d..0c3c1151 100644 --- a/Kukai Mobile/Modules/Discover/Discover.storyboard +++ b/Kukai Mobile/Modules/Discover/Discover.storyboard @@ -110,7 +110,7 @@ - + @@ -337,7 +337,7 @@ - + diff --git a/Kukai Mobile/Services/DiscoverService.swift b/Kukai Mobile/Services/DiscoverService.swift index a6ef8c84..30908c28 100644 --- a/Kukai Mobile/Services/DiscoverService.swift +++ b/Kukai Mobile/Services/DiscoverService.swift @@ -25,6 +25,7 @@ public struct DiscoverItem: Codable, Hashable, Identifiable { public let description: String @URLFromString public var imageUri: URL? + @URLFromString public var mobileCarouselUri: URL? @URLFromString public var projectURL: URL? }