Itheum / data-dex

DApp with suite of web3 tools to trade personal data on MultiversX
https://datadex.itheum.io
GNU General Public License v3.0
466 stars 6 forks source link

Remove all hardcoded config that uses network IDs based logic etc #378

Closed newbreedofgeek closed 1 year ago

newbreedofgeek commented 1 year ago

There seems to be a lot of hardcoding of network ID values like "ED", e.g.

image

We need to go over the full app and remove all these hardcodes or we will have many gaps when we go to mainnet. useChainMeta should have the dynamic values you need.

newbreedofgeek commented 1 year ago

also.. need to look at other items in code that are MX "environment specific" logic and make sure it's dynamic and not hardcoded.

icegriffinguru commented 1 year ago

Removed "ED" hardcoded parts. I think current env logic is unnecessarily complex. What about removing redundant cross-chain logic?

image

damienen commented 1 year ago

You can simplify it as long as you keep the contract addresses in one place only.

icegriffinguru commented 1 year ago

@damienen , I think @newbreedofgeek meant the above config part is redundant at the moment but we will need it in the future when we go for cross-chain. I think we can leave it now. What do you think?

damienen commented 1 year ago

He said that most likely the other chains will be on a separate version of the data dex so we can remove the complicated logic

icegriffinguru commented 1 year ago

Okay. I wil let you check once I make an update on this issue. It can be disasterous. ;)

icegriffinguru commented 1 year ago

@damienen , It's better leave current multichain logic for future multichain update. We might need it in the future.

damienen commented 1 year ago

Fair enough