Skip to content

Commit

Permalink
Merge pull request #59 from trinity-project/tdev
Browse files Browse the repository at this point in the history
fix fee =0
  • Loading branch information
pigxo authored Apr 28, 2018
2 parents ad3d9e4 + cc7d644 commit da4ba03
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wallet/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def do_channel(self,arguments):
if channel_name:
tx_nonce = trinitytx.TrinityTransaction(channel_name, self.Wallet).get_latest_nonceid()
mg.RsmcMessage.create(channel_name,self.Wallet,self.Wallet.pubkey,
receiverpubkey, int(count), receiverip, gate_way_ip, str(tx_nonce+1),
receiverpubkey, float(count), receiverip, gate_way_ip, str(tx_nonce+1),
asset_type="TNC", comments=hr)
else:
message = {"MessageType":"GetRouterInfo",
Expand All @@ -342,7 +342,10 @@ def do_channel(self,arguments):
n = router.get("Next")
LOG.info("Get Next {}".format(str(n)))
fee_router = [i for i in r if i[0] not in (self.Wallet.url, receiver)]
fee = reduce(lambda x, y:x+y,[float(i[1]) for i in fee_router])
if fee_router:
fee = reduce(lambda x, y:x+y,[float(i[1]) for i in fee_router])
else:
fee = 0
LOG.info("Get Fee {}".format(str(fee)))
answer = prompt("will use fee %s , Do you still want tx? [Yes/No]> " %(str(fee)))
if answer.upper() in["YES","Y"]:
Expand Down

0 comments on commit da4ba03

Please sign in to comment.