status-im / status-desktop

Status Desktop client made in Nim & QML
https://status.app
Mozilla Public License 2.0
288 stars 78 forks source link

[Wallet] Unify `colorizedChainPrefixes` implementations #15269

Open alexjba opened 3 months ago

alexjba commented 3 months ago

Description

The purpose of this task is to unify colorizedChainPrefixes implementations where the input is a chainIds string and the output to be the colorizedChainPrefixes. One solution would be to remove the flatNetworksModel dependency from WalletUtils and add it there.

For context see the discussion below

Could be a deeper discussion and it would deserve its own space. With the current Store arrangements it would mean to duplicate it in several stores instead of having it here. Moreover, it would mean to add it to some singleton stores as well creating singleton cyclic dependencies.. I'd leave it as it is for now. IMO adding a task to unify colorizedChainPrefixes implementations and remove the singleton access to nim module from WalletUtils would be more appropriate. WDYT?

_Originally posted by @alexjba in https://github.com/status-im/status-desktop/pull/15099#discussion_r1643994537_

noeliaSD commented 3 months ago

Probably related to this: https://github.com/status-im/status-desktop/issues/15494