Giter Site home page Giter Site logo

Comments (6)

danfinlay avatar danfinlay commented on June 15, 2024 2

Yes, this would've been a breaking change, and so there was a very recent change to EIP-1193:

  • The current send() behavior which returns Promise<{ results: <any> }> will remain.
  • A new method request() will be added, which returns the intended result Promise<any>.

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1193.md

So this is indeed a problem with he docs: @BboyAkers is correct, and we should change to match his description.

from metamask-docs.

andy0130tw avatar andy0130tw commented on June 15, 2024 1

Yes. I just wanted to point out a mistake of documentation and it might lead to confusion when adapting MetaMask's provider with other frameworks like web3.js. Even the examples are incorrect.
I believe the current behavior is a design choice to be EIP-1193 compliant.

from metamask-docs.

BboyAkers avatar BboyAkers commented on June 15, 2024 1

I'll create a pull request and change it in the docs

from metamask-docs.

BboyAkers avatar BboyAkers commented on June 15, 2024

@jennypollack @danfinlay any idea on this? 🙂

from metamask-docs.

BboyAkers avatar BboyAkers commented on June 15, 2024

@andy0130tw it seems that if you do response.results, it will give you the array you're wanting. Are you expecting the array to be at the base of the response?

from metamask-docs.

BboyAkers avatar BboyAkers commented on June 15, 2024

Pull request made! #83

from metamask-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.