Large decimal place parsing error
YagiOoda opened this issue · 0 comments
YagiOoda commented
Describe your Environment
OS: Mac Sonoma 14.2
Paisa Version: 0.6.2
App Variant: Desktop
Describe the bug
It looks like for very small values paisa cannot parse them. When I attempt to, I get the error:
"Could not parse the amount <1E-8 BTC> file=/Users/runner/work/paisa/paisa/internal/ledger/ledger.go:541func=github.com/ananthakumaran/paisa/internal/ledger.parseAmount
To Reproduce
Steps to reproduce the behavior:
- Change paisa configuration to beancount file provided below
Expected behavior
It would be expected that paisa determines how many decimal places there should be based on the files provided.
Screenshots
Journal
option "title" "Test Account"
option "operating_currency" "USD"
2024-01-01 open Assets:Coinbase:BTC BTC
2024-01-01 open Assets:Coinbase:USD USD
2024-01-01 commodity BTC
2024-01-01 * "Purchased 0.00000001 BTC for 0.00 USD in Coinbase"
Assets:Coinbase:USD -0.00 USD
Assets:Coinbase:BTC 0.00000001 BTC {40000 USD, 2024-01-01, "1"}