Skip to content

Navigation Menu

Sign in
Sign up

fix: type Curve chain name maps - #239

Open
kocaemre wants to merge 1 commit into
s-leroux:main from
kocaemre:fix/100-curve-chain-map-types
Open

fix: type Curve chain name maps #239
kocaemre wants to merge 1 commit into
s-leroux:main from
kocaemre:fix/100-curve-chain-map-types

Conversation

@kocaemre

@kocaemre kocaemre commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • type ToCurveChainName and FromCurveChainName as Record<string, string | undefined>
  • replace the __proto__ object-literal workaround and @ts-expect-error comments with a typed null-prototype map helper
  • preserve the existing Curve chain-name translations (gnosis <-> xdai)

Closes #100.

Verification

  • npm run compile
  • node import smoke check against build/src/services/curve/curveapi.mjs verified:
    • ToCurveChainName.gnosis === "xdai"
    • FromCurveChainName.xdai === "gnosis"
    • unknown chains return undefined
    • the exported maps keep a null prototype

Notes:

  • npm test -- --grep CurveAPI currently has one unrelated floating-point fixture mismatch (1.0397308967364007 vs 1.0397308967364005) in getPrice(); the other CurveAPI checks in that grep pass.
  • npm run lint reports pre-existing project-wide lint errors outside this focused change; no unrelated files are included in this PR.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>

Copy link
Copy Markdown
Owner

Thank you for your contribution.

This is a highly seasonal project, and I am not actively working on it right now. I will, however, review your PR in due time.

Regards
-- Sylvain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Fix the type of ToCurveChainName and FromCurveChainName

AltStyle によって変換されたページ (->オリジナル) /