Compare commits

...
Author SHA1 Message Date
Edd 7ff9e0f435 fix(explorer): disable oracles in mainnet while api is broken 2023-09-22 10:19:37 +01:00
2 changed files with 33 additions and 26 deletions
+1
View File
@@ -13,3 +13,4 @@ NX_ORACLE_PROOFS_URL=https://raw.githubusercontent.com/vegaprotocol/well-known/m
NX_TENDERMINT_URL=https://be.vega.community
NX_TENDERMINT_WEBSOCKET_URL=wss://be.vega.community/websocket
NX_EXPLORER_ORACLES=0
+32 -26
View File
@@ -241,6 +241,37 @@ const validators: Route[] = FLAGS.EXPLORER_VALIDATORS
]
: [];
const oraclesRoutes: Route[] = FLAGS.EXPLORER_ORACLES
? [
{
path: Routes.ORACLES,
handle: {
name: t('Oracles'),
text: t('Oracles'),
breadcrumb: () => <Link to={Routes.ORACLES}>{t('Oracles')}</Link>,
},
element: <OraclePage />,
children: [
{
index: true,
element: <Oracles />,
},
{
path: ':id',
element: <Oracle />,
handle: {
breadcrumb: (params: Params<string>) => (
<Link to={linkTo(Routes.ORACLES, params.id)}>
{truncateMiddle(params.id as string)}
</Link>
),
},
},
],
},
]
: [];
const linkTo = (...segments: (string | undefined)[]) =>
compact(segments).join('/');
@@ -310,32 +341,7 @@ export const routerConfig: Route[] = [
},
],
},
{
path: Routes.ORACLES,
handle: {
name: t('Oracles'),
text: t('Oracles'),
breadcrumb: () => <Link to={Routes.ORACLES}>{t('Oracles')}</Link>,
},
element: <OraclePage />,
children: [
{
index: true,
element: <Oracles />,
},
{
path: ':id',
element: <Oracle />,
handle: {
breadcrumb: (params: Params<string>) => (
<Link to={linkTo(Routes.ORACLES, params.id)}>
{truncateMiddle(params.id as string)}
</Link>
),
},
},
],
},
...oraclesRoutes,
{
path: Routes.DISCLAIMER,
element: <Disclaimer />,