Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use different plugin for polyfilling / Fix walletconnect #332

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

ebma
Copy link
Member

@ebma ebma commented Jan 22, 2024

What:

The issue about the WalletConnect connection not working is fixed.

How:

Apparently the polyfills are causing some issues, see this comment. The issue was addressed by changing the polyfills.

Comments:

It happened to me that a no matching key. keychain .... error was shown in the console when trying to sign a transaction. It's not 100% clear to me why this happened but I found some related issue tickets which suggested either updating the dependencies or cleaning local storage. Deleting the walletconnect-related items from local storage and then disconnecting, reconnecting again fixed this issue for me.

Closes #327.

@ebma ebma linked an issue Jan 22, 2024 that may be closed by this pull request
Copy link

netlify bot commented Jan 22, 2024

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
🔨 Latest commit 60f1269
🔍 Latest deploy log https://app.netlify.com/sites/rococo-souffle-a625f5/deploys/65ae915a524bdf000897173a
😎 Deploy Preview https://deploy-preview-332--rococo-souffle-a625f5.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ebma ebma force-pushed the 327-wallet-connect-not-working branch from 02e79d7 to 43b6ec7 Compare January 22, 2024 15:50
@ebma ebma marked this pull request as ready for review January 22, 2024 15:50
@ebma ebma changed the title Use different plugin for polyfilling Use different plugin for polyfilling / Fix walletconnect Jan 22, 2024
Copy link

yarn.lock changes

Summary

Status Count
ADDED 63
UPDATED 9
REMOVED 7
Click to toggle table visibility
Name Status Previous Current
@esbuild-plugins/node-globals-polyfill REMOVED 0.1.1 -
@esbuild-plugins/node-modules-polyfill REMOVED 0.1.4 -
@ioredis/commands ADDED - 1.2.0
@jspm/core ADDED - 2.0.1
@parcel/watcher ADDED - 2.4.0
@parcel/watcher-android-arm64 ADDED - 2.4.0
@parcel/watcher-darwin-arm64 ADDED - 2.4.0
@parcel/watcher-darwin-x64 ADDED - 2.4.0
@parcel/watcher-freebsd-x64 ADDED - 2.4.0
@parcel/watcher-linux-arm-glibc ADDED - 2.4.0
@parcel/watcher-linux-arm64-glibc ADDED - 2.4.0
@parcel/watcher-linux-arm64-musl ADDED - 2.4.0
@parcel/watcher-linux-x64-glibc ADDED - 2.4.0
@parcel/watcher-linux-x64-musl ADDED - 2.4.0
@parcel/watcher-wasm ADDED - 2.3.0
@parcel/watcher-win32-arm64 ADDED - 2.4.0
@parcel/watcher-win32-ia32 ADDED - 2.4.0
@parcel/watcher-win32-x64 ADDED - 2.4.0
@walletconnect/core UPDATED 2.10.4 2.11.0
@walletconnect/jsonrpc-ws-connection UPDATED 1.0.13 1.0.14
@walletconnect/keyvaluestorage UPDATED 1.0.2 1.1.1
@walletconnect/sign-client UPDATED 2.10.4 2.11.0
@walletconnect/types UPDATED 2.10.4 2.11.0
@walletconnect/universal-provider UPDATED 2.10.4 2.11.0
@walletconnect/utils UPDATED 2.10.4 2.11.0
acorn UPDATED 8.11.2 8.11.3
citty ADDED - 0.1.5
clipboardy ADDED - 4.0.0
cluster-key-slot ADDED - 1.1.2
consola ADDED - 3.2.3
cookie-es ADDED - 1.0.0
defu ADDED - 6.1.4
denque ADDED - 2.1.0
destr ADDED - 2.0.2
detect-libc ADDED - 1.0.3
esbuild-plugin-polyfill-node ADDED - 0.3.0
get-port-please ADDED - 3.1.2
h3 ADDED - 1.10.0
http-shutdown ADDED - 1.2.2
idb-keyval ADDED - 6.2.1
ioredis ADDED - 5.3.2
iron-webcrypto ADDED - 1.0.0
is-docker ADDED - 3.0.0
is-inside-container ADDED - 1.0.0
is-wsl ADDED - 3.1.0
is64bit ADDED - 2.0.0
isomorphic-unfetch ADDED - 3.1.0
jsonc-parser ADDED - 3.2.0
listhen ADDED - 1.5.6
lodash.defaults ADDED - 4.2.0
lodash.isarguments ADDED - 3.1.0
lru-cache UPDATED 10.0.1 10.1.0
magic-string REMOVED 0.25.9 -
mlly ADDED - 1.5.0
mri ADDED - 1.2.0
napi-wasm ADDED - 1.1.0
node-addon-api ADDED - 7.1.0
node-fetch-native ADDED - 1.6.1
node-forge ADDED - 1.3.1
ofetch ADDED - 1.3.3
pathe ADDED - 1.1.2
pkg-types ADDED - 1.0.3
radix3 ADDED - 1.1.0
redis-errors ADDED - 1.2.0
redis-parser ADDED - 3.0.0
rollup-plugin-inject REMOVED 3.0.2 -
rollup-plugin-node-polyfills REMOVED 0.2.1 -
safe-json-utils REMOVED 1.1.1 -
sourcemap-codec REMOVED 1.4.8 -
standard-as-callback ADDED - 2.1.0
std-env ADDED - 3.7.0
system-architecture ADDED - 0.1.0
ufo ADDED - 1.3.2
uncrypto ADDED - 0.1.3
unenv ADDED - 1.9.0
unfetch ADDED - 4.2.0
unstorage ADDED - 1.10.1
untun ADDED - 0.1.3
uqr ADDED - 0.1.2

@ebma
Copy link
Member Author

ebma commented Jan 22, 2024

@prayagd please check out the deploy preview and let me know if it works for you.

@TorstenStueber
Copy link
Member

@ebma why do we need to polyfill Node.JS in a frontend application in the first place? This sounds strange to me.

Did you check whether removing this polyfill altogether works as well (see the second paragraph of this comment)?

@ebma
Copy link
Member Author

ebma commented Feb 1, 2024

Good question. I looked it up again and I found this commit. Seems like I added the polyfills for the stellar-sdk. Then I checked if there are still errors and indeed, without the polyfills the stellar-sdk throws some errors.
image

We could try to reduce the polyfills to the bare minimum instead of using the default configuration but I don't think that it's that important. What do you think @TorstenStueber?

@prayagd
Copy link
Collaborator

prayagd commented Feb 7, 2024

@ebma i am able to connect on Amplitude but it fails on Pendulum as the wallet does not load Screenshot 2024-02-07 at 6.04.22 PM.png

I also see and error saying error while connecting the node

@ebma
Copy link
Member Author

ebma commented Feb 7, 2024

I think that's unrelated and more because our RPC nodes on Pendulum are still very slow and reject connections a lot.

@TorstenStueber
Copy link
Member

@ebma about the polyfills: I remember now and never liked this part of the stellar-sdk, quite bloated and with unnecessary dependencies. Okay, so then we need to keep this.

Copy link
Contributor

@gonzamontiel gonzamontiel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me, didn't test.

@gonzamontiel
Copy link
Contributor

I think that's unrelated and more because our RPC nodes on Pendulum are still very slow and reject connections a lot.

I can confirm this, we experience random failures while accessing Pendulum RPC nodes from the portal.

@prayagd
Copy link
Collaborator

prayagd commented Feb 12, 2024

I think that's unrelated and more because our RPC nodes on Pendulum are still very slow and reject connections a lot.
@ebma can we do anything about this? personally i think its not so nice experience to get that error often

@ebma
Copy link
Member Author

ebma commented Feb 12, 2024

Do you still experience issues @prayagd? I tested it just now, refreshing https://portal.pendulumchain.org/pendulum/dashboard quite often but it doesn't fail for me anymore.

But anyways, this is unrelated to this PR so I'll merge it now.

@ebma ebma merged commit 2c7cb1d into staging Feb 12, 2024
5 checks passed
@ebma ebma deleted the 327-wallet-connect-not-working branch February 12, 2024 10:22
@ebma ebma restored the 327-wallet-connect-not-working branch February 16, 2024 14:58
@ebma
Copy link
Member Author

ebma commented Mar 15, 2024

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wallet Connect not working
4 participants