diff --git a/Example/WalletApp/BusinessLayer/ListingsSertice/Listings.swift b/Example/WalletApp/BusinessLayer/ListingsSertice/Listings.swift index 176fc4d83..4ab2673c9 100644 --- a/Example/WalletApp/BusinessLayer/ListingsSertice/Listings.swift +++ b/Example/WalletApp/BusinessLayer/ListingsSertice/Listings.swift @@ -13,8 +13,8 @@ struct Listing: Codable { } let id: String let name: String - let description: String - let homepage: String - let image_url: ImageURL + let description: String? + let homepage: String? + let image_url: ImageURL? let dapp_url: String } diff --git a/Example/WalletApp/PresentationLayer/Wallet/Notifications/Models/ListingViewModel.swift b/Example/WalletApp/PresentationLayer/Wallet/Notifications/Models/ListingViewModel.swift index 7ae7ead37..08286926d 100644 --- a/Example/WalletApp/PresentationLayer/Wallet/Notifications/Models/ListingViewModel.swift +++ b/Example/WalletApp/PresentationLayer/Wallet/Notifications/Models/ListingViewModel.swift @@ -9,7 +9,7 @@ struct ListingViewModel: Identifiable { } var imageUrl: URL? { - return listing.image_url.md + return listing.image_url?.md } var title: String { @@ -17,11 +17,11 @@ struct ListingViewModel: Identifiable { } var subtitle: String { - return listing.description + return listing.description ?? "" } var appDomain: String? { - let url = listing.homepage + let url = listing.dapp_url return URL(string: url)?.host } } diff --git a/Example/WalletApp/PresentationLayer/Wallet/Notifications/NotificationsView.swift b/Example/WalletApp/PresentationLayer/Wallet/Notifications/NotificationsView.swift index 1098135dd..7bb2cb404 100644 --- a/Example/WalletApp/PresentationLayer/Wallet/Notifications/NotificationsView.swift +++ b/Example/WalletApp/PresentationLayer/Wallet/Notifications/NotificationsView.swift @@ -42,7 +42,7 @@ struct NotificationsView: View { } } .task { - try! await presenter.fetch() + try? await presenter.fetch() } }