MetaMask / MetaMask/core

[CurrencyRateController] Consider serializing rates as strings instead of numbers

Open
#4,857 0 comments 0 reactions 0 assignees View on GitHub
team-assets
Dominant language
TypeScript
Stars
413
Forks
308
Avg merge
1d 4h
Merged PRs (30d)
253

Description

To avoid precision loss, consider serializing the responses from cryptocompare as strings instead of how `response.json()` currently serializes them to JS numbers.

See https://github.com/MetaMask/core/pull/4852/files#r1817508642

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at CurrencyRateController and trace how the CryptoCompare response passes through response.json() into the returned response. Check the discussion in PR 4852 for context, then verify that rates are serialized as strings so precision is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.