minor linting
This commit is contained in:
parent
4cf2a6b393
commit
f65641a2c7
|
@ -21,7 +21,7 @@ if sys.version_info.major < 3:
|
|||
sys.stderr.write('Sorry, Python 3.x required by this example.\n')
|
||||
sys.exit(1)
|
||||
|
||||
FEE = 0.001*COIN
|
||||
FEE = 0.001 * COIN
|
||||
|
||||
|
||||
class bitcoinProxy():
|
||||
|
@ -117,13 +117,13 @@ class bitcoinProxy():
|
|||
self.bitcoind.importaddress(p2sh, "", False)
|
||||
# Get amount in address
|
||||
amount = self.bitcoind.getreceivedbyaddress(p2sh, 0)
|
||||
amount = amount/COIN
|
||||
amount = amount / COIN
|
||||
return amount
|
||||
|
||||
def get_fund_status(self, p2sh):
|
||||
self.bitcoind.importaddress(p2sh, "", False)
|
||||
amount = self.bitcoind.getreceivedbyaddress(p2sh, 0)
|
||||
amount = amount/COIN
|
||||
amount = amount / COIN
|
||||
print("Amount in bitcoin p2sh: ", amount, p2sh)
|
||||
if amount > 0:
|
||||
return 'funded'
|
||||
|
|
|
@ -87,8 +87,8 @@ def authorize_buyer_fulfill(sell_p2sh_balance, sell_currency,
|
|||
"in {1}.".format(sell_p2sh_balance, sell_currency))
|
||||
input("You have not send funds to the contract to buy {1} "
|
||||
"(requested amount: {0}), type 'enter' to allow this program "
|
||||
"to send the agreed upon funds on your behalf.".format(
|
||||
buy_p2sh_balance, buy_currency))
|
||||
"to send the agreed upon funds on your behalf"
|
||||
".".format(buy_p2sh_balance, buy_currency))
|
||||
|
||||
|
||||
def authorize_seller_redeem(buy):
|
||||
|
|
|
@ -21,7 +21,7 @@ if sys.version_info.major < 3:
|
|||
sys.stderr.write('Sorry, Python 3.x required by this example.\n')
|
||||
sys.exit(1)
|
||||
|
||||
FEE = 0.001*COIN
|
||||
FEE = 0.001 * COIN
|
||||
|
||||
|
||||
class zcashProxy():
|
||||
|
@ -80,7 +80,7 @@ class zcashProxy():
|
|||
'locktime': locktime}
|
||||
|
||||
def fund_htlc(self, p2sh, amount):
|
||||
send_amount = float(amount)*COIN
|
||||
send_amount = float(amount) * COIN
|
||||
# Import addr at same time as you fund
|
||||
self.zcashd.importaddress(p2sh, "", False)
|
||||
fund_txid = self.zcashd.sendtoaddress(p2sh, send_amount)
|
||||
|
@ -92,13 +92,13 @@ class zcashProxy():
|
|||
self.zcashd.importaddress(p2sh, "", False)
|
||||
# Get amount in address
|
||||
amount = self.zcashd.getreceivedbyaddress(p2sh, 0)
|
||||
amount = amount/COIN
|
||||
amount = amount / COIN
|
||||
return amount
|
||||
|
||||
def get_fund_status(self, p2sh):
|
||||
self.zcashd.importaddress(p2sh, "", False)
|
||||
amount = self.zcashd.getreceivedbyaddress(p2sh, 0)
|
||||
amount = amount/COIN
|
||||
amount = amount / COIN
|
||||
print("Amount in zcash p2sh: ", amount, p2sh)
|
||||
if amount > 0:
|
||||
return 'funded'
|
||||
|
|
Loading…
Reference in New Issue