Skip to content

Chain & Assets Display Priorities#4200

Open
svojsu wants to merge 4 commits intofeature/chains-v23-bumpfrom
feature/chain-assets-display-priorities
Open

Chain & Assets Display Priorities#4200
svojsu wants to merge 4 commits intofeature/chains-v23-bumpfrom
feature/chain-assets-display-priorities

Conversation

@svojsu
Copy link
Contributor

@svojsu svojsu commented Nov 13, 2025

SUMMARY

The PR introduces chains v23, enabling support for syncing display priorities for chains and assets.

SOLUTION

The chains.json file now contains a top-level object consisting of three fields:

  • assetDisplayPriorities – a map of priority values indexed by asset symbol
  • chainDisplayPriorities – a map of priority values indexed by chainId
  • chains – an array of chain objects (unchanged from the previous structure)

Clients should incorporate assetDisplayPriorities and chainDisplayPriorities into their chain syncing logic. Domain model objects created on the client side should include a displayPriority field, which is populated during the conversion from the chains.json response to the client's domain model objects.

iOS example of this mapping:

let newChainModel = ChainModel(
        remoteModel: remoteModel,
        assets: Set(newAssets),
        nodes: Set(orderedNodes),
        syncMode: syncMode,
        order: additionals.order,
        connectionMode: localModel?.connectionMode ?? .autoBalanced,
        displayPriority: chainPriorities[remoteModel.chainId]
)

SCREEN RECORDINGS

sorting_demo.mov

- add asset priorities
- add chain priorities
@github-actions
Copy link
Contributor

github-actions bot commented Nov 13, 2025

@svojsu svojsu requested review from ERussel and valentunn November 14, 2025 06:52
@svojsu svojsu changed the base branch from master to feature/chains-v23-bump November 14, 2025 09:24
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