Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Incorrect maximum BTC precision? #227

Closed
ar-turek opened this issue May 23, 2017 · 2 comments
Closed

Incorrect maximum BTC precision? #227

ar-turek opened this issue May 23, 2017 · 2 comments

Comments

@ar-turek
Copy link

According to this (and BTC specification in general):
https://en.bitcoin.it/wiki/Help:FAQ#How_divisible_are_bitcoins.3F
the smallest BTC unit is 10^(-8), which means the biggest acceptable decimal precision should be 8 decimal places.

Here:
https://github.com/bitpay/php-bitpay-client/blob/master/src/Bitpay/Client/Client.php#L698
a value with 8 decimal places does not pass this check unless it's rounded up to 6 decimal places, even though in theory it should be possible to pay 0.00000001BTC.

@tomaszkane
Copy link

BTW, IPN from BitPay also sends btcPrice with 6 decimal places.

@pieterpoorthuis
Copy link

Currently BitPay accepts 6 decimals. The BitPay lib follows this specification.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants