Skip to content

Commit

Permalink
[ABW-2051] NFT images not displaying (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
kugel3 committed Sep 1, 2023
1 parent a9668a9 commit 7445b00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Sources/Core/SharedModels/Assets/AccountPortfolio.swift
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,11 @@ extension [AccountPortfolio.NonFungibleResource.NonFungibleToken.NFTData] {
}

public var keyImageURL: URL? {
guard let string = self[Field.keyImageURL]?.string else { return nil }
return URL(string: string)
if let string = self[.keyImageURL]?.string {
return URL(string: string)
} else {
return self[.keyImageURL]?.url
}
}

public var tokenDescription: String? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ extension NonFungibleAssetList.Row.View {
}

private func rowView(_ viewStore: ViewStoreOf<NonFungibleAssetList.Row>) -> some SwiftUI.View {
HStack {
HStack(spacing: .small1) {
NFTThumbnail(viewStore.resource.iconURL, size: .small)

VStack(alignment: .leading, spacing: .small2) {
Text(viewStore.resource.name ?? "")
.foregroundColor(.app.gray1)
.lineSpacing(-4)
.textStyle(.secondaryHeader)

Text(viewStore.supply)
.font(.app.body2HighImportance)
.foregroundColor(.app.gray2)
}

Spacer()
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, .medium1)
.frame(height: headerHeight)
.background(.app.white)
Expand Down

0 comments on commit 7445b00

Please sign in to comment.