From 52d1bb10f500271d3cfafb2fd2627fb2c0d58ce4 Mon Sep 17 00:00:00 2001 From: Henrik Soerensen Date: Sat, 14 Sep 2024 15:27:33 -0400 Subject: [PATCH] Remove capability of using a custom node. This is done to allow a stricter CSP, as bringing your own indexer/node would defacto not work with a stricter policy - in this case better to remove the feature altogether as it would never work for the user. --- src/components/LeftBar/Settings/Settings.tsx | 36 +++++--------------- src/utils/nodeConfig.ts | 36 ++++++-------------- 2 files changed, 19 insertions(+), 53 deletions(-) diff --git a/src/components/LeftBar/Settings/Settings.tsx b/src/components/LeftBar/Settings/Settings.tsx index 9b464db9..8e6281d3 100644 --- a/src/components/LeftBar/Settings/Settings.tsx +++ b/src/components/LeftBar/Settings/Settings.tsx @@ -226,7 +226,8 @@ function Settings(): JSX.Element { onChange={(ev) => { setState(prevState => ({...prevState, algodUrl: ev.target.value})); }} - fullWidth/> + fullWidth + readOnly={true} /> Algod port @@ -236,22 +237,9 @@ function Settings(): JSX.Element { onChange={(ev) => { setState(prevState => ({...prevState, algodPort: ev.target.value})); }} - fullWidth/> + fullWidth + readOnly={true} /> - - Algod token - { - setState(prevState => ({...prevState, algodToken: ev.target.value})); - }} - fullWidth/> - - - - - Indexer url @@ -261,7 +249,8 @@ function Settings(): JSX.Element { onChange={(ev) => { setState(prevState => ({...prevState, indexerUrl: ev.target.value})); }} - fullWidth/> + fullWidth + readOnly={true} /> Indexer port @@ -271,17 +260,8 @@ function Settings(): JSX.Element { onChange={(ev) => { setState(prevState => ({...prevState, indexerPort: ev.target.value})); }} - fullWidth/> - - - Indexer token - { - setState(prevState => ({...prevState, indexerToken: ev.target.value})); - }} - fullWidth/> + fullWidth + readOnly={true} />
diff --git a/src/utils/nodeConfig.ts b/src/utils/nodeConfig.ts index 9d60d57e..832e4726 100644 --- a/src/utils/nodeConfig.ts +++ b/src/utils/nodeConfig.ts @@ -49,50 +49,36 @@ export function getKMDConfig(): KMDConnectionParams { } export function getNodes(): NodeConnectionParams[] { - return [{ - id: 'sandbox', - label: 'Sandbox', - algod: { - url: 'http://localhost', - port: '4001', - token: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' - }, - indexer: { - url: 'http://localhost', - port: '8980', - token: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' - } - }, + return [ { - id: 'voimain', - label: 'Voi mainnet (Nodly)', + id: 'voitest', + label: 'Voi testnet (Nodly)', algod: { - url: 'https://mainnet-api.voi.nodely.dev', + url: 'https://testnet-api.voi.nodly.io', port: '443', token: '', }, indexer: { - url: 'https://mainnet-idx.voi.nodely.dev', + url: 'https://testnet-idx.voi.nodly.io', port: '443', token: '', } }, { - id: 'voitest', - label: 'Voi testnet (Nodly)', + id: 'voimain', + label: 'Voi mainnet (Nodly)', algod: { - url: 'https://testnet-api.voi.nodly.io', + url: 'https://mainnet-api.voi.nodely.dev', port: '443', token: '', }, indexer: { - url: 'https://testnet-idx.voi.nodly.io', + url: 'https://mainnet-idx.voi.nodely.dev', port: '443', token: '', } - }, - - ]; + } + ]; }