diff --git a/components/common/Footer.tsx b/components/common/Footer.tsx index ca89213..aa5ef6a 100644 --- a/components/common/Footer.tsx +++ b/components/common/Footer.tsx @@ -7,7 +7,8 @@ import { Text, useColorModeValue, } from "@interchain-ui/react"; -import { dependencies, products, Project } from "@/config"; +import { Project, dependencies, products } from "../../config"; +// import { dependencies, products, Project } from "@/config"; function Product({ name, desc, link }: Project) { return ( diff --git a/components/common/Header.tsx b/components/common/Header.tsx index 86ffefe..ba8dda0 100644 --- a/components/common/Header.tsx +++ b/components/common/Header.tsx @@ -7,7 +7,8 @@ import { useColorModeValue, useTheme, } from "@interchain-ui/react"; -import { dependencies } from "@/config"; +import { dependencies } from "../../config"; +// import { dependencies } from "@/config"; const stacks = ["CosmosKit", "Next.js"]; diff --git a/components/wallet/Wallet.tsx b/components/wallet/Wallet.tsx index e89efb9..9665bd7 100644 --- a/components/wallet/Wallet.tsx +++ b/components/wallet/Wallet.tsx @@ -11,7 +11,7 @@ import { chains } from 'chain-registry'; import { User } from './User'; import { Chain } from './Chain'; import { Warning } from './Warning'; -import { CHAIN_NAME, CHAIN_NAME_STORAGE_KEY } from '@/config'; +// import { CHAIN_NAME, CHAIN_NAME_STORAGE_KEY } from '@/config'; import { ButtonConnect, ButtonConnected, @@ -21,6 +21,7 @@ import { ButtonNotExist, ButtonRejected, } from './Connect'; +import { CHAIN_NAME, CHAIN_NAME_STORAGE_KEY } from '../../config'; export type WalletProps = { chainName?: string; diff --git a/pages/index.tsx b/pages/index.tsx index fa6fe9d..1c2a867 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; -import { Layout, Wallet } from "@/components"; -import { CHAIN_NAME } from "@/config"; +import { CHAIN_NAME } from "../config"; +import { Layout, Wallet } from "../components"; + export default function Home() { const [chainName, setChainName] = useState(CHAIN_NAME); diff --git a/tsconfig.json b/tsconfig.json index 22140a2..e68bd5a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,10 +17,7 @@ "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", - "incremental": true, - "paths": { - "@/*": ["*"] - } + "incremental": true }, "include": [ "next-env.d.ts", diff --git a/utils/installSesLockdown.ts b/utils/installSesLockdown.ts index 28c323e..6e38729 100644 --- a/utils/installSesLockdown.ts +++ b/utils/installSesLockdown.ts @@ -1,12 +1,21 @@ -import 'ses'; - -const consoleTaming = - process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test' - ? 'unsafe' - : 'safe'; - -lockdown({ - errorTaming: 'unsafe', - overrideTaming: 'severe', - consoleTaming, -}); +// execute upon import +(async () => { + await import("ses"); // adds lockdown, harden, and Compartment + const consoleTaming = + process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test" + ? "unsafe" + : "safe"; + + lockdown({ + errorTaming: "unsafe", + overrideTaming: "severe", + consoleTaming, + }); + + Error.stackTraceLimit = Infinity; + +})(); + +export default function initiateLockdown() { + return Promise.resolve(); +}