Giter VIP home page Giter VIP logo

Comments (12)

pedrouid avatar pedrouid commented on July 25, 2024 2

hey @aksdevac @REPTILEHAUS... it's true that we document this but it's common practice to distribute both CJS and UMD bundles

All WalletConnect packages can fetched as UMD bundles from unpkg.com

Alternatively you can download the latest minified fields from our releases pages:

https://github.com/walletconnect/walletconnect-monorepo/releases

from walletconnect-docs.

REPTILEHAUS avatar REPTILEHAUS commented on July 25, 2024

+1 for this

from walletconnect-docs.

REPTILEHAUS avatar REPTILEHAUS commented on July 25, 2024

@pedrouid Im trying to use the CDN versions in this way:

included into angular apps index.html file

  <script src="https://cdn.jsdelivr.net/npm/@walletconnect/[email protected]/lib/index.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@walletconnect/[email protected]/lib/index.min.js"></script>  
  <script src="https://cdn.jsdelivr.net/npm/@walletconnect/[email protected]/dist/umd/index.min.js"></script>    

in my service then

declare var WalletConnectProvider: any
declare var WalletConnect: any 

and using it in a function like so:

        const provider = new WalletConnectProvider.default({
            infuraId: "xxxxxx",
        });

        await provider.enable();
        
        if (provider.connected) {
            console.log('wallet connect address', provider.accounts[0]);
        }
        
        const web3 = new ethers.providers.Web3Provider(provider);
        console.log('web3', web3);

When I run it the first time I get the modal. If I refresh the page I would expect provider.connected to return true because I can see the cookie saved in local storage but it does not, it hangs on the await provider.enable(); is there any example implementations of using WalletConnect in an Angular app, Ive tried a couple of things but have had no success.

from walletconnect-docs.

leeduckgo avatar leeduckgo commented on July 25, 2024

Sorry……I am confusing that how can I use "the latest minified fields" in my React Project.
"yarn add" is not working?

from walletconnect-docs.

imaksp avatar imaksp commented on July 25, 2024

@leeduckgo for React you can directly add using yarn or npm as per this documentation:
https://docs.walletconnect.org/quick-start/dapps/web3-provider

from walletconnect-docs.

joharzmn avatar joharzmn commented on July 25, 2024

Is there any update on how to use WalletConnect with angular?

from walletconnect-docs.

imaksp avatar imaksp commented on July 25, 2024

@joharzmn Hi, you can download web3 provider min js from here & use it directly by importing it in your index.html
https://github.com/WalletConnect/walletconnect-monorepo/releases/tag/1.7.7

from walletconnect-docs.

leeduckgo avatar leeduckgo commented on July 25, 2024

@leeduckgo for React you can directly add using yarn or npm as per this documentation: https://docs.walletconnect.org/quick-start/dapps/web3-provider

thanks!

from walletconnect-docs.

joharzmn avatar joharzmn commented on July 25, 2024

@aksdevac I want to use QRCode can I use that as well by download js files?

from walletconnect-docs.

imaksp avatar imaksp commented on July 25, 2024

@aksdevac I want to use QRCode can I use that as well by download js files?

Yes

from walletconnect-docs.

joharzmn avatar joharzmn commented on July 25, 2024

@aksdevac It worked but I had to add WalletConnect.default instead of just using WalletConnect when using cdn.

from walletconnect-docs.

joharzmn avatar joharzmn commented on July 25, 2024

@aksdevac cdn is working fine. But there is one problem I am facing on mobile.
When we call SignPersonalMessage function it's redirecting to the AppStore instead of MetaMask app. Do you know what can be wrong ?

from walletconnect-docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.