decentraland / decentraland-connect Goto Github PK
View Code? Open in Web Editor NEWConnect your Ethereum wallet from different providers
Connect your Ethereum wallet from different providers
Wallet link and network providers are using getRpcUrls directly while wallet connect is using the configuration object.
When you press 'Formatic' nothing pop ups. Windows 10, Brave, shields disabled.
Unnecessary urls are:
The following problem is recurrently found when installing our repositories:
Running npm install
on some of our dapps like the builder
breaks the CI changing the ethereumjs-abi
resolved URL to ssh instead of https. Example of this happening
This is due to the version of @web3-react/walletconnect-connector that we're using. The ethereumjs-abi
seems to have been removed in the upcoming versions of the library. Updating the library when the new version comes out seems to be the solution.
Our current implementation of WalletConnect is implementing BaseWalletConnect
in the same file to leverage the new version of @walletconnect/web3-provider
. The original implementation used the BaseConnector imported from web3-react but the version there is outdated.
Once web3-react updates their dependencies, we can go back to the original implementation of the connector
This issue is blocked until https://github.com/NoahZinsmeister/web3-react comes out of alpha (currently v7.0.2-alpha.0)
We'd like to update the dependency as it moves from using web3-provider-engine, which causes quite a few problems (like a mandatory pooling mechanism) to a better implementation
See here
send
sendAsync
request
Here: https://github.com/decentraland/decentraland-connect/blob/master/src/configuration.ts#L20
Otherwise you get this error when connected to Polygon:
When connected to a wallet connect enabled wallet, events do not trigger correctly. This creates the following scenarios:
// Request
curl --request POST \
--url 'https://rpc.decentraland.org/mainnet?project=walletconnect_v2' \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'authority: rpc.decentraland.org' \
--header 'dnt: 1' \
--header 'origin: http://localhost:3000' \
--header 'referer: http://localhost:3000/' \
--header 'sec-ch-ua: "Not:A-Brand";v="99", "Chromium";v="112"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: cross-site' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "test",
"params": []
}'
// Response
HTTP/1.1 503 Service Unavailable
Cf-Ray: 7ba73e39cb7bab1d-EZE
Connection: close
Content-Length: 33
Content-Type: text/plain;charset=UTF-8
Date: Wed, 19 Apr 2023 18:34:41 GMT
Server: cloudflare
Strict-Transport-Security: max-age=15552000; includeSubDomains; preload
X-Content-Type-Options: nosniff
No Provider available for mainnet
Checking logs, it seems that the test
rpc method is being called which seems to be unsupported.
{"jsonrpc":"2.0","id":1,"error":{"code":-32601,"message":"The method test does not exist/is not available"}}
Using WallectConnect default rpcs seem to work fine
There seems to be an error that is happening quite frequently in the Explorer that makes the explorer crash.
The error seems to be related to decentraland-connect
not handling properly an error and is shown as:
Error:
PollingBlockTracker - encountered an error while attempting to update latest block:
undefined
Stacktrace
(Most recent call first)
File ../node_modules/eth-block-tracker/src/polling.js:51:24 in e/<
const newErr = new Error(`PollingBlockTracker - encountered an error while attempting to ...
File ../node_modules/regenerator-runtime/runtime.js:63:40 in l
return { type: "normal", arg: fn.call(obj, arg) };
File ../node_modules/regenerator-runtime/runtime.js:293:22 in c/a._invoke
var record = tryCatch(innerFn, self, context);
File ../node_modules/regenerator-runtime/runtime.js:118:21 in k/</<
return this._invoke(method, arg);
File ../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:20 in r
var info = gen[key](arg);
File ../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/asyncToGenerator.js:29:9 in u
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
Check here for more info.
Add Polygon main and test nets to WalletConnect rpcs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.