Skip to content

Commit ef0d6eb

Browse files
committed
fixup! Add the ramps deep link and provider priority design doc
1 parent 81c45d7 commit ef0d6eb

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

‎src/docs/ramps-deeplink-provider-priority.md‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
| Status | Implemented |
66
| Author | Jon Tzeng |
77
| Reviewer | - |
8-
| Last updated | 2026-08-10 |
8+
| Last updated | 2026-08-11 |
99
| Repos | [edge-react-gui](https://github.com/EdgeApp/edge-react-gui) |
1010
| Implementation | see [PR link in the task](https://app.asana.com/0/1215088146871429/1217224633446931) |
1111
| Supersedes | - |
@@ -343,17 +343,32 @@ Banxa holds the best quote and leads its own group, so the badge sits on a card
343343

344344
No badge anywhere, and the absence is a decision, not a gap ([decision 10.8](#108-the-badge-is-display-honest-and-absent-under-a-promotion)). The badge is a claim about the number printed on the card face. A pinned or affiliate-preferred session exists to surface the promoted provider, and badging a competing provider's rate beside it would work against that promotion. Banxa's quote is still in `allQuotes`, `getBestRateRampQuote` still finds it, and the user still reaches it through any card's "Powered By" picker; it is simply unmarked while a promotion is in force.
345345

346-
That gives a rule that predicts the outcome without re-deriving it:
347-
348-
| Pin | Effect on the list | Badge |
349-
|---|---|---|
350-
| Payment type only (`/buy` with no provider) | reorders cards; the provider shown in each card is unchanged | survives |
351-
| Provider (`/buy/moonpay/...`, or affiliate `preferProviders`) | changes the displayed provider in every card | disappears, unless the pinned provider genuinely holds the best quote |
346+
[Section 5.7](#57-outcomes-by-configuration) tabulates every reachable configuration; the short form is that the badge disappears exactly from the groups where the promotion displaced the displayed best quote, and nowhere else.
352347

353348
For the user this means a first-time buyer on an unpinned list gets a green starburst naming the cheapest option, while the same buyer arriving through a partner link gets no starburst and no hint that a cheaper option is one picker away. The list is not claiming anything false; it stops answering "which is cheapest". Because `isBestOption` reads the card's current selection rather than its initial one, the badge does reappear if the user opens the picker and selects the best-rate provider, so the information is recoverable but not discoverable.
354349

355350
The product decision resolving this is [decision 10.8](#108-the-badge-is-display-honest-and-absent-under-a-promotion): the badge stays display-honest, and its absence under a promotion is intended. The group-scoped alternative was implemented during PR review and reverted.
356351

352+
### 5.7 Outcomes by configuration
353+
354+
The ordering and the badge are each simple rules, but their product across the inputs (link pin, affiliate preference, provider type, user action) is not obvious; the second review round mispredicted two of these rows. The table enumerates every reachable configuration so an outcome can be looked up instead of re-derived. Each row follows from [section 5.4](#54-ordering) (ordering), [section 5.6](#56-what-the-option-list-shows-and-where-the-best-rate-badge-lands) (badge), and decisions [10.7](#107-rank-the-preferences-above-has-amounts) and [10.8](#108-the-badge-is-display-honest-and-absent-under-a-promotion); if a row and the prose ever disagree, the prose wins and the row is stale.
355+
356+
| # | Configuration | List effect | "Best Rate" badge | Card face |
357+
|---|---|---|---|---|
358+
| 1 | No pin, no affiliate preference | Best-rate order, groups and in-group | On the card displaying the best quote | Real totals |
359+
| 2 | `edge://buy` (direction only) | Same as 1; the link only opens the flow | Present | Real totals |
360+
| 3 | `edge://buy/moonpay` (priced provider) | MoonPay first inside every group it quotes in; its groups float up | Absent from any group where the promotion displaced the displayed best quote; unaffected elsewhere, and stays if MoonPay itself holds the best quote | Real totals |
361+
| 4 | `edge://buy/moonpay/venmo` (provider + payment type) | Venmo group first, MoonPay first within it ([decision 10.4](#104-rank-the-payment-type-pin-above-the-provider-pin)) | Same rule as 3 | Real totals |
362+
| 5 | `edge://buy/libertyx` (external provider) | Its cash group floats to the top with the LibertyX placeholder first; reachable only with a bitcoin wallet in a US region | Survives: LibertyX quotes in no other group, so the best quote's card is not displaced | Promoted card shows its `specialQuoteRateMessage` ("Select to view quote"); the number exists only on the provider's site |
363+
| 6 | `edge://buy/moonpay/cashapp` while the [info server](#info-server) disables Cash App | No cashapp group exists; MoonPay still leads the groups that do | Same rule as 3 | Real totals |
364+
| 7 | Pin matches nothing (unknown or absent provider, or a provider with no quotes) | Identical to 1; a debug-only log names the unmatched pin | Present | Real totals |
365+
| 8 | Affiliate `preferProviders: ["paybis"]` (priced) | Paybis first in every group, silently, with no card rendered | Same rule as 3 | Real totals |
366+
| 9 | Affiliate `preferProviders: ["libertyx"]` (external) | Same as 5, from server config with no link | Same rule as 5 | Placeholder on the promoted card |
367+
| 10 | Link pin and affiliate preference together | The link provider is prepended and outranks the affiliate list | Display-honest, rules 3/5 | Mixed |
368+
| 11 | User hand-picks an amount-less provider from a badged card's picker | No reorder; that card now displays the placeholder | Leaves that card while the placeholder is selected (`hasSelectedAmounts`); returns on switching back | Placeholder while selected |
369+
| 12 | Amount-less quote that no preference names | Sinks below the priced quotes in its group | Not applicable | Behind "Powered By" |
370+
| 13 | Any pin, then the user leaves the buy/sell tab | Pin cleared on tab blur ([section 5.3](#53-param-threading)) | Row 1 again on return | Real totals |
371+
357372
## 6. Info server configuration
358373

359374
Both blocks below are cards inside the `promoCards2` array of the [info server](#info-server) rollup document in the `info_data` CouchDB database. `promoCards2` is a healing array, so a card that fails the cleaner is dropped silently and the rest still load. `background` is required on every card, including the silent one.

0 commit comments

Comments
 (0)