Conversation
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
GQL Injection in deeplink query functionsThe Hash-based path: Legacy detail-based path (higher risk): Impact is low for The Graph (read-only, public data, no mutations), but it's still a bad pattern — especially if these query functions are reused against a private GraphQL backend later. Recommend adding:
|
|
I think the new deeplink flow regresses support for the legacy detail-based URL format. Before this branch,
In this branch, That means a legacy URL like: The API route and docs still claim to support the legacy detail-based lookup, so right now the server path exists but the client no longer exercises it. I'll let you decide whether this is still worth supporting, but perhaps we should add a to-do item to tidy it up if we no longer intend to support it. |
| removeSearchParams(...DEEPLINK_PARAM_KEYS); | ||
| }, [removeSearchParams]); | ||
|
|
||
| // Handle browser back button |
There was a problem hiding this comment.
There's a state bug here: when the panel was opened from a table row, hitting browser back closes the panel and clears directQuery, but it never resets openedFromTable.
That leaves useDeeplinkQuery permanently disabled for the rest of this provider session (enabled: hasDeeplink && !openedFromTable), so a later in-app deeplink navigation on the same page can be ignored.
I think this handler should also clear openedFromTable when it dismisses the panel.
| } | ||
| oracleEthersServices.forEach((factory) => { | ||
| factory({ | ||
| // Ethers transaction updates are rare — for now they're no-ops since |
There was a problem hiding this comment.
Question: do we still want tx-hash deeplinks to resolve immediately for fresh transactions, before the subgraph has indexed them?
Previously useQueryInSearchParams pushed inbound transactionHash values through updateFromTransactionHash on the ethers APIs, which gave us a receipt-based fallback while indexing caught up. With these callbacks now as no-ops, and /api/resolve-deeplink only searching subgraphs, it looks like a fresh tx deeplink can 404 until indexing completes.
If that old behavior was intentional product functionality, should we preserve some version of it here?
There was a problem hiding this comment.
This is an interesting one: the complexity and cost for this partial fallback was never worth it, in my opinion. subgraphs take about 5 -20 seconds to index, if a user visits a deeplink for a newly submitted transaction, they would only receive partial data from the tx receipt. And the app would have to search about ~26 RPCs to reslve the receipt. furthermore, some contracts like MOOv2 and OOv2 have identical event signatures so sometimes one would resolve before the other marking a request as originating from te wrong contract. very. brittle indeed.
For the (very few) users would navigate to a deeplink immediately after submitting, I have instead implemented some retry logic to the resolve-deeplink endpoint that relies on subgraphs only.
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Great find! I did not test legacy links. |
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
Signed-off-by: Gerhard Steenkamp <gerhard@umaproject.org>
closes FE-482
Summary
client.tsorchestrator and per-service GQL factory classes (oraclev1/gql/factory.ts,oraclev3/gql/factory.ts,managedv2/gql/factory.ts,oracles/factory.ts). Query functions are now called directly from thin fetcher modules (src/hooks/oracle/fetchers.ts).?transactionHash=0x...) are now resolved by a new API route (/api/resolve-deeplink) that queries subgraphs directly, determines the correct page from entity state, and returns the result. The client hook redirects to the right page and opens the panel — no dependency on in-memory data. This replacesuseQueryInSearchParamswhich searched the in-memory lookup table (broken after per-page split) and fell back to RPC calls against every ethers provider.Other changes
NEXT_PUBLIC_MAX_SETTLED_REQUESTS(default: 1000) per subgraph to prevent UI lockups from loading hundreds of MB of settlement historyrouter.push/router.replacecalls usescroll: falseto prevent scroll-to-top when opening the panel or updating URL paramsPanelContextdistinguishes table row clicks (openPanel) from deeplink resolution (openPanelWithQuery) via anopenedFromTableflag, preventing unnecessary API callsmakeUrlParamsForQuerynow includeschainIdandoracleTypeso deeplink URLs are self-contained