Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
4497dc09
Commit
4497dc09
authored
Dec 18, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix provider configuration
parent
e25be8df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
next.config.js
next.config.js
+1
-0
Web3ModalProvider.tsx
ui/shared/Web3ModalProvider.tsx
+12
-17
No files found.
next.config.js
View file @
4497dc09
...
...
@@ -31,6 +31,7 @@ const moduleExports = {
},
);
config
.
resolve
.
fallback
=
{
fs
:
false
,
net
:
false
,
tls
:
false
};
config
.
externals
.
push
(
'
pino-pretty
'
,
'
lokijs
'
,
'
encoding
'
);
return
config
;
},
...
...
ui/shared/Web3ModalProvider.tsx
View file @
4497dc09
import
{
useColorMode
}
from
'
@chakra-ui/react
'
;
import
{
jsonRpcProvider
}
from
'
@wagmi/core/providers/jsonRpc
'
;
import
{
createWeb3Modal
,
useWeb3ModalTheme
}
from
'
@web3modal/wagmi/react
'
;
import
{
createWeb3Modal
,
useWeb3ModalTheme
,
defaultWagmiConfig
}
from
'
@web3modal/wagmi/react
'
;
import
React
from
'
react
'
;
import
type
{
Chain
}
from
'
wagmi
'
;
import
{
configureChains
,
createConfig
,
WagmiConfig
}
from
'
wagmi
'
;
import
{
WalletConnectConnector
}
from
'
wagmi/connectors/walletConnect
'
;
import
{
configureChains
,
WagmiConfig
}
from
'
wagmi
'
;
import
config
from
'
configs/app
'
;
import
colors
from
'
theme/foundations/colors
'
;
import
{
BODY_TYPEFACE
}
from
'
theme/foundations/typography
'
;
import
zIndices
from
'
theme/foundations/zIndices
'
;
const
feature
=
config
.
features
.
blockchainInteraction
;
...
...
@@ -41,7 +43,7 @@ const getConfig = () => {
},
};
const
{
publicClient
,
webSocketPublicClient
,
chains
}
=
configureChains
(
const
{
chains
}
=
configureChains
(
[
currentChain
],
[
jsonRpcProvider
({
...
...
@@ -52,16 +54,9 @@ const getConfig = () => {
],
);
const
wagmiConfig
=
createConfig
({
autoConnect
:
true
,
connectors
:
[
new
WalletConnectConnector
({
chains
,
options
:
{
projectId
:
feature
.
walletConnect
.
projectId
,
showQrModal
:
false
},
}),
],
publicClient
,
webSocketPublicClient
,
const
wagmiConfig
=
defaultWagmiConfig
({
chains
,
projectId
:
feature
.
walletConnect
.
projectId
,
});
createWeb3Modal
({
...
...
@@ -69,10 +64,10 @@ const getConfig = () => {
projectId
:
feature
.
walletConnect
.
projectId
,
chains
,
themeVariables
:
{
'
--w3m-font-family
'
:
'
Inter, sans-serif
'
,
'
--w3m-accent
'
:
'
#2B6CB0
'
,
// blue.400
'
--w3m-font-family
'
:
`
${
BODY_TYPEFACE
}
, sans-serif`
,
'
--w3m-accent
'
:
colors
.
blue
[
600
],
'
--w3m-border-radius-master
'
:
'
2px
'
,
'
--w3m-z-index
'
:
1400
,
'
--w3m-z-index
'
:
zIndices
.
modal
,
},
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment