BUG: Flaky Network Switching Validation

Abierto
#57 0 comentarios 0 reacciones 0 asignados Ver en GitHub

@Muneerali199 ya está trabajando en esto.

Desde el 15/11/2026.

  • #112 de @Muneerali199 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript, react

Línea de trabajo

Start by reading TransactionReview.jsx, especially handleBuySc and its network switch flow. Reproduce the mismatch by switching MetaMask to a different network and submitting a transaction; trace how the provider chain ID and freshWalletClient.chain.id are checked. Done when a successful network switch lets the transaction proceed immediately without a false mismatch error.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

[y] I have checked for duplicate issues

Description
In TransactionReview.jsx, the handleBuySc function performs a manual verification of the network after switching. It compares window.ethereum chain ID with the freshWalletClient.chain.id. This logic is brittle because freshWalletClient might maintain an old reference or the provider might not have emitted the event yet, leading to false positives for "Network mismatch" errors.

How to Reproduce

  1. Set MetaMask to a network different from the one selected in the widget.
  2. Click "Send Transaction".
  3. Approve the network switch in MetaMask.

Expected Behavior
The transaction proceeds immediately after the switch.

Actual Behavior
Occasionally, the code throws Wallet client chain mismatch, forcing the user to click the button again.

[y] I want to work on this issue

Lenguaje dominante
JavaScript
Estrellas
16
Forks
29
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de StabilityNexus/StablePay

Todos los issues de StabilityNexus/StablePay

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.