Skip to content

Commit

Permalink
Added fix for CIP23 functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
chiguireitor committed Feb 12, 2021
1 parent 20fc66b commit ae669aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion counterpartylib/lib/messages/dividend.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ def validate (db, source, quantity_per_unit, asset, dividend_asset, block_index)
if address == source: continue

dividend_quantity = address_quantity * quantity_per_unit

if divisible: dividend_quantity /= config.UNIT
if not util.enabled('nondivisible_dividend_fix') and not dividend_divisible: dividend_quantity /= config.UNIT # Pre-fix behaviour
if util.enabled('nondivisible_dividend_fix') and not dividend_divisible: dividend_quantity /= config.UNIT # Fixed behaviour

if dividend_asset == config.BTC and dividend_quantity < config.DEFAULT_MULTISIG_DUST_SIZE: continue # A bit hackish.
dividend_quantity = int(dividend_quantity)

Expand Down

0 comments on commit ae669aa

Please sign in to comment.