Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update config and a default wallet connect key #888

Merged
merged 7 commits into from
Jan 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/dapp/components/lib/hooks/use-web-3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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-connect-config";

const IS_DEV = process.env.NODE_ENV == "development";
export const LOCAL_NODE_ADDRESS = "http://localhost:8545";
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/dapp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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-connect-config.ts"],
"exclude": ["node_modules"]
}
10 changes: 10 additions & 0 deletions packages/dapp/ubq-connect-config.ts
Original file line number Diff line number Diff line change
@@ -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;
Loading