Code Monkey home page Code Monkey logo

Comments (5)

BelfordZ avatar BelfordZ commented on July 28, 2024

update: It shouldnt matter in relation to connecting, only disconnecting.

from core.

BelfordZ avatar BelfordZ commented on July 28, 2024

another update: there is currently a bug where if you call revokePermissions while there is a pending confirmation, the confirmation is not cleared.

This applies when either queueing is enabled or disabled.

from core.

BelfordZ avatar BelfordZ commented on July 28, 2024

Todo:

  • if a dapp disconnects, but theres requests from several dapps, when the queueing is turned off it will clear all requests (not just the ones for the currently focused dapp)
  • with queuing on, it will clear only the requests for the dapp who was disconnected

from core.

BelfordZ avatar BelfordZ commented on July 28, 2024

Questions:

  • how should we trigger the flushing / clearing of pending confirms? Should we listen to changes on permissionController, or directly call a method/helper from inside the revokePermissions handler? -> the stateChange event should do the trick, but I really think we should be cautious of using patches for this one.
  • When a dapp disconnects, aka the permissions are removed for the dapp, are we currently unsetting / deleting the value stored for the domain in the selectedNetworkController? This would cause SelectedNetworkController:stateChange to fire, which is currently handled in QueuedRequestController as a means of deciding when to flush the queue. Its possible that we just need to appropriately handle the patch for the network selection removal (or better yet, check in the selectedNEtworkController state to see if theres any network selection). In addition, we could also handle clearing the non-queued requests in this same handler (basically just copy/call this code)

from core.

adonesky1 avatar adonesky1 commented on July 28, 2024

When a dapp disconnects, aka the permissions are removed for the dapp, are we currently unsetting / deleting the value stored for the domain in the selectedNetworkController?

yes we are here:

this.#unsetNetworkClientIdForDomain(domain);

from core.

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.