Skip to content

Improve nft transactions#37

Draft
gemdev111 wants to merge 7 commits intomainfrom
android-nft-transacitons
Draft

Improve nft transactions#37
gemdev111 wants to merge 7 commits intomainfrom
android-nft-transacitons

Conversation

@gemdev111
Copy link
Copy Markdown
Contributor

closes #18

- Fix getNftMetadata() to return TransactionNFTTransferMetadata instead of NFTAsset
- Add NFT image URL generation for NFTAsset and TransactionNFTTransferMetadata
- Update NftHead to support nullable name and remove divider (matching iOS)
- Update detail screen and tests to use correct metadata type
Expose nftImageUrl on TransactionDataAggregate and populate it in GetTransactionsImpl from NFT metadata so transaction items can show NFT thumbnails. Refactor IconWithBadge/BadgedIcon to accept a composable badge (instead of a raw supportIcon) and adjust badge sizing/positioning. Update TransactionItem to use a TransactionIcon that shows an arrow direction badge for transfers (with colored circular background) and fall back to asset/NFT icon. Minor import and layout adjustments to support the new badge UI.
Replace hardcoded sizing/offset literals with named constants and expose a header image size.

- Add BADGE_SIZE_RATIO and use theme.space2 for IconWithBadge badge offset/size.
- Add BADGE_ICON_SCALE constant and replace hardcoded 0.65f in TransactionItem.
- Add headerLargeImageSize and use paddingLarge.value for rounded corner radii in NftHead.
- Make space2 public in paddings.kt so components can reuse the small spacing value.

These changes consolidate magic numbers into theme/constant values for consistency and reusability across UI components.
Add a new Constants object (API_URL, ASSETS_URL) and replace hardcoded api/asset URLs across the codebase. Files updated include GatewayModule, ClientsModule, PriceWebSocketClient, IconUrlGeneration, DelegationInfo, DelegationItem, and ValidatorItem to reference Constants. Also adjust WebSocket host resolution by removing the https:// prefix when passing host, and update NFT image URL to use Constants.API_URL. This centralizes endpoint configuration to make future changes easier and avoid duplicated literals.
@gemdev111 gemdev111 self-assigned this Mar 30, 2026
@gemdev111 gemdev111 changed the title Android nft transacitons Improve nft transactions Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle NFT Transfers transactions

2 participants