cleanup
This commit is contained in:
parent
3ed33e7f77
commit
2fcdea44b6
|
@ -30,7 +30,6 @@ def checkSellStatus(tradeid):
|
|||
cleanup(tradeid)
|
||||
elif status == 'sellerFunded':
|
||||
print("Buyer has not yet funded the contract where you offered to buy {0}, please wait for them to complete their part.".format(trade.buy.currency))
|
||||
# elif trade.buy.get_status() == 'redeemed':
|
||||
elif status == 'sellerRedeemed':
|
||||
print("You have already redeemed the p2sh on the second chain of this trade.")
|
||||
|
||||
|
@ -186,8 +185,6 @@ def main():
|
|||
parser.add_argument("-c", "--conf", action="store", help="Use default trade data in conf file.")
|
||||
parser.add_argument("-n", "--network", action="store", help="Set network to regtest or mainnet. Defaults to testnet while in beta.")
|
||||
# parser.add_argument("--daemon", "-d", action="store_true", help="Run as daemon process")
|
||||
# TODO: function to view available trades
|
||||
# TODO: function to tell if tradeid already exists for newtrade
|
||||
args = parser.parse_args()
|
||||
|
||||
command = args.command
|
||||
|
@ -214,6 +211,7 @@ def main():
|
|||
checktrade(tradeid)
|
||||
elif command == 'listtrades':
|
||||
listtrades()
|
||||
# TODO: function to tell if tradeid already exists for newtrade
|
||||
elif command == 'newtrade':
|
||||
if len(args.arguments) < 1: throw("Usage: newtrade [tradeid]")
|
||||
tradeid = args.arguments[0]
|
||||
|
|
|
@ -114,7 +114,7 @@ def erase_trade():
|
|||
pass
|
||||
|
||||
def save(trade):
|
||||
print("Saving trade")
|
||||
# print("Saving trade")
|
||||
trade = {
|
||||
'sell': trade.sell.__dict__,
|
||||
'buy': trade.buy.__dict__,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Replace these with your own addresses
|
||||
# Replace these with your own addresses and trade amts to pass info in through config flag
|
||||
ADDRS = {
|
||||
'regtest': {
|
||||
"initiator": {
|
||||
|
@ -17,8 +17,9 @@ ADDRS = {
|
|||
"zcash": "tmTF7LMLjvEsGdcepWPUsh4vgJNrKMWwEyc"
|
||||
},
|
||||
"fulfiller": {
|
||||
"bitcoin": "mgRG44X4PQC1ZCA4V654UZjJGJ3pxbApj2",
|
||||
"zcash": "tmLZu7MdjNdA6vbPTNTwdsZo91LnnrVTYB5"
|
||||
}
|
||||
"bitcoin": "mm2smEJjRN4xoijEfpb5XvYd8e3EYWezom",
|
||||
"zcash": "tmPwPdceaJAHQn7UiRCVnJ5tXBXHVqWMkis"
|
||||
},
|
||||
"amounts": {'buy': {'currency': 'zcash', 'amount': 0.02}, 'sell': {'currency': 'bitcoin', 'amount': 0.01}}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue