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

Fix activity list nft image url #343

Merged
merged 5 commits into from
May 27, 2024
Merged
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
9 changes: 9 additions & 0 deletions src/CAServer.Application/CAActivity/UserActivityAppService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,15 @@
{
activityDto.NftInfo.ImageUrl =
IpfsImageUrlHelper.TryGetIpfsImageUrl(activityDto.NftInfo.ImageUrl, _ipfsOptions?.ReplacedIpfsPrefix);
activityDto.ListIcon = activityDto.NftInfo.ImageUrl;
}

if (activityDto.Operations.IsNullOrEmpty()) return;

foreach (var itemInfo in activityDto.Operations.Where(itemInfo => itemInfo.NftInfo != null))
{

Check warning on line 509 in src/CAServer.Application/CAActivity/UserActivityAppService.cs

View check run for this annotation

Codecov / codecov/patch

src/CAServer.Application/CAActivity/UserActivityAppService.cs#L509

Added line #L509 was not covered by tests
itemInfo.NftInfo.ImageUrl=
IpfsImageUrlHelper.TryGetIpfsImageUrl(itemInfo.NftInfo.ImageUrl, _ipfsOptions?.ReplacedIpfsPrefix);

Check warning on line 511 in src/CAServer.Application/CAActivity/UserActivityAppService.cs

View check run for this annotation

Codecov / codecov/patch

src/CAServer.Application/CAActivity/UserActivityAppService.cs#L511

Added line #L511 was not covered by tests
}
}

Expand Down