Skip to content

Commit 6a21d50

Browse files
committed
fix(web): include wallet connect project id
1 parent 3acdc26 commit 6a21d50

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

web/src/app.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import AttachmentDisplay from "./pages/AttachmentDisplay";
1717
const App: React.FC = () => {
1818
return (
1919
<StyledComponentsProvider>
20-
<QueryClientProvider>
21-
<GraphqlBatcherProvider>
22-
<Web3Provider>
20+
<Web3Provider>
21+
<QueryClientProvider>
22+
<GraphqlBatcherProvider>
2323
<IsListProvider>
2424
<NewTransactionProvider>
2525
<SentryRoutes>
@@ -33,9 +33,9 @@ const App: React.FC = () => {
3333
</SentryRoutes>
3434
</NewTransactionProvider>
3535
</IsListProvider>
36-
</Web3Provider>
37-
</GraphqlBatcherProvider>
38-
</QueryClientProvider>
36+
</GraphqlBatcherProvider>
37+
</QueryClientProvider>
38+
</Web3Provider>
3939
</StyledComponentsProvider>
4040
);
4141
};

web/src/assets/svgs/icons/book.svg

Lines changed: 1 addition & 1 deletion
Loading

web/src/components/EnsureAuth.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import React, { useMemo, useState } from "react";
2+
23
import * as jwt from "jose";
34
import { SiweMessage } from "siwe";
45
import { useAccount, useChainId, useSignMessage } from "wagmi";
6+
57
import { Button } from "@kleros/ui-components-library";
8+
69
import { DEFAULT_CHAIN } from "consts/chains";
710
import { useSessionStorage } from "hooks/useSessionStorage";
811
import { authoriseUser, getNonce } from "utils/authoriseUser";
12+
913
import styled from "styled-components";
1014

1115
const Container = styled.div`
@@ -113,4 +117,4 @@ async function createSiweMessage(address: `0x${string}`, statement: string, chai
113117
expirationTime,
114118
});
115119
return message.prepareMessage();
116-
}
120+
}

web/src/context/Web3Provider.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ import React from "react";
33
import { createWeb3Modal } from "@web3modal/wagmi/react";
44
import { type Chain } from "viem";
55
import { createConfig, fallback, http, WagmiProvider, webSocket } from "wagmi";
6-
import { mainnet, arbitrumSepolia, arbitrum, gnosisChiado } from "wagmi/chains";
6+
import { mainnet, arbitrumSepolia, gnosisChiado } from "wagmi/chains";
77
import { walletConnect } from "wagmi/connectors";
88

99
import { lightTheme } from "styles/themes";
1010

1111
export const alchemyApiKey = import.meta.env.ALCHEMY_API_KEY ?? "";
1212

1313
const alchemyToViemChain = {
14-
[arbitrum.id]: "arb-mainnet",
1514
[arbitrumSepolia.id]: "arb-sepolia",
1615
[mainnet.id]: "eth-mainnet",
1716
};
@@ -31,14 +30,13 @@ const getTransports = () => {
3130
]);
3231

3332
return {
34-
[arbitrum.id]: alchemyTransport(arbitrum),
3533
[arbitrumSepolia.id]: alchemyTransport(arbitrumSepolia),
3634
[mainnet.id]: alchemyTransport(mainnet),
3735
[gnosisChiado.id]: chiadoTransport(),
3836
};
3937
};
4038

41-
const chains = [arbitrumSepolia, mainnet, gnosisChiado, arbitrum] as [Chain, ...Chain[]];
39+
const chains = [arbitrumSepolia, mainnet, gnosisChiado] as [Chain, ...Chain[]];
4240
const transports = getTransports();
4341
const projectId = import.meta.env.WALLETCONNECT_PROJECT_ID ?? "";
4442
const wagmiConfig = createConfig({

web/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
]
4848
},
4949
"target": "es2020",
50-
"rootDir": "src",
50+
"rootDir": ".",
5151
"outDir": "build/dist",
5252
"allowJs": true,
5353
"forceConsistentCasingInFileNames": true,

web/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default defineConfig({
88
build: {
99
outDir: "../dist",
1010
},
11-
envPrefix: ["REACT_APP", "ALCHEMY"],
11+
envPrefix: ["REACT_APP", "ALCHEMY", "WALLETCONNECT_PROJECT_ID"],
1212
plugins: [
1313
svgr({
1414
include: ["**/*.svg", "tsx:**/*.svg"],

0 commit comments

Comments
 (0)