Skip to content

Commit

Permalink
Merge pull request CounterpartyXCP#1110 from CounterpartyXCP/cip23
Browse files Browse the repository at this point in the history
Added fix for CIP23 functionality
  • Loading branch information
chiguireitor authored Feb 12, 2021
2 parents e3ea6f5 + ae669aa commit a99ddef
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 a99ddef

Please sign in to comment.