tqtezos / minter

OpenMinter is dApp framework for enabling the creation and collection of non-fungible tokens (NFTs) on Tezos.
MIT License
192 stars 91 forks source link

feat: Swap Network #394

Closed maelswarm closed 3 years ago

maelswarm commented 3 years ago
swappp

Near completion except for issues with redux-persist and non-serializable datatypes in the store.

Config file for usage (deploy preview will not work)

{
  "mainnet": {
    "rpc": "https://rpc.tzbeta.net",
    "network": "mainnet",
    "bcd": {
      "api": "https://api.better-call.dev",
      "gui": "https://better-call.dev"
    },
    "tzkt": {
      "api": "https://staging.api.mainnet.tzkt.io"
    },
    "contracts": {
      "nftFaucet": "KT1QcxwB4QyPKfmSwjH1VRxa6kquUjeDWeEy",
      "marketplace": {
        "fixedPrice": {
          "tez": "KT1E8Qzgx3C5AAE4iGuXvqSQjdd21LK2aXAk"
        }
      }
    },
    "ipfsApi": "https://minter-api.tqhosted.com",
    "ipfsGateway": "https://tqtezos.mypinata.cloud"
  },
  "testnet": {
    "rpc": "https://rpctest.tzbeta.net",
    "network": "edonet",
    "bcd": {
      "api": "https://api.better-call.dev",
      "gui": "https://better-call.dev"
    },
    "tzkt": {
      "api": "https://staging.api.edo2net.tzkt.io"
    },
    "contracts": {
      "nftFaucet": "KT1Hagc5XQYzkX7HfRbUNXdi4CBfiENzbHiU",
      "marketplace": {
        "fixedPrice": {
          "tez": "KT1H4tMRW3o9GdPJ3r82ZC7BJiR6WgmYazUC"
        }
      }
    },
    "ipfsApi": "https://minter-api.tqhosted.com",
    "ipfsGateway": "https://tqtezos.mypinata.cloud"
  }
}

YAML + #395 may be a more compact/readable alternative as this grows.

UPDATE: working version without redux-persist implemented (although refreshing the page leads things out-of-sync as the store is not persisting).

To grab a build with redux-persist pull commit 4b74f98297f41a6915e4101adf241a3fba41f794

https://stackoverflow.com/questions/35305661/where-to-write-to-localstorage-in-a-redux-app

localStorage instead of redux-persist?

ricklove commented 3 years ago

What is the use case for this?

If I understand this correctly, this seems like something that would only have relevance to a developer and not an end user (i.e. it is a feature that would not provide any value to a user, but just add confusion).

However, I may be completely misunderstanding it or not seeing where it makes sense.