MetaMask / MetaMask/detect-provider

Property 'request' does not exist on type 'MetaMaskEthereumProvider'.ts(2339)

Open
#68 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
238
Forks
63
PR merge metrics
No merged PRs in 30d

Description

I am getting this using the request similar to the preview example:

```
import detectEthereumProvider from "@metamask/detect-provider";

const provider = await detectEthereumProvider({
mustBeMetaMask: true,
});

if (provider) {
const accounts = provider?.request?.({
method: "eth_requestAccounts",
});

return accounts?.[0];
};

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Begin with the TypeScript snippet in the issue and inspect the detected provider type and preview example. Reproduce the ts(2339) error with the shown request call; done means the documented usage and published typings agree on whether request is available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.