Skip to content

Commit

Permalink
chore: remove gen-x from all files (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRohlf committed Oct 30, 2024
1 parent 75eb72a commit 6c3b06d
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 94 deletions.
2 changes: 1 addition & 1 deletion app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ module.exports = {
errorMargin: 10,
// Map chainIds to their respective status endpoints
statusEndpoints: {
100: 'https://status.genx.delta-dao.com/api/check-blocks'
32456: 'https://status.dev.pontus-x.eu/'
}
},

Expand Down
7 changes: 0 additions & 7 deletions content/onboarding/steps/claimTokens.json

This file was deleted.

20 changes: 0 additions & 20 deletions genxAddress.json

This file was deleted.

22 changes: 0 additions & 22 deletions networksMetadata.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,6 @@
// see: https://github.com/ethereum-lists/chains

const networksMetadata = [
{
chainId: 100,
networkId: 100,
name: 'GEN-X Testnet',
chain: 'GEN-X',
rpc: ['https://rpc.genx.minimal-gaia-x.eu'],
faucets: [],
nativeCurrency: {
name: 'GX',
symbol: 'GX',
decimals: 18
},
infoURL: 'https://docs.genx.minimal-gaia-x.eu',
shortName: 'GEN-X',
explorers: [
{
name: 'GEN-X Testnet Explorer',
url: 'https://explorer.genx.pontus-x.eu',
standard: ''
}
]
},
{
chainId: 32456,
networkId: 32456,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type-check": "tsc --noEmit",
"postinstall": "husky install && npm run copy:address",
"copy:address": "node scripts/copy-addresses.js",
"codegen:apollo": "apollo client:codegen --endpoint=https://subgraph.v4.genx.minimal-gaia-x.eu/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/",
"codegen:apollo": "apollo client:codegen --endpoint=https://subgraph.test.pontus-x.eu/subgraphs/name/oceanprotocol/ocean-subgraph --target typescript --tsFileExtension=d.ts --outputFlat src/@types/subgraph/",
"storybook": "cross-env NODE_ENV=test start-storybook -p 6006 --quiet",
"storybook:build": "cross-env NODE_ENV=test build-storybook"
},
Expand Down
8 changes: 2 additions & 6 deletions scripts/copy-addresses.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ const addressJsonFile = join(
__dirname,
'../node_modules/@oceanprotocol/contracts/addresses/address.json'
)
const genxAddressesFile = join(__dirname, '../genxAddress.json')

const addressJson = JSON.parse(readFileSync(addressJsonFile).toString())

const genxAddresses = JSON.parse(readFileSync(genxAddressesFile).toString())

const newObject = {
...addressJson,
...genxAddresses
...addressJson
}

writeFileSync(addressJsonFile, JSON.stringify(newObject))

console.log('Added GEN-X addresses to', addressJsonFile)
console.log('Added addresses to', addressJsonFile)
3 changes: 0 additions & 3 deletions src/@hooks/useNetworkMetadata/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ export function getNetworkDisplayName(data: EthereumListsChain): string {
case 2021000:
displayName = 'GAIA-X'
break
case 100:
displayName = 'GEN-X Testnet'
break
case 32456:
displayName = 'Pontus-X Devnet'
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default function CustomProvider(props: InputProps): ReactElement {
const providerResponse = await axios.get(field.value.url, {
cancelToken: newCancelToken()
})
const userChainId = chain?.id || 100
const userChainId = chain?.id || 32457
const providerChain =
providerResponse?.data?.chainId || providerResponse?.data?.chainIds

Expand Down Expand Up @@ -92,7 +92,7 @@ export default function CustomProvider(props: InputProps): ReactElement {
function handleDefault(e: React.SyntheticEvent) {
e.preventDefault()

const oceanConfig = getOceanConfig(chain?.id || 100)
const oceanConfig = getOceanConfig(chain?.id || 32457)
const providerUrl =
oceanConfig?.providerUri || initialValues.services[0].providerUrl.url

Expand Down
31 changes: 0 additions & 31 deletions src/components/@shared/Onboarding/Steps/ClaimTokens.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/Publish/Pricing/Fees.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function Fees({
const { appConfig } = useMarketMetadata()

useEffect(() => {
getOpcFees(chain?.id || 100).then((response: OpcFeesData) => {
getOpcFees(chain?.id || 32457).then((response: OpcFeesData) => {
setOceanCommunitySwapFee(
response?.swapOceanFee
? new Decimal(response.swapOceanFee).mul(100).toString()
Expand Down

0 comments on commit 6c3b06d

Please sign in to comment.