Skip to content

Commit 38c3656

Browse files
authoredJan 27, 2024
chore: update config and a default wallet connect key (ubiquity#888)
* chore: update config and wallet connect * chore: update config and wallet connect * chore: update config and wallet connect * chore: update config and wallet connect * chore: update config and wallet connect * chore: update config and wallet connect * chore: update config and wallet connect
1 parent 47717c1 commit 38c3656

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed
 

‎packages/dapp/components/lib/hooks/use-web-3.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { MetaMaskConnector } from "wagmi/connectors/metaMask";
99
import { ConnectKitProvider, getDefaultClient } from "connectkit";
1010
import { FC } from "react";
1111
import { ChildrenShim } from "./children-shim-d";
12+
import ubqConfig from "ubq-connect-config";
1213

1314
const IS_DEV = process.env.NODE_ENV == "development";
1415
export const LOCAL_NODE_ADDRESS = "http://localhost:8545";
@@ -67,7 +68,7 @@ const client = createClient(
6768
chains: defaultChains,
6869
options: {
6970
showQrModal: false,
70-
projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_ID || "",
71+
projectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_ID || ubqConfig.walletConnectProjectId || "",
7172
metadata: {
7273
name: "Ubiquity DAO",
7374
description: "World's first scalable digital dollar",

‎packages/dapp/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"@/types/contracts": ["types/contracts"]
2727
}
2828
},
29-
"include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx"],
29+
"include": ["global.d.ts", "next-env.d.ts", "**/*.ts", "**/*.tsx", "ubq-connect-config.ts"],
3030
"exclude": ["node_modules"]
3131
}

‎packages/dapp/ubq-connect-config.ts

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
export type UbiquityConfig = {
2+
walletConnectProjectId: string;
3+
};
4+
5+
const ubqConfig = {
6+
// This is ours WalletConnect's default project ID.
7+
walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "ef004b660177d5660241cdb882fcbf84",
8+
} as const satisfies UbiquityConfig;
9+
10+
export default ubqConfig;

0 commit comments

Comments
 (0)
Please sign in to comment.