Skip to content

Commit

Permalink
fix: this is not the core of the problem, but fixes it for now
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosgj94 committed Apr 17, 2024
1 parent f7172c4 commit c283df5
Show file tree
Hide file tree
Showing 5 changed files with 704 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
9 changes: 5 additions & 4 deletions context/Web3Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { http, createConfig } from "wagmi";
import { injected } from "wagmi/connectors";
import { walletConnect } from "wagmi/connectors";
import { walletConnect, coinbaseWallet } from "wagmi/connectors";
import {
PUB_APP_DESCRIPTION,
PUB_APP_NAME,
Expand All @@ -10,6 +10,7 @@ import {
PUB_WALLET_ICON,
PUB_WEB3_ENDPOINT,
} from "@/constants";
import { mainnet } from "viem/chains";

// wagmi config
const metadata = {
Expand All @@ -20,18 +21,18 @@ const metadata = {
};

export const config = createConfig({
chains: [PUB_CHAIN],
chains: [PUB_CHAIN, mainnet],
ssr: true,
transports: {
[PUB_CHAIN.id]: http(PUB_WEB3_ENDPOINT, { batch: true }),
[mainnet.id]: http(PUB_WEB3_ENDPOINT, { batch: true }),
},
connectors: [
walletConnect({
projectId: PUB_WALLET_CONNECT_PROJECT_ID,
metadata,
showQrModal: false,
}),
injected({ shimDisconnect: true }),
// coinbaseWallet({ appName: metadata.name, appLogoUrl: metadata.icons[0] }),
coinbaseWallet({ appName: metadata.name, appLogoUrl: metadata.icons[0] }),
],
});
9 changes: 9 additions & 0 deletions context/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ createWeb3Modal({
wagmiConfig: config,
projectId: PUB_WALLET_CONNECT_PROJECT_ID,
enableAnalytics: false, // Optional - defaults to your Cloud configuration
enableOnramp: true, // Optional
themeMode: "light",
allWallets: "SHOW",
featuredWalletIds: [
"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",
"1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369",
"18388be9ac2d02726dbac9777c96efaac06d744b2f6d580fccdd4127a6d01fd1",
"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",
],
});

export function RootContextProvider({ children, initialState }: { children: ReactNode; initialState?: State }) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@tanstack/react-query": "^5.28.8",
"@tanstack/react-query-persist-client": "^5.28.8",
"@typescript-eslint/eslint-plugin": "latest",
"@web3modal/wagmi": "^4.1.1",
"@web3modal/wagmi": "^4.1.9",
"classnames": "^2.5.1",
"dayjs": "^1.11.10",
"dompurify": "^3.0.11",
Expand All @@ -38,7 +38,7 @@
"react-dom": "^18.2.0",
"tailwindcss-fluid-type": "^2.0.6",
"viem": "^2.9.2",
"wagmi": "^2.5.12"
"wagmi": "^2.5.20"
},
"devDependencies": {
"@aragon/osx-commons-configs": "^0.2.0",
Expand Down
Loading

0 comments on commit c283df5

Please sign in to comment.