fix parser error

This commit is contained in:
Carlosokumu 2024-12-10 15:55:12 +03:00
parent e5ed224c72
commit 2f0b59e579
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -235,6 +235,8 @@ def p_voucher_transfer(p):
| change_label nv LABEL HEX
| change_label hv LABEL LABEL
| change_label nv LABEL LABEL
| change_label hv HEX LABEL
| change_label nv HEX LABEL
'''
o = p[1]
if o.c.value & 0x10 == 0:
@ -382,7 +384,7 @@ def load_gas(address,nonce):
if result.returncode != 0:
raise subprocess.CalledProcessError(result.returncode, command, output=result.stdout, stderr=result.stderr)
message = f"Added some gas to {address}"
message = f"Added {gas_topup} to {address}"
printMessage(message)
@ -547,8 +549,10 @@ def voucher_transfer_handler(cmd):
if result.stderr:
raise ValueError(f"Command failed with error: {result.stderr}")
amount_transfered = value / 10**6
data = json.loads(result.stdout)
message = f"Transfered {value} {voucher_name} to {to} "
message = f"Transfered {amount_transfered} {voucher_name} to {to} "
printMessage(message)
return data["transactionHash"]
@ -603,7 +607,10 @@ def voucher_mint_handler(cmd):
if result.stderr:
raise ValueError(f"Command failed with error: {result.stderr}")
data = json.loads(result.stdout)
message = f"Added supply of {value} {voucher_symbol} to :{to}"
mint_amount = value / 10**6
message = f"Minted {mint_amount} {voucher_symbol} to :{to}"
printMessage(message)
return data["transactionHash"]