Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
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
LuckySwap
interface
Commits
8a5045f6
Unverified
Commit
8a5045f6
authored
Oct 26, 2022
by
Zach Pomerantz
Committed by
GitHub
Oct 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: do not test rpc urls before walletconnecting (#5008)
parent
c1607bbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
index.ts
src/connection/index.ts
+19
-11
No files found.
src/connection/index.ts
View file @
8a5045f6
...
@@ -52,17 +52,25 @@ export const gnosisSafeConnection: Connection = {
...
@@ -52,17 +52,25 @@ export const gnosisSafeConnection: Connection = {
type
:
ConnectionType
.
GNOSIS_SAFE
,
type
:
ConnectionType
.
GNOSIS_SAFE
,
}
}
const
[
web3WalletConnect
,
web3WalletConnectHooks
]
=
initializeConnector
<
WalletConnect
>
(
const
[
web3WalletConnect
,
web3WalletConnectHooks
]
=
initializeConnector
<
WalletConnect
>
((
actions
)
=>
{
(
actions
)
=>
// Avoid testing for the best URL by only passing a single URL per chain.
new
WalletConnect
({
// Otherwise, WC will not initialize until all URLs have been tested (see getBestUrl in web3-react).
actions
,
const
RPC_URLS_WITHOUT_FALLBACKS
=
Object
.
entries
(
RPC_URLS
).
reduce
(
options
:
{
(
map
,
[
chainId
,
urls
])
=>
({
rpc
:
RPC_URLS
,
...
map
,
qrcode
:
true
,
[
chainId
]:
urls
[
0
],
},
}),
onError
,
{}
})
)
)
return
new
WalletConnect
({
actions
,
options
:
{
rpc
:
RPC_URLS_WITHOUT_FALLBACKS
,
qrcode
:
true
,
},
onError
,
})
})
export
const
walletConnectConnection
:
Connection
=
{
export
const
walletConnectConnection
:
Connection
=
{
connector
:
web3WalletConnect
,
connector
:
web3WalletConnect
,
hooks
:
web3WalletConnectHooks
,
hooks
:
web3WalletConnectHooks
,
...
...
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