Skip to content

Satoshi#to_s should print 8 digits satoshis #4

Description

@speedmax

Display small value in BTC is very hard in Ruby. cc/ @khoan

  1. This should round small floats to 8 decimals, this happens when there is interest calculation on micro transactions

  2. Satoshi#to_s shows small float instead of "0.00000320" 320 satoshis

> Satoshi.new(( interest  * micro_transaction ).round(8)).to_s
> "3.2e-06"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions