Skip to content
Snippets Groups Projects
Commit 409ce3ba authored by Moul's avatar Moul Committed by Vincent Texier
Browse files

[enh] tx example: create key earlier in order to gather pubkey rather than asking for it.

parent 9de2a5ee
Branches
Tags
No related merge requests found
......@@ -96,8 +96,9 @@ async def main():
# prompt hidden user entry
password = getpass.getpass("Enter your password: ")
# prompt entry
pubkey_from = input("Enter your pubkey: ")
# create keys from credentials
key = SigningKey.from_credentials(salt, password)
pubkey_from = key.pubkey
# prompt entry
pubkey_to = input("Enter recipient pubkey: ")
......@@ -118,9 +119,6 @@ async def main():
# create the transaction document
transaction = get_transaction_document(current_block, source, pubkey_from, pubkey_to)
# create keys from credentials
key = SigningKey.from_credentials(salt, password)
# sign document
transaction.sign([key])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment