Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: return rate in/out as number #3798

Merged
merged 5 commits into from
Aug 10, 2021
Merged

Conversation

achingbrain
Copy link
Member

@achingbrain achingbrain commented Aug 9, 2021

The return type for rateIn/rateOut should be a number and not an integer.

go-IPFS returns a float64 which isn't representable in js, but we are not interested in that level of accuracy for this value so just return it as a regular number which can be a float.

Fixes #3782

BREAKING CHANGE: rateIn/rateOut are returned as numbers

The return type for `rateIn`/`rateOut` should be a float and not an
integer.

go-IPFS returns a `float64` which isn't representible in js, but we
are not interested in that level of accuracy for this value so just
return it as a regular `float`.

Fixes #3782
@achingbrain achingbrain changed the title fix: return rate in/out as float fix: return rate in/out as number Aug 9, 2021
@achingbrain achingbrain merged commit 2f3df7a into master Aug 10, 2021
@achingbrain achingbrain deleted the fix/rate-in-and-out-as-float branch August 10, 2021 08:33
SgtPooki referenced this pull request in ipfs/js-kubo-rpc-client Aug 18, 2022
The return type for `rateIn`/`rateOut` should be a number and not an integer.

go-IPFS returns a `float64` which isn't representable in js, but we are not interested in that level of accuracy for this value so just return it as a regular `number` which can be a `float`.

Fixes #3782

BREAKING CHANGE: rateIn/rateOut are returned as numbers
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ipfs-http-client & go-ipfs - BigInt issue with stats.bw()
1 participant