Code Monkey home page Code Monkey logo

Comments (9)

cjkoepke avatar cjkoepke commented on August 15, 2024 2

@alessandrokonrad For instance, I am building an interface that uses NFTs within your wallet to "login" to the website. If the user wants to log out (privacy or other), disconnecting your wallet could theoretically act as a catalyst or action to do so.

Also, what if you change your mind about trusting a website?

from nami.

rooooooooob avatar rooooooooob commented on August 15, 2024 2

Perhaps your view changed of the website, or you only wanted to check it out but would prefer it not have automatic access from now on, depending on how you're implementing your whitelist. It is probably something good to have. Could we start the discussion in the cardano-foundation/CIPs#88 over which events we need to put in the standard? It was an oversight I think as I had included a disconnect event in the Ergo EIP-0012 standard we based the CIP on.

from nami.

DEADPXLZ avatar DEADPXLZ commented on August 15, 2024 1

Agreed! Listening for disconnections is important as well as it enables more interaction via 3rd party apps and gets users closer to the classic 'account' user journey.

from nami.

alessandrokonrad avatar alessandrokonrad commented on August 15, 2024

onNetworkChange is a good idea. Gonna add that one.
With onDisconnect I'm not sure, because as soon as you remove the page from the whitelist, in going and outgoing connections to the webpage are blocked. Also I don't think this would be a typical event or where do you see this as useful?

from nami.

DEADPXLZ avatar DEADPXLZ commented on August 15, 2024

100% on the onNetworkChange(), thank you very much!

Regarding the onDisconnect() event, it's useful for updating the UI on apps that use the wallet during runtime.
Metamask also does this and they actually go the extra mile where you can actually trigger a disconnection from within the 3rd party website. LMKWYT

from nami.

alessandrokonrad avatar alessandrokonrad commented on August 15, 2024

So onDisconnect would probably work best then if an endpoint cardano.disable() exists as well right?
I'll think about the onDisconnect event.

from nami.

cjkoepke avatar cjkoepke commented on August 15, 2024

closer to the classic 'account' user journey.

This is the main point, user's should be able to interface with the wallet without necessarily opening the extension.

from nami.

alessandrokonrad avatar alessandrokonrad commented on August 15, 2024

I get the idea, but the reason why you connect the wallet in first place is because you trust the website you visit. Why would you want to disconnect it again?

from nami.

rooooooooob avatar rooooooooob commented on August 15, 2024

As the initial CIP-30 PR cardano-foundation/CIPs#88 was merged without an events API (since it wasn't finalized), we have put up a new PR cardano-foundation/CIPs#151 to amend it for events. Events-related discussion should take place in that PR.

from nami.

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.