Commit ac7dc38c authored by Gottfried Gaisbauer's avatar Gottfried Gaisbauer
Browse files

another bug with banknotes >= 10

parent 76c671fa
......@@ -220,9 +220,9 @@ class GivecoinPrinter:
return
# simply write to logfile
def write_to_logfile(self, address, privkey, transaction, type):
def write_to_logfile(self, address, privkey, transaction, choice):
try:
msg = "printed " + str(type) + " givcoins"
msg = "printed " + str(choice) + " givcoins"
# write to logfile
f = open(self.args.logfile, "a+")
......@@ -234,9 +234,9 @@ class GivecoinPrinter:
return
# split the private key into four parts and print them row for row
def print_to_banknote_and_eject(self, privkey):
def print_to_banknote_and_eject(self, privkey, choice):
if type < 10:
if int(choice) < 10:
if self.args.bold:
prespace = r" " # 4 spaces
prefix = r"\\x1b\\x45"
......@@ -249,7 +249,7 @@ class GivecoinPrinter:
prespace = r" " # 4 spaces
prefix = r""
postfix = r""
elif type >= 10:
elif int(choice) >= 10:
if self.args.bold:
prespace = r" " # 6 spaces
prefix = r"\\x1b\\x45"
......@@ -264,7 +264,7 @@ class GivecoinPrinter:
postfix = r""
pk = dict()
if type < 10:
if int(choice) < 10:
if self.args.condensed:
pk[0] = prefix + prespace + privkey[:18]
pk[1] = prespace + privkey[18:36]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment