|
1 | 1 | import Favicon from '@assets/favicon.png'; |
2 | | -import { config, domains, environment, projectId } from '@lib/config'; |
| 2 | +import { accessAuth } from '@lib/api/backend'; |
| 3 | +import { config, projectId } from '@lib/config'; |
3 | 4 | import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; |
4 | 5 | import { EthAddress } from '@typedefs/blockchain'; |
5 | 6 | import { ConnectKitProvider, getDefaultConfig, SIWEConfig, SIWEProvider } from 'connectkit'; |
6 | 7 | import { generateNonce, SiweMessage } from 'siwe'; |
7 | 8 | import { createConfig, WagmiProvider } from 'wagmi'; |
8 | | -import { routePath } from '../routes/route-paths'; |
9 | 9 |
|
10 | 10 | const siweConfig: SIWEConfig = { |
11 | 11 | getNonce: async () => { |
@@ -35,11 +35,7 @@ const siweConfig: SIWEConfig = { |
35 | 35 | const chainId = siweMessage.chainId; |
36 | 36 | const address = siweMessage.address; |
37 | 37 |
|
38 | | - const response = { |
39 | | - accessToken: '123', |
40 | | - refreshToken: '456', |
41 | | - expiration: 2819859200, |
42 | | - }; // TODO: Remove (SIWE disabled) |
| 38 | + const response = await accessAuth({ message, signature }); |
43 | 39 |
|
44 | 40 | localStorage.setItem('chainId', chainId.toString()); |
45 | 41 | localStorage.setItem('address', address); |
@@ -119,26 +115,6 @@ export const Web3Provider = ({ children }) => { |
119 | 115 | '--ck-connectbutton-font-weight': '600', |
120 | 116 | }} |
121 | 117 | options={{ |
122 | | - disclaimer: ( |
123 | | - <> |
124 | | - By connecting your wallet you agree to the{' '} |
125 | | - <a |
126 | | - target="_blank" |
127 | | - rel="noopener noreferrer" |
128 | | - href={`https://${domains[environment]}${routePath.termsAndConditions}`} |
129 | | - > |
130 | | - Terms & Conditions |
131 | | - </a>{' '} |
132 | | - and{' '} |
133 | | - <a |
134 | | - target="_blank" |
135 | | - rel="noopener noreferrer" |
136 | | - href={`https://${domains[environment]}${routePath.privacyPolicy}`} |
137 | | - > |
138 | | - Privacy Policy |
139 | | - </a> |
140 | | - </> |
141 | | - ), |
142 | 118 | enforceSupportedChains: true, |
143 | 119 | }} |
144 | 120 | > |
|
0 commit comments