ruimarinho / bitcoin-core

A modern Bitcoin Core REST and RPC client.
483 stars 188 forks source link

Support Bitcoin's maximum precision #16

Closed pedrobranco closed 7 years ago

pedrobranco commented 8 years ago

When parsing a Bitcoin/Crypto response that has an value with more than 15 significant digits: example is 1222223333.00000001.

The lib request with option

{ json:true }

used by bitcoin-core uses JSON.parse which loses precision returning the amount 1222223333.

Suggestion: use request with

{ json: false }

and parse the raw output with the lib json-bigint-string.

@ruimarinho @nunofgs @fixe

ruimarinho commented 7 years ago

Closed by https://github.com/seegno/bitcoin-core/pull/17.