Commit 74cfeee
committed
Add Revolut fiat payment provider
Queries Revolut Ramp's orders endpoint, authenticated with the X-API-KEY header
that the GUI's existing ramp key uses. Two shapes of that API are easy to get
wrong and are handled explicitly: the start/end bounds are date-only, and the
response is a bare array paged by skip/limit rather than a cursor envelope.
An order id is not unique in the response. Revolut returns one row per payment
attempt, so the same id arrives both COMPLETED and FAILED. Since orderId keys
the StandardTx document, attempts are collapsed to one winner per id, settled
beating unsettled, before anything is emitted.
Native assets resolve to their Edge chain with a null tokenId. Tokens resolve
their chain but leave tokenId undefined: Revolut reports no contract address,
and a guessed one would mis-price the asset.1 parent 96b821a commit 74cfeee
5 files changed
Lines changed: 652 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| 18 | + | |
14 | 19 | | |
15 | 20 | | |
16 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
0 commit comments