Skip to content

Commit

Permalink
Merge #698: do not initialize Decimal from float
Browse files Browse the repository at this point in the history
2692f7f do not initialize Decimal from float (Ferdinando M. Ametrano)

Pull request description:

  this avoid warnings and prefer explicit proper initialization

  See LedgerHQ/app-bitcoin-new#191

ACKs for top commit:
  achow101:
    ACK 2692f7f

Tree-SHA512: deba1b3b654e89f4b61911b45199b782a961abff9e62496a500852dda0f917bf541e6fd58c17baca6289fe708b94ba7e47b95821ba1479cc9cdbdbb4d38128f9
  • Loading branch information
achow101 committed Aug 16, 2023
2 parents 315a75b + 2692f7f commit 5242d85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hwilib/devices/ledger_bitcoin/btchip/btchipHelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import re

# from pycoin
SATOSHI_PER_COIN = decimal.Decimal(1e8)
COIN_PER_SATOSHI = decimal.Decimal(1)/SATOSHI_PER_COIN
SATOSHI_PER_COIN = decimal.Decimal(100_000_000)
COIN_PER_SATOSHI = decimal.Decimal('0.00000001')

def satoshi_to_btc(satoshi_count):
if satoshi_count == 0:
Expand Down

0 comments on commit 5242d85

Please sign in to comment.