Skip to content

Commit

Permalink
Merge pull request #1130 from WalletConnect/hotfix/listing-response-c…
Browse files Browse the repository at this point in the history
…hanged

[Notify] Listing decoding
  • Loading branch information
flypaper0 authored Sep 21, 2023
2 parents 8019f7a + a277497 commit 9f5719c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ struct ListingViewModel: Identifiable {
}

var imageUrl: URL? {
return listing.image_url.md
return listing.image_url?.md
}

var title: String {
return listing.name
}

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
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct NotificationsView: View {
}
}
.task {
try! await presenter.fetch()
try? await presenter.fetch()
}
}

Expand Down

0 comments on commit 9f5719c

Please sign in to comment.