From 06e9cfb362ccdb701de2648b952f9972b1eafeb2 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 12:38:58 -0400 Subject: [PATCH 1/7] chore: update config and wallet connect --- packages/dapp/components/lib/hooks/use-web-3.tsx | 3 ++- packages/dapp/tsconfig.json | 2 +- packages/dapp/ubq.config.ts | 12 ++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 packages/dapp/ubq.config.ts diff --git a/packages/dapp/components/lib/hooks/use-web-3.tsx b/packages/dapp/components/lib/hooks/use-web-3.tsx index 088e6e355..b7692163f 100644 --- a/packages/dapp/components/lib/hooks/use-web-3.tsx +++ b/packages/dapp/components/lib/hooks/use-web-3.tsx @@ -9,6 +9,7 @@ import { MetaMaskConnector } from "wagmi/connectors/metaMask"; import { ConnectKitProvider, getDefaultClient } from "connectkit"; import { FC } from "react"; import { ChildrenShim } from "./children-shim-d"; +import ubqConfig from "ubq.config"; const IS_DEV = process.env.NODE_ENV == "development"; export const LOCAL_NODE_ADDRESS = "http://localhost:8545"; @@ -67,7 +68,7 @@ const client = createClient( chains: defaultChains, options: { showQrModal: false, - projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_ID || "", + projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_ID || ubqConfig.walletConnectProjectId || "", metadata: { name: "Ubiquity DAO", description: "World's first scalable digital dollar", diff --git a/packages/dapp/tsconfig.json b/packages/dapp/tsconfig.json index 402fdf90f..9cd466fe5 100644 --- a/packages/dapp/tsconfig.json +++ b/packages/dapp/tsconfig.json @@ -26,6 +26,6 @@ "@/types/contracts": ["types/contracts"] } }, - "include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx"], + "include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx", "ubq.config.ts"], "exclude": ["node_modules"] } diff --git a/packages/dapp/ubq.config.ts b/packages/dapp/ubq.config.ts new file mode 100644 index 000000000..90ef7b023 --- /dev/null +++ b/packages/dapp/ubq.config.ts @@ -0,0 +1,12 @@ +export type UbiquityConfig = { + walletConnectProjectId: string; +}; + +const ubqConfig = { + // This is ours WalletConnect's default project ID. + // It's recommended to store it in an env variable: + // .env.local for local testing, and in the Vercel/system env config for live apps. + walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "ef004b660177d5660241cdb882fcbf84", +} as const satisfies UbiquityConfig; + +export default ubqConfig; From 6bb7f4dd1ab4b13b06bdd7fb139b97162987c793 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 12:40:39 -0400 Subject: [PATCH 2/7] chore: update config and wallet connect --- packages/dapp/ubq.config.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/dapp/ubq.config.ts b/packages/dapp/ubq.config.ts index 90ef7b023..722264db1 100644 --- a/packages/dapp/ubq.config.ts +++ b/packages/dapp/ubq.config.ts @@ -4,8 +4,6 @@ export type UbiquityConfig = { const ubqConfig = { // This is ours WalletConnect's default project ID. - // It's recommended to store it in an env variable: - // .env.local for local testing, and in the Vercel/system env config for live apps. walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "ef004b660177d5660241cdb882fcbf84", } as const satisfies UbiquityConfig; From 01618a6d4bfe3c8a7c4015688e95ab5b6930d048 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 12:43:54 -0400 Subject: [PATCH 3/7] chore: update config and wallet connect --- packages/dapp/components/lib/hooks/use-web-3.tsx | 2 +- packages/dapp/ubq.config.ts | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 packages/dapp/ubq.config.ts diff --git a/packages/dapp/components/lib/hooks/use-web-3.tsx b/packages/dapp/components/lib/hooks/use-web-3.tsx index b7692163f..4ef673f84 100644 --- a/packages/dapp/components/lib/hooks/use-web-3.tsx +++ b/packages/dapp/components/lib/hooks/use-web-3.tsx @@ -9,7 +9,7 @@ import { MetaMaskConnector } from "wagmi/connectors/metaMask"; import { ConnectKitProvider, getDefaultClient } from "connectkit"; import { FC } from "react"; import { ChildrenShim } from "./children-shim-d"; -import ubqConfig from "ubq.config"; +import ubqConfig from "ubq-connect.config"; const IS_DEV = process.env.NODE_ENV == "development"; export const LOCAL_NODE_ADDRESS = "http://localhost:8545"; diff --git a/packages/dapp/ubq.config.ts b/packages/dapp/ubq.config.ts deleted file mode 100644 index 722264db1..000000000 --- a/packages/dapp/ubq.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -export type UbiquityConfig = { - walletConnectProjectId: string; -}; - -const ubqConfig = { - // This is ours WalletConnect's default project ID. - walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "ef004b660177d5660241cdb882fcbf84", -} as const satisfies UbiquityConfig; - -export default ubqConfig; From 3d573bc1651219f4f0b59bc1752e327a72af72f6 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 12:44:16 -0400 Subject: [PATCH 4/7] chore: update config and wallet connect --- packages/dapp/ubq-connect.config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 packages/dapp/ubq-connect.config.ts diff --git a/packages/dapp/ubq-connect.config.ts b/packages/dapp/ubq-connect.config.ts new file mode 100644 index 000000000..722264db1 --- /dev/null +++ b/packages/dapp/ubq-connect.config.ts @@ -0,0 +1,10 @@ +export type UbiquityConfig = { + walletConnectProjectId: string; +}; + +const ubqConfig = { + // This is ours WalletConnect's default project ID. + walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "ef004b660177d5660241cdb882fcbf84", +} as const satisfies UbiquityConfig; + +export default ubqConfig; From 72b1254b2998fa69484b84289427826913e922b8 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 12:46:14 -0400 Subject: [PATCH 5/7] chore: update config and wallet connect --- packages/dapp/{ubq-connect.config.ts => ubq-connect-config.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename packages/dapp/{ubq-connect.config.ts => ubq-connect-config.ts} (100%) diff --git a/packages/dapp/ubq-connect.config.ts b/packages/dapp/ubq-connect-config.ts similarity index 100% rename from packages/dapp/ubq-connect.config.ts rename to packages/dapp/ubq-connect-config.ts From d02ce8a0e49186339cd3e791cca35d37200e6ccf Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 13:03:30 -0400 Subject: [PATCH 6/7] chore: update config and wallet connect --- packages/dapp/components/lib/hooks/use-web-3.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dapp/components/lib/hooks/use-web-3.tsx b/packages/dapp/components/lib/hooks/use-web-3.tsx index 4ef673f84..2fe3dec63 100644 --- a/packages/dapp/components/lib/hooks/use-web-3.tsx +++ b/packages/dapp/components/lib/hooks/use-web-3.tsx @@ -9,7 +9,7 @@ import { MetaMaskConnector } from "wagmi/connectors/metaMask"; import { ConnectKitProvider, getDefaultClient } from "connectkit"; import { FC } from "react"; import { ChildrenShim } from "./children-shim-d"; -import ubqConfig from "ubq-connect.config"; +import ubqConfig from "ubq-connect-config"; const IS_DEV = process.env.NODE_ENV == "development"; export const LOCAL_NODE_ADDRESS = "http://localhost:8545"; From df1e6deda304c2ed4494e030e2cfb2748a791848 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Fri, 26 Jan 2024 13:05:43 -0400 Subject: [PATCH 7/7] chore: update config and wallet connect --- packages/dapp/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/dapp/tsconfig.json b/packages/dapp/tsconfig.json index 9cd466fe5..d8466f2e6 100644 --- a/packages/dapp/tsconfig.json +++ b/packages/dapp/tsconfig.json @@ -26,6 +26,6 @@ "@/types/contracts": ["types/contracts"] } }, - "include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx", "ubq.config.ts"], + "include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx", "ubq-connect-config.ts"], "exclude": ["node_modules"] }