MOBILE-390 feat: add per-wallet allocation support to multi-chain NFT songs endpoint#724
Merged
MOBILE-390 feat: add per-wallet allocation support to multi-chain NFT songs endpoint#724
Conversation
189236f to
d169e76
Compare
d169e76 to
5803c7b
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds per-wallet allocation support to the multi-chain NFT songs endpoint. The feature enables tracking which specific wallet connection owns what amount of each NFT, providing more granular ownership information when users have multiple wallets connected. The implementation adds a new allocations field to NFT song models that maps wallet connection IDs to their respective amounts.
Changes:
- Added
NftWalletAllocationandAllocatedNativeAssetmodels to track per-wallet NFT allocations - Modified Cardano and Ethereum repositories to group NFTs by wallet connection and calculate per-wallet amounts
- Updated NFT song parsers to accept allocation maps and include them in the response models
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| newm-server/src/main/kotlin/io/newm/server/features/nftsong/model/NftWalletAllocation.kt | New data class defining wallet allocation with ID and amount |
| newm-server/src/main/kotlin/io/newm/server/features/cardano/model/AllocatedNativeAsset.kt | New data class pairing a native asset with its allocations map |
| newm-server/src/main/kotlin/io/newm/server/features/nftsong/model/NftSong.kt | Added allocations field to NFT song model |
| newm-server/src/main/kotlin/io/newm/server/features/cardano/model/CardanoNftSong.kt | Added allocations field to Cardano NFT song model |
| newm-server/src/main/kotlin/io/newm/server/features/ethereum/model/EthereumNftSong.kt | Added allocations field to Ethereum NFT song model |
| newm-server/src/main/kotlin/io/newm/server/features/cardano/repo/CardanoRepositoryImpl.kt | Refactored to track assets by wallet connection, group duplicates, and calculate per-wallet allocations |
| newm-server/src/main/kotlin/io/newm/server/features/ethereum/repo/EthereumRepositoryImpl.kt | Refactored to track NFTs by wallet connection and aggregate allocations across wallets |
| newm-server/src/main/kotlin/io/newm/server/features/cardano/parser/CardanoNftSongParser.kt | Updated to accept allocations parameter and include it in parsed songs |
| newm-server/src/main/kotlin/io/newm/server/features/ethereum/parser/EthereumNftSongParser.kt | Updated to accept allocations parameter and sum amounts from allocation values |
| newm-server/src/main/kotlin/io/newm/server/features/nftsong/repo/NftSongRepositoryImpl.kt | Added mapping logic to convert allocation maps to NftWalletAllocation lists |
| newm-server/src/test/kotlin/io/newm/server/features/cardano/parser/CardanoNftSongParserTests.kt | Updated all test assertions to include test allocations data |
| newm-server/src/test/kotlin/io/newm/server/features/ethereum/parser/EthereumNftSongParserTests.kt | Updated all test assertions to include test allocations data |
newm-server/src/main/kotlin/io/newm/server/features/cardano/repo/CardanoRepositoryImpl.kt
Show resolved
Hide resolved
newm-server/src/main/kotlin/io/newm/server/features/ethereum/repo/EthereumRepositoryImpl.kt
Show resolved
Hide resolved
AndrewWestberg
approved these changes
Feb 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.