fix: saucerswap-v1 broken since api.saucerswap.finance went key-only#2795
fix: saucerswap-v1 broken since api.saucerswap.finance went key-only#27950xshubhs wants to merge 1 commit into
Conversation
|
Warning Review limit reached
Next review available in: 38 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The failing test is the expected 401 — the CI run doesn't have SAUCERSWAP_API_KEY (fork PRs don't get secrets). With the key set it's 516/516 tests and 73 pools; the key from dimension-adapters helpers/env.ts works. |
saucerswap-v1 has been dead and excluded because api.saucerswap.finance now returns 401 Unauthorized on every endpoint the adapter uses (/farms, /pools, /pools/5day-avg) — they made the API key-only. The protocol itself is fine (~$8.7M TVL on Hedera, 22 V1 farms still have live SAUCE emissions).
The endpoints work unchanged with an
x-api-keyheader and the response shapes are identical, so this just threadsSAUCERSWAP_API_KEYthrough the three getData calls, wires it into env.js/serverless.yml like the other keys, and removes the exclusion entry.You already have a working key for this — dimension-adapters ships
SAUCERSWAP_API_KEYin helpers/env.ts, and I ran the harness with that same key: 516/516 tests, 73 pools with sane values (SAUCE-HBAR $1.14M @ 0.47% base + 5.81% reward, USDC-HBAR $552k @ 4.60% + 3.90%, etc). It just needs to be present in this repo's deployment env too.CI bot run will fail with 401 since the fork doesn't have the key — same situation as the Allium-based adapters in dimension-adapters.