Skip to content

Commit

Permalink
fix: refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangbtmrk committed May 6, 2024
1 parent 9132fc1 commit 2c6eb80
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/util/asset_token_ext.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ extension AssetTokenExtension on AssetToken {
if (title == null) {
return null;
}
final displayTitle = title ?? '';
if (mintedAt != null) {
return '$displayTitle (${mintedAt!.year})';
}

return displayTitle;
return mintedAt != null ? '$title (${mintedAt!.year})' : title;
}

bool get hasMetadata => galleryThumbnailURL != null;
Expand Down

0 comments on commit 2c6eb80

Please sign in to comment.