diff --git a/src/components/Layout/links.tsx b/src/components/Layout/links.tsx
index 47acf854..ba77d95d 100644
--- a/src/components/Layout/links.tsx
+++ b/src/components/Layout/links.tsx
@@ -105,6 +105,7 @@ export const links: Links = ({ tenantName }) => [
title: 'Forex AMM',
hidden:
(nablaConfig.environment && !nablaConfig.environment.includes(config.env)) ||
+ !tenantName ||
(tenantName && !nablaConfig.tenants.includes(tenantName)),
prefix: ,
props: {
diff --git a/src/config/apps/nabla.ts b/src/config/apps/nabla.ts
index e6b52825..52035804 100644
--- a/src/config/apps/nabla.ts
+++ b/src/config/apps/nabla.ts
@@ -13,11 +13,16 @@ export type NablaConfig = AppConfigBase &
>;
export const nablaConfig: NablaConfig = {
- tenants: [TenantName.Foucoco],
- environment: ['staging', 'development'],
+ tenants: [TenantName.Foucoco, TenantName.Pendulum],
+ environment: ['staging', 'development', 'production'],
foucoco: {
indexerUrl: 'https://pendulum.squids.live/foucoco-squid/graphql',
router: '6ijJtaZuwpZCiaVo6pSHRJbd8qejgywYsejnjfo2AVanN14E',
oracle: '6jscuYjvoPesdnzdnUNYEntLmGY3R6F5hJoTum1oaV7VVcxE',
},
+ pendulum: {
+ indexerUrl: 'https://pendulum.squids.live/pendulum-squid/graphql',
+ router: '6buMJsFCbXpHRyacKTjBn3Jss241b2aA7CZf9tKzKHMJWpcJ',
+ oracle: '6f9uHwN2r5w82Bjrywc4wmZYb6TN64bZH5Ev87qmJ675uFvq',
+ },
};
diff --git a/src/pages/nabla/dev/index.tsx b/src/pages/nabla/dev/index.tsx
deleted file mode 100644
index 69714e6b..00000000
--- a/src/pages/nabla/dev/index.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import { EllipsisVerticalIcon } from '@heroicons/react/20/solid';
-import { Button, Dropdown } from 'react-daisyui';
-import { useNavigate } from 'react-router-dom';
-import { config } from '../../../config';
-import { erc20WrapperAbi } from '../../../contracts/nabla/ERC20Wrapper';
-import { useGlobalState } from '../../../GlobalStateProvider';
-import { decimalToRaw } from '../../../shared/parseNumbers/metric';
-import { NablaInstanceToken, useNablaInstance } from '../../../hooks/nabla/useNablaInstance';
-import { useContractWrite } from '../../../hooks/nabla/useContractWrite';
-
-const TokenItem = ({ token }: { token: NablaInstanceToken }) => {
- const { address } = useGlobalState().walletAccount || {};
- const { mutate, isLoading } = useContractWrite({
- abi: erc20WrapperAbi,
- address: token.id,
- method: 'mint',
- mutateOptions: {
- onError: console.error,
- },
- });
- return (
-
-
-
{token.name}
-
{token.id}
-
-
-
-
-
-
-
-
- mutate([address, decimalToRaw(10000, 12).toString()])}
- >
- 10000
-
-
-
- mutate([address, decimalToRaw(100000, 12).toString()])}
- >
- 100000
-
-
-
-
-
-
-
- );
-};
-
-const DevPage = () => {
- const navigate = useNavigate();
- const wallet = useGlobalState().walletAccount;
- const { nabla } = useNablaInstance();
- const tokens = nabla?.swapPools.map((pool) => pool.token) ?? [];
-
- if (config.isProd) navigate('/');
- if (!wallet?.address) {
- return <>Please connect your wallet.>;
- }
- return (
-
-
-
-
Tokens
- {tokens?.map((token) => )}
-
-
-
- );
-};
-
-export default DevPage;
diff --git a/src/shared/parseNumbers/metric.ts b/src/shared/parseNumbers/metric.ts
index 3627b397..e635928d 100644
--- a/src/shared/parseNumbers/metric.ts
+++ b/src/shared/parseNumbers/metric.ts
@@ -31,7 +31,7 @@ export const decimalToNative = (value: BigNumber | number | string, decimals: nu
return bigIntValue.times(multiplier).round(0);
};
-export const decimalToRaw = (value: BigNumber | number | string, decimals: number) => {
+export const decimalToRaw = (value: BigNumber | string, decimals: number) => {
return decimalToNative(value, decimals);
};