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

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