Skip to content

MOBILE-390 feat: add per-wallet allocation support to multi-chain NFT songs endpoint#724

Merged
wlara merged 1 commit intomasterfrom
wlara/MOBILE-390
Feb 6, 2026
Merged

MOBILE-390 feat: add per-wallet allocation support to multi-chain NFT songs endpoint#724
wlara merged 1 commit intomasterfrom
wlara/MOBILE-390

Conversation

@wlara
Copy link
Collaborator

@wlara wlara commented Feb 5, 2026

No description provided.

@wlara wlara requested a review from AndrewWestberg February 5, 2026 03:04
@wlara wlara force-pushed the wlara/MOBILE-390 branch 3 times, most recently from 189236f to d169e76 Compare February 5, 2026 06:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 NftWalletAllocation and AllocatedNativeAsset models 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

Copy link
Member

@cristhianescobar cristhianescobar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wlara wlara merged commit 25ed4c4 into master Feb 6, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants