Skip to content

Commit

Permalink
chore: update config and a default wallet connect key (#888)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
molecula451 committed Jan 27, 2024
1 parent 47717c1 commit 38c3656
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
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;

0 comments on commit 38c3656

Please sign in to comment.