Fix for infiniteToken parsing bug which was introduced with -ve and 0 number checks for token system
This commit is contained in:
parent
02de71e618
commit
41753a03c3
@ -983,7 +983,7 @@ def parse_flodata(text, blockinfo, net):
|
|||||||
|
|
||||||
isInfinite = check_word_existence_instring('infinite-token', processed_text)
|
isInfinite = check_word_existence_instring('infinite-token', processed_text)
|
||||||
tokenamount = apply_rule1(extractAmount_rule_new, processed_text)
|
tokenamount = apply_rule1(extractAmount_rule_new, processed_text)
|
||||||
|
|
||||||
## Cannot be NFT and normal token and infinite token. Find what are the conflicts
|
## Cannot be NFT and normal token and infinite token. Find what are the conflicts
|
||||||
# if its an NFT then tokenamount has to be integer and infinite keyword should not be present
|
# if its an NFT then tokenamount has to be integer and infinite keyword should not be present
|
||||||
# if its a normal token then isNFT and isInfinite should be None/False and token amount has to be present
|
# if its a normal token then isNFT and isInfinite should be None/False and token amount has to be present
|
||||||
@ -992,7 +992,7 @@ def parse_flodata(text, blockinfo, net):
|
|||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
if (not tokenamount and not isInfinite) or (isNFT and not tokenamount.is_integer() and not isInfinite) or (isInfinite and tokenamount is not False and isNFT is not False) or tokenamount<=0:
|
if (not tokenamount and not isInfinite) or (isNFT and not tokenamount.is_integer() and not isInfinite) or (isInfinite and tokenamount is not False and isNFT is not False) or (not isInfinite and tokenamount<=0):
|
||||||
return outputreturn('noise')
|
return outputreturn('noise')
|
||||||
operation = apply_rule1(selectCategory, processed_text, send_category, create_category)
|
operation = apply_rule1(selectCategory, processed_text, send_category, create_category)
|
||||||
if operation == 'category1' and tokenamount is not None:
|
if operation == 'category1' and tokenamount is not None:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user