generated from nathanwoodburn/python-webserver-template
fix: Update topup search to not need memo message
All checks were successful
Build Docker / BuildImage (push) Successful in 38s
All checks were successful
Build Docker / BuildImage (push) Successful in 38s
This commit is contained in:
parent
2734cddbde
commit
1c2cb23b15
@ -453,9 +453,9 @@ def parseDeposit(data):
|
|||||||
if 'tokenTransfers' not in tx:
|
if 'tokenTransfers' not in tx:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Search for string (TOPUP)
|
# Skip memo txs
|
||||||
if 'TOPUP' in json.dumps(tx):
|
if 'Memo' in json.dumps(tx):
|
||||||
print("TOPUP: Skipping deposit")
|
print("Skipping deposit as it contains memo")
|
||||||
print(json.dumps(tx, indent=4))
|
print(json.dumps(tx, indent=4))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ def parseDeposit(data):
|
|||||||
stWDBRN_amount = round(stWDBRN_amount, 9)
|
stWDBRN_amount = round(stWDBRN_amount, 9)
|
||||||
mint_stWDBRN(stWDBRN_amount, transfer['fromUserAccount'])
|
mint_stWDBRN(stWDBRN_amount, transfer['fromUserAccount'])
|
||||||
|
|
||||||
def mint_stWDBRN(amount, to_user_account):
|
def mint_stWDBRN(amount, to_user_account):
|
||||||
if amount < 0.5:
|
if amount < 0.5:
|
||||||
print(f"Skipping minting of {amount} stWDBRN to {to_user_account} as it is less than 0.5", flush=True)
|
print(f"Skipping minting of {amount} stWDBRN to {to_user_account} as it is less than 0.5", flush=True)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user