use same private key for minting

This commit is contained in:
Carlosokumu 2024-11-26 13:30:52 +03:00
parent 9b513b672d
commit 4da0e5812f
Signed by: carlos
GPG Key ID: 7BD6BC8160A5C953

View File

@ -438,6 +438,7 @@ def voucher_mint_handler(cmd):
with open("vouchers.json", "r") as file: with open("vouchers.json", "r") as file:
data = json.load(file) data = json.load(file)
s = data[voucher_name] s = data[voucher_name]
privatekey = data["owner"]
elif str(cmd.a).startswith("AddressAgent"): elif str(cmd.a).startswith("AddressAgent"):
s = "0x" + str(cmd.a).split(":")[1] s = "0x" + str(cmd.a).split(":")[1]
@ -525,8 +526,8 @@ if __name__ == '__main__':
ifc = None ifc = None
o = Router() o = Router()
o.register(CmdId.KEY_CREATE,foo_handler) o.register(CmdId.KEY_CREATE,foo_handler)
o.register(CmdId.VOUCHER_CREATE,voucher_create_handler) o.register(CmdId.VOUCHER_CREATE,foo_handler)
o.register(CmdId.VOUCHER_MINT, foo_handler) o.register(CmdId.VOUCHER_MINT, voucher_mint_handler)
o.register(CmdId.VOUCHER_TRANSFER,foo_handler) o.register(CmdId.VOUCHER_TRANSFER,foo_handler)
if len(sys.argv) > 1: if len(sys.argv) > 1: