Comments (6)
Yes, this would've been a breaking change, and so there was a very recent change to EIP-1193:
- The current
send()
behavior which returnsPromise<{ results: <any> }>
will remain. - A new method
request()
will be added, which returns the intended resultPromise<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.
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.
I'll create a pull request and change it in the docs
from metamask-docs.
@jennypollack @danfinlay any idea on this? 🙂
from metamask-docs.
@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.
Pull request made! #83
from metamask-docs.
Related Issues (20)
- Add documentation for improved image support in Snaps CLI HOT 1
- Returns a string instead of a BigInteger[] HOT 2
- Just exploring
- Add PR template with checkbox for "What's new?"
- Prepare docs for internationalization
- Update Services code samples
- Separate tabs in some wallet pages
- Incorrect Link Destination for 'MetaMask SDK' Footer Link Results in 404 Error
- Feature : Scroll to Top Button for Improved User Experience HOT 1
- Add Snaps transaction insights feature page
- Add Snaps notifications feature page
- Add Snaps storage feature page
- Add Snaps cron jobs feature page
- Add Snaps network access feature page
- Add Snaps lifecycle hooks feature page
- Add Snaps dialogs feature page
- Add Snaps home pages feature page
- Add links to missing examples
- Update allowedOrigins example to have https: protocol for sites
- Example code on Connect to a Snap page should match EIP-6963 standards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metamask-docs.