Skip to content

Commit 55d7d27

Browse files
committed
feat: removed rainbowkit. Still error wallet connection not saved after refresh page
1 parent 380f7b4 commit 55d7d27

File tree

3 files changed

+35
-161
lines changed

3 files changed

+35
-161
lines changed

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
"@fontsource/inter": "^5.0.3",
1919
"@next-auth/prisma-adapter": "^1.0.7",
2020
"@prisma/client": "^4.16.1",
21-
"@rainbow-me/rainbowkit": "^1.0.4",
22-
"@rainbow-me/rainbowkit-siwe-next-auth": "^0.2.0",
2321
"@tanstack/react-query": "^4.29.19",
2422
"@trpc/client": "^10.33.0",
2523
"@trpc/next": "^10.33.0",

src/pages/_app.tsx

Lines changed: 32 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@ import { publicProvider } from "wagmi/providers/public";
1212
import { Box, ChakraProvider } from "@chakra-ui/react";
1313
import { theme } from "@/theme";
1414
import Topbar from "@/components/Topbar";
15-
//Raimbow Kit
16-
import "@rainbow-me/rainbowkit/styles.css";
17-
import {
18-
connectorsForWallets,
19-
RainbowKitProvider,
20-
} from "@rainbow-me/rainbowkit";
21-
import { injectedWallet, coinbaseWallet } from "@rainbow-me/rainbowkit/wallets";
15+
import { MetaMaskConnector } from "wagmi/connectors/metaMask";
2216
import { MDXProvider } from "@mdx-js/react";
2317
import Components from "@/components/mdx/Components";
24-
import { RainbowKitSiweNextAuthProvider } from "@rainbow-me/rainbowkit-siwe-next-auth";
18+
import { InjectedConnector } from "wagmi/connectors/injected";
19+
import { CoinbaseWalletConnector } from "wagmi/connectors/coinbaseWallet";
2520

2621
// Config
2722
// ========================================================
@@ -33,30 +28,31 @@ const { chains, publicClient, webSocketPublicClient } = configureChains(
3328
[publicProvider()]
3429
);
3530

36-
const connectors = connectorsForWallets([
37-
{
38-
groupName: "Recommended",
39-
wallets: [
40-
injectedWallet({ chains }),
41-
coinbaseWallet({ chains, appName: "Developer DAO Academy" }),
42-
],
43-
},
44-
]);
45-
4631
/**
4732
* Configure publicProvider and allow for auto wallet connection
4833
*/
4934
const config = createConfig({
5035
autoConnect: true,
51-
connectors,
36+
connectors: [
37+
new MetaMaskConnector({ chains }),
38+
new InjectedConnector({
39+
chains,
40+
options: {
41+
name: "Injected",
42+
shimDisconnect: true,
43+
},
44+
}),
45+
new CoinbaseWalletConnector({
46+
chains,
47+
options: {
48+
appName: "Developer DAO Academy",
49+
},
50+
}),
51+
],
5252
publicClient,
5353
webSocketPublicClient,
5454
});
5555

56-
const getSiweMessageOptions = () => ({
57-
statement: "Sign in to Developer DAO Academy",
58-
});
59-
6056
// App Wrapper Component
6157
// ========================================================
6258
const MyApp: AppType<{ session: Session | null }> = ({
@@ -65,26 +61,20 @@ const MyApp: AppType<{ session: Session | null }> = ({
6561
}) => {
6662
return (
6763
<ChakraProvider theme={theme}>
68-
<SessionProvider session={session} refetchInterval={0}>
69-
<WagmiConfig config={config}>
70-
<RainbowKitSiweNextAuthProvider
71-
getSiweMessageOptions={getSiweMessageOptions}
64+
<WagmiConfig config={config}>
65+
<SessionProvider session={session} refetchInterval={0}>
66+
<Box
67+
p="1.25em"
68+
px="5%"
69+
mx={{ base: "2rem", md: "6rem", lg: "10rem" }}
7270
>
73-
<RainbowKitProvider chains={chains}>
74-
<Box
75-
p="1.25em"
76-
px="5%"
77-
mx={{ base: "2rem", md: "6rem", lg: "10rem" }}
78-
>
79-
<Topbar />
80-
<MDXProvider components={Components}>
81-
<Component {...pageProps} />{" "}
82-
</MDXProvider>
83-
</Box>
84-
</RainbowKitProvider>
85-
</RainbowKitSiweNextAuthProvider>
86-
</WagmiConfig>
87-
</SessionProvider>
71+
<Topbar />
72+
<MDXProvider components={Components}>
73+
<Component {...pageProps} />{" "}
74+
</MDXProvider>
75+
</Box>
76+
</SessionProvider>
77+
</WagmiConfig>
8878
</ChakraProvider>
8979
);
9080
};

yarn.lock

Lines changed: 3 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,6 @@
944944
"@emotion/weak-memoize" "^0.3.1"
945945
stylis "4.2.0"
946946

947-
"@emotion/hash@^0.8.0":
948-
version "0.8.0"
949-
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413"
950-
integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==
951-
952947
"@emotion/hash@^0.9.1":
953948
version "0.9.1"
954949
resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.1.tgz#4ffb0055f7ef676ebc3a5a91fb621393294e2f43"
@@ -1436,23 +1431,6 @@
14361431
resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-4.16.1.tgz#ee487620dc5135fd175ac7494b1c60c9f12c1e4b"
14371432
integrity sha512-gpZG0kGGxfemgvK/LghHdBIz+crHkZjzszja94xp4oytpsXrgt/Ice82MvPsWMleVIniKuARrowtsIsim0PFJQ==
14381433

1439-
"@rainbow-me/rainbowkit-siwe-next-auth@^0.2.0":
1440-
version "0.2.0"
1441-
resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit-siwe-next-auth/-/rainbowkit-siwe-next-auth-0.2.0.tgz#ea1004c38990b6a14abec61f2f6286d7bdc16e4a"
1442-
integrity sha512-U0GPPc5tRhNSLgdLb4sU6eha7qxIJmfNbUmcGeQGh7IR/jw3xFdYYKYaHcEG8rB09/yfEMQodwJiV+vrjta6zQ==
1443-
1444-
"@rainbow-me/rainbowkit@^1.0.4":
1445-
version "1.0.4"
1446-
resolved "https://registry.yarnpkg.com/@rainbow-me/rainbowkit/-/rainbowkit-1.0.4.tgz#22f74c35ba036f7d1deb02528b162691ac5a32af"
1447-
integrity sha512-ceW0azA1EynlM21zG/bpA7QsXx8taX3NoR78Z1RgbZwujM//6PWJQRGBA4VvHJkmuio/R2lfP51inJucs+i4gg==
1448-
dependencies:
1449-
"@vanilla-extract/css" "1.9.1"
1450-
"@vanilla-extract/dynamic" "2.0.2"
1451-
"@vanilla-extract/sprinkles" "1.5.0"
1452-
clsx "1.1.1"
1453-
qrcode "1.5.0"
1454-
react-remove-scroll "2.5.4"
1455-
14561434
"@rushstack/eslint-patch@^1.1.3":
14571435
version "1.3.2"
14581436
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.3.2.tgz#31b9c510d8cada9683549e1dbb4284cca5001faf"
@@ -2065,40 +2043,6 @@
20652043
"@typescript-eslint/types" "5.60.1"
20662044
eslint-visitor-keys "^3.3.0"
20672045

2068-
"@vanilla-extract/[email protected]":
2069-
version "1.9.1"
2070-
resolved "https://registry.yarnpkg.com/@vanilla-extract/css/-/css-1.9.1.tgz#337b79faa5f8f98915a90c3fe3c30b54be746c09"
2071-
integrity sha512-pu2SFiff5jRhPwvGoj8cM5l/qIyLvigOmy22ss5DGjwV5pJYezRjDLxWumi2luIwioMWvh9EozCjyfH8nq+7fQ==
2072-
dependencies:
2073-
"@emotion/hash" "^0.8.0"
2074-
"@vanilla-extract/private" "^1.0.3"
2075-
ahocorasick "1.0.2"
2076-
chalk "^4.1.1"
2077-
css-what "^5.0.1"
2078-
cssesc "^3.0.0"
2079-
csstype "^3.0.7"
2080-
deep-object-diff "^1.1.0"
2081-
deepmerge "^4.2.2"
2082-
media-query-parser "^2.0.2"
2083-
outdent "^0.8.0"
2084-
2085-
"@vanilla-extract/[email protected]":
2086-
version "2.0.2"
2087-
resolved "https://registry.yarnpkg.com/@vanilla-extract/dynamic/-/dynamic-2.0.2.tgz#13a3e461964c8029a52e6b6b631009ca6a8b27f5"
2088-
integrity sha512-U4nKaEQ8Kuz+exXEr51DUpyaOuzo24/S/k1YbDPQR06cYcNjQqvwFRnwWtZ+9ImocqM1wTKtzrdUgSTtLGIwAg==
2089-
dependencies:
2090-
"@vanilla-extract/private" "^1.0.3"
2091-
2092-
"@vanilla-extract/private@^1.0.3":
2093-
version "1.0.3"
2094-
resolved "https://registry.yarnpkg.com/@vanilla-extract/private/-/private-1.0.3.tgz#7ec72bc2ff6fe51f9d650f962e8d1989b073690f"
2095-
integrity sha512-17kVyLq3ePTKOkveHxXuIJZtGYs+cSoev7BlP+Lf4916qfDhk/HBjvlYDe8egrea7LNPHKwSZJK/bzZC+Q6AwQ==
2096-
2097-
"@vanilla-extract/[email protected]":
2098-
version "1.5.0"
2099-
resolved "https://registry.yarnpkg.com/@vanilla-extract/sprinkles/-/sprinkles-1.5.0.tgz#c921183ae518bb484299c2dc81f2acefd91c3dbe"
2100-
integrity sha512-W58f2Rzz5lLmk0jbhgStVlZl5wEiPB1Ur3fRvUaBM+MrifZ3qskmFq/CiH//fEYeG5Dh9vF1qRviMMH46cX9Nw==
2101-
21022046
21032047
version "1.2.0"
21042048
resolved "https://registry.yarnpkg.com/@wagmi/chains/-/chains-1.2.0.tgz#d59eaa70ec51a5fdcd113975926992acfb17ab12"
@@ -2549,11 +2493,6 @@ agentkeepalive@^4.2.1:
25492493
depd "^2.0.0"
25502494
humanize-ms "^1.2.1"
25512495

2552-
2553-
version "1.0.2"
2554-
resolved "https://registry.yarnpkg.com/ahocorasick/-/ahocorasick-1.0.2.tgz#9eee93aef9d02bfb476d9b648d9b7a40ef2fd500"
2555-
integrity sha512-hCOfMzbFx5IDutmWLAt6MZwOUjIfSM9G9FyVxytmE4Rs/5YDPWQrD/+IR1w+FweD9H2oOZEnv36TmkjhNURBVA==
2556-
25572496
ajv@^6.10.0, ajv@^6.12.4:
25582497
version "6.12.6"
25592498
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
@@ -2922,7 +2861,7 @@ chalk@^2.0.0:
29222861
escape-string-regexp "^1.0.5"
29232862
supports-color "^5.3.0"
29242863

2925-
chalk@^4.0.0, chalk@^4.1.1:
2864+
chalk@^4.0.0:
29262865
version "4.1.2"
29272866
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
29282867
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -2994,11 +2933,6 @@ cliui@^6.0.0:
29942933
strip-ansi "^6.0.0"
29952934
wrap-ansi "^6.2.0"
29962935

2997-
2998-
version "1.1.1"
2999-
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.1.1.tgz#98b3134f9abbdf23b2663491ace13c5c03a73188"
3000-
integrity sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA==
3001-
30022936
clsx@^1.1.0:
30032937
version "1.2.1"
30042938
resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12"
@@ -3121,17 +3055,12 @@ [email protected]:
31213055
dependencies:
31223056
tiny-invariant "^1.0.6"
31233057

3124-
css-what@^5.0.1:
3125-
version "5.1.0"
3126-
resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe"
3127-
integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==
3128-
31293058
cssesc@^3.0.0:
31303059
version "3.0.0"
31313060
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee"
31323061
integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==
31333062

3134-
csstype@^3.0.11, csstype@^3.0.2, csstype@^3.0.7:
3063+
csstype@^3.0.11, csstype@^3.0.2:
31353064
version "3.1.2"
31363065
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
31373066
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==
@@ -3177,16 +3106,6 @@ deep-is@^0.1.3:
31773106
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
31783107
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
31793108

3180-
deep-object-diff@^1.1.0:
3181-
version "1.1.9"
3182-
resolved "https://registry.yarnpkg.com/deep-object-diff/-/deep-object-diff-1.1.9.tgz#6df7ef035ad6a0caa44479c536ed7b02570f4595"
3183-
integrity sha512-Rn+RuwkmkDwCi2/oXOFS9Gsr5lJZu/yTGpK7wAaAIE75CC+LCGEZHpY6VQJa/RoJcrmaA/docWJZvYohlNkWPA==
3184-
3185-
deepmerge@^4.2.2:
3186-
version "4.3.1"
3187-
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
3188-
integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
3189-
31903109
default-browser-id@^3.0.0:
31913110
version "3.0.0"
31923111
resolved "https://registry.yarnpkg.com/default-browser-id/-/default-browser-id-3.0.0.tgz#bee7bbbef1f4e75d31f98f4d3f1556a14cea790c"
@@ -5004,13 +4923,6 @@ mdast-util-to-string@^3.0.0, mdast-util-to-string@^3.1.0:
50044923
dependencies:
50054924
"@types/mdast" "^3.0.0"
50064925

5007-
media-query-parser@^2.0.2:
5008-
version "2.0.2"
5009-
resolved "https://registry.yarnpkg.com/media-query-parser/-/media-query-parser-2.0.2.tgz#ff79e56cee92615a304a1c2fa4f2bd056c0a1d29"
5010-
integrity sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==
5011-
dependencies:
5012-
"@babel/runtime" "^7.12.5"
5013-
50144926
merge-stream@^2.0.0:
50154927
version "2.0.0"
50164928
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
@@ -5633,11 +5545,6 @@ optionator@^0.9.1:
56335545
type-check "^0.4.0"
56345546
word-wrap "^1.2.3"
56355547

5636-
outdent@^0.8.0:
5637-
version "0.8.0"
5638-
resolved "https://registry.yarnpkg.com/outdent/-/outdent-0.8.0.tgz#2ebc3e77bf49912543f1008100ff8e7f44428eb0"
5639-
integrity sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==
5640-
56415548
p-limit@^2.2.0:
56425549
version "2.3.0"
56435550
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
@@ -5965,16 +5872,6 @@ punycode@^2.1.0:
59655872
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
59665873
integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==
59675874

5968-
5969-
version "1.5.0"
5970-
resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.0.tgz#95abb8a91fdafd86f8190f2836abbfc500c72d1b"
5971-
integrity sha512-9MgRpgVc+/+47dFvQeD6U2s0Z92EsKzcHogtum4QB+UNd025WOJSHvn/hjk9xmzj7Stj95CyUAs31mrjxliEsQ==
5972-
dependencies:
5973-
dijkstrajs "^1.0.1"
5974-
encode-utf8 "^1.0.3"
5975-
pngjs "^5.0.0"
5976-
yargs "^15.3.1"
5977-
59785875
[email protected], qrcode@^1.5.1:
59795876
version "1.5.3"
59805877
resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.3.tgz#03afa80912c0dccf12bc93f615a535aad1066170"
@@ -6071,25 +5968,14 @@ react-is@^16.13.1, react-is@^16.7.0:
60715968
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
60725969
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
60735970

6074-
react-remove-scroll-bar@^2.3.3, react-remove-scroll-bar@^2.3.4:
5971+
react-remove-scroll-bar@^2.3.4:
60755972
version "2.3.4"
60765973
resolved "https://registry.yarnpkg.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.4.tgz#53e272d7a5cb8242990c7f144c44d8bd8ab5afd9"
60775974
integrity sha512-63C4YQBUt0m6ALadE9XV56hV8BgJWDmmTPY758iIJjfQKt2nYwoUrPk0LXRXcB/yIj82T1/Ixfdpdk68LwIB0A==
60785975
dependencies:
60795976
react-style-singleton "^2.2.1"
60805977
tslib "^2.0.0"
60815978

6082-
6083-
version "2.5.4"
6084-
resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.4.tgz#afe6491acabde26f628f844b67647645488d2ea0"
6085-
integrity sha512-xGVKJJr0SJGQVirVFAUZ2k1QLyO6m+2fy0l8Qawbp5Jgrv3DeLalrfMNBFSlmz5kriGGzsVBtGVnf4pTKIhhWA==
6086-
dependencies:
6087-
react-remove-scroll-bar "^2.3.3"
6088-
react-style-singleton "^2.2.1"
6089-
tslib "^2.1.0"
6090-
use-callback-ref "^1.3.0"
6091-
use-sidecar "^1.1.2"
6092-
60935979
react-remove-scroll@^2.5.5:
60945980
version "2.5.6"
60955981
resolved "https://registry.yarnpkg.com/react-remove-scroll/-/react-remove-scroll-2.5.6.tgz#7510b8079e9c7eebe00e65a33daaa3aa29a10336"

0 commit comments

Comments
 (0)