Repository navigation
feat(bridge): transfer history on /bridge - #125
Closed
Vasanthdev2004 wants to merge 2 commits into
Closed
Vasanthdev2004 wants to merge 2 commits into
Vasanthdev2004 wants to merge 2 commits into
Conversation
A "Your transfers" departures board on /bridge for the connected wallet,
fed by two sources that share one set of rules (lib/bridge/history.ts):
- This browser: a small ledger beside the recovery record (never instead
of it). The controller records a transfer once it has a source hash or
a settled status and forgets it if discarded as never sent. Storage
failures only show a notice; they never reach a transfer.
- Relay: GET /api/bridge/history reads /requests/v3 for the wallet with
RELAY_API_KEY in the x-api-key header. Without the key it answers
{ relay: "off" } and calls nothing. Answers are cached for 20 seconds,
upstream calls share a budget of 120 a minute, and each IP gets 30.
Rows only cover this bridge's networks and tokens, matched by currency
address and decimals. A settled status is never rolled back, a delivered
amount beats a quoted one, and the browser re-validates server rows.
Refunds and failures show no destination amount.
The header panel's footer now links to /bridge#transfers. The
/ui-review-bridge fixture gains history scenes.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Collaborator
Author
|
Closed in favour of #135, which holds the whole bridge update in one PR. The commits from this PR are in it unchanged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 3 of the bridge update: transfer history. This PR is stacked on #121 and should be merged after it.
What it adds
/bridge. It is a board for the connected wallet. Each row shows the time, the route (the Signal board's network codes), the amount sent, the amount received, the status in words, and links to Relay and both block explorers. The header panel's footer now links to/bridge#transfers.lib/bridge/history-store.ts). This works today, with no key and no server.GET /api/bridge/history?address=readsGET /requests/v3?user=…. This shows transfers made from other devices too.RELAY_API_KEYfor this. v3 requires an API key, and Relay retires the keyless v2 on 2026-11-24.{ relay: "off" }and makes no call. The board then says it is showing what this browser saved.x-api-keyheader and never in the URL.Rules (
lib/bridge/history.ts)Checks
/ui-review-bridge, on desktop and phone width, in light and dark. The real/bridgepage without a wallet shows the empty state.Not checked against live Relay data. The schema comes from Relay's OpenAPI document. An opt-in live test (
RUN_BRIDGE_LIVE_TESTS=1withRELAY_API_KEY) reads recent Robinhood requests through the same parser. It needs the key, so it has not run.Before it shows Relay history
@kevincodex1: please set
RELAY_API_KEYin production. It is the same key the quote path already sends when present. Then run the live test once.