[BUG] Metamask Provider Ignored in StablePay/djed-sdk/src/web3.js

Open
#63 1 comment 0 reactions 0 assignees View on GitHub

@Rav1Chauhan is already working on this.

Since Feb 23, 2026.

  • #89 by @Rav1Chauhan — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
1/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript

Research direction

The issue points to web3.js line 4. Read the getWeb3(URI) initialization logic and check how it handles window.ethereum; the expected behavior is to pass the injected provider to the Web3 constructor. Done means transactions trigger the Metamask popup when the provider is present. An open pull request (#89) is already linked to this issue.

Written by the indexing model from the issue text.

Description

[y] I have checked for duplicate issues.

Description:
The SDK's Web3 initialization logic detects Metamask (window.ethereum) but fails to use it, instead creating a fresh Web3 instance pointing to a static URI.

How to Reproduce:

  1. Call getWeb3(URI) in a browser with Metamask installed.
  2. Try to perform a state-changing transaction using the returned instance.

Actual Behaviour:
The SDK connects to the network via the provided URI, but transactions fail to trigger a Metamask popup because the injected provider is never passed to the Web3 constructor.

Expected Behaviour:
If window.ethereum is present, the SDK should initialize Web3 using new Web3(window.ethereum).

Location: web3.js line 4

[y] I want to work on this issue

Dominant language
JavaScript
Stars
16
Forks
29
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/StablePay

All issues in StabilityNexus/StablePay

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.