Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Issues upgrading from react-celo 4 to react-celo 5.0.3 with WCv2 #354

Closed
1 task done
jeanregisser opened this issue Mar 31, 2023 · 4 comments
Closed
1 task done
Assignees
Labels
bug Something isn't working

Comments

@jeanregisser
Copy link
Contributor

jeanregisser commented Mar 31, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Description

I've had some issues upgrading from react-celo 4 to react-celo 5.0.3 with ChurritoFi.

These are the errors I'm getting on the dapp side after connecting with WCv2:

  • [react-celo] wallet-connect on-session-update Error: CeloProvider already stopped
  • [react-celo] wallet-connect onSessionCreated error TypeError: Cannot read properties of undefined (reading 'namespaces')

Another smaller issue is the reported dappName keeps react-celo and doesn't use the provided value.

Side note: I noticed https://react-celo.vercel.app is still on react-celo 4.

Steps to reproduce

  1. Go to https://react-celo-git-fix-wc-url-c-labs.vercel.app/ (last deploy from last merged PR fix: wc register url #350)
  2. Connect with Valora
  3. Try switching network

Or with the ChurritoFi preview PR:

  1. Go to https://frontend-pr-2-e37n.onrender.com
  2. Connect with Valora
  3. Errors are visible in the browser console quickly after connecting, most actions then don't work

Expected behavior

We shouldn't see errors about the provider and interactions with the wallet/rpc node should continue working.

Screenshot

Screenshot 2023-03-31 at 18 27 16

And this is a screenshot showing the incorrect name shown when connecting to ChurritoFi using Valora:

Where is the problem happening?

Both

Environment

Device: iPhone
OS: iOS 16.4
Browser: Latest Chrome on MacOS Monterey

What version of react-celo were you using? (This can be found in the list of wallets in the "Connect" modal)

5.0.3

What wallet were you using?

Valora

What is the dApp URL? (if applicable)

https://frontend-pr-2-e37n.onrender.com

Additional context

Here's the PR on ChurritoFi with the changes: ChurritoFi/frontend#2

@jeanregisser jeanregisser added the bug Something isn't working label Mar 31, 2023
@aaronmgdr
Copy link
Member

little update: ive been working thru this (and other wc issues found)

Status now is that valora (and the wc reference wallet) both seem to be working great. however other wallets like omni im struggling with. Specifically there is a bit. in the wc spec that a wallet should refuse connection unless it supports all requiredNamespace and sadly this is exactly what OMNI wallet does. The solution is supposed to be to use optionalNamespaces for optional chains but no wallet seems to look at that property.

@aaronmgdr
Copy link
Member

@jeanregisser I just published @celo/react-celo@5.0.4-beta.1 https://www.npmjs.com/package/@celo/react-celo/v/5.0.4-beta.1

which from what I see solves these issues. Please let me know if you find anythng else

@jeanregisser
Copy link
Contributor Author

Hey, sorry for the late reply, I just upgraded to react-celo 5.0.4 and it seems the WCv2 issues are fixed.

Unfortunately I still see the exception being thrown about CeloProvider: celo-provider.js:117 Uncaught (in promise) Error: CeloProvider already stopped.

This causes most data retrieval to fail. Making the dapp mostly unusable.

You can see this for yourself on https://frontend-pr-3-vl5x.onrender.com/app/dashboard (PR ChurritoFi/frontend#3).

Is there a chance this can be fixed before the WCv1 shutdown? Happy to help debug/test fixes quickly.
@aaronmgdr @dckesler

@arthurgousset
Copy link

arthurgousset commented Aug 30, 2023

Brief note: closing this issue because the bug is fixed and new react-celo version was released.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants