[FEATURE]: Centralize transaction initialization and quote fetching to avoid duplicate RPC calls in the widget
@CaptainLevi2k04 ci sta già lavorando.
Dal 1/9/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, react
- Ambito
- blockchain, frontend
Direzione di ricerca
Read stablepay-sdk/src/widget/TokenDropdown.jsx and stablepay-sdk/src/widget/TransactionReview.jsx to trace the duplicate Transaction initialization and quote fetching. Then inspect the widget context entry point to see how shared state is exposed. Done means initialization and quote fetching have a single owner and both components consume the same normalized state.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature and its Use Cases
The widget currently initializes transaction state and fetches quote-related data in more than one component.
Both TokenDropdown.jsx and TransactionReview.jsx instantiate Transaction, call init(), and in native-token flows may fetch quote data separately.
Why this matters:
- unnecessary duplicate RPC calls for the same network/token selection
- harder-to-maintain state flow
- greater risk of inconsistent quote or transaction state across components
- makes future additions like preflight validation, allowance checks, and multi-Djed support harder
Expected outcome:
- transaction initialization and quote fetching should be owned by a single layer
- components should consume normalized shared state instead of rebuilding it independently
- the widget should perform one consistent initialization flow per network/token selection
Additional Context
Current evidence from the code:
stablepay-sdk/src/widget/TokenDropdown.jsxinitializesTransactionand may fetch trade data during token selectionstablepay-sdk/src/widget/TransactionReview.jsxrepeats transaction initialization and quote fetching in its own effect
A cleaner design would move this into context and expose:
- loading state
- quote state
- normalized transaction details
- initialization errors
This would also pair well with current and future payment-flow work like stablecoin balance checks, fee configuration cleanup, and support for additional Djed variants.
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Lingua principale
- JavaScript
- Stelle
- 16
- Fork
- 29
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di StabilityNexus/StablePay
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
StabilityNexus/StablePay#64 · 1 commento ·
-
[BUG]: Missing SDK API documentation and incomplete developer-facing usage guide in StablePay READMEApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
StabilityNexus/StablePay#104 · 1 commento ·
-
[BUG]: `stablepay-sdk` README documents an unrelated thirdweb app instead of the actual SDK APIApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
StabilityNexus/StablePay#102 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
StabilityNexus/StablePay#96 · 1 commento ·
-
Bug: Missing import causes `calculateFutureScPrice` to fail at runtimeForse già presa @Rav1Chauhan l’ha presa 272 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
StabilityNexus/StablePay#85 · 1 commento ·
Tutte le issue di StabilityNexus/StablePay
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 82/100
Leonxlnx/taste-skill#216 ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: 11 broken linksAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
all-contributors/cli#690 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno