Skip to content

Commit

Permalink
Merge pull request #2 from saeveritt/patch-2
Browse files Browse the repository at this point in the history
Specify card issuing error
  • Loading branch information
peerchemist authored Feb 21, 2017
2 parents 0da0a2c + 8e56c01 commit fb4302b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions pacli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,14 @@ def card_issue(provider, args):
except IndexError:
print("\n", {"error": "Deck not found."})
return
if not provider.getaddressesbyaccount(deck.name):
print("\n", {"error": "You are not even subscribed to this deck, how can you issue cards?"})
return
try:
utxo = provider.select_inputs(0.02, deck.issuer)
except ValueError:
print("\n", {"error": "You are not owner of this deck, you can not issue cards."})
if provider.validateaddress(deck.issuer)["ismine"]:
try:
utxo = provider.select_inputs(0.02, deck.issuer)
except ValueError:
print("\n", {"error": "Please send funds to the issuing address."})
return
else:
print("\n", {"error": "You are not the owner of this deck."})
return

change_address = change(utxo)
Expand Down

0 comments on commit fb4302b

Please sign in to comment.