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)
- Wrong account connected might confuse users and is potentionally dangerous HOT 1
- Move `wallet_*snap` API methods to Snaps docs
- Algolia Search Doesn't work with GitHub Preview HOT 4
- Move Snaps data callout to the data feature page
- Remove chain IDs section
- Snaps: Update Get Allowlisted to mention Snaps that do not require allowlisting and list permissions
- Update display tokens page to include token autodetection
- Document eth_sign discontinuation
- Snaps: Document initialConnections
- Metamask Prueba
- Prueba Meta HOT 7
- incorrect Node version in readme
- Documentation update for Snaps JSX UI
- Document new Snaps UI components that are only in JSX
- Document Snaps UI positioning in JSX
- How to for using custom components in JSX
- Update Gas API docs with secret-less call option
- TypeScript Definitions: Define the `MMError` Type HOT 2
- mask on HOT 2
- Migrate to Vercel redirects
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.