diff --git a/pay-gui.py b/pay-gui.py index 3749616..8c6eec3 100755 --- a/pay-gui.py +++ b/pay-gui.py @@ -28,7 +28,7 @@ def ProceedPaiement(): comment = str(commentEntry.get()) print("Paiement en cours ... " + recipient) returnGen = sendGenDoc(recipient, amount, comment) - checkTXDoc(returnGen) + checkTXDoc(returnGen, recipient, amount, comment) returnSigned = signDoc(returnGen) sendTXDoc(returnSigned) diff --git a/pay.py b/pay.py index acc73af..48594cc 100755 --- a/pay.py +++ b/pay.py @@ -62,7 +62,7 @@ def sendGenDoc(recipient, amount, comment): # Check document -def checkTXDoc(txDoc): +def checkTXDoc(txDoc, recipient, amount, comment): docList = txDoc.splitlines() for i, line in enumerate(docList): if re.search("Issuers:", line): @@ -121,9 +121,10 @@ def sendTXDoc(signedDoc): # Execute workflow if not graphic: returnGen = sendGenDoc(recipient, amount, comment) - docIsOK = checkTXDoc(returnGen) - returnSigned = signDoc(returnGen) - sendTXDoc(returnSigned) + docIsOK = checkTXDoc(returnGen, recipient, amount, comment) + if docIsOK: + returnSigned = signDoc(returnGen) + sendTXDoc(returnSigned) #print(sentTX) #For debug