Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-3501] Fix UI issues for NFTs #1203

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions RadixWallet/Core/FeaturePrelude/AddressView/AddressDetails.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,18 @@ extension AddressDetails.State {

private extension OnLedgerEntity.Resource {
var resourceTitle: String? {
guard let name = metadata.name else {
return metadata.symbol
}
guard let symbol = metadata.symbol else {
return name
switch fungibility {
case .nonFungible:
return metadata.name
case .fungible:
guard let name = metadata.name else {
return metadata.symbol
}
guard let symbol = metadata.symbol else {
return name
}
return "\(name) (\(symbol))"
}
return "\(name) (\(symbol))"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extension NonFungibleAssetList.Row.View {
Thumbnail(.nft, url: viewStore.resource.metadata.iconURL, size: .small)

VStack(alignment: .leading, spacing: .small2) {
if let title = viewStore.resource.metadata.title {
if let title = viewStore.resource.metadata.name {
Text(title)
.foregroundColor(.app.gray1)
.lineSpacing(-4)
Expand Down
Loading