XMR withdrawals work.

spendBLockTx uses sweep_all.
This commit is contained in:
tecnovert
2020-12-05 13:22:22 +02:00
parent 669a465262
commit 4c200fe8d4
16 changed files with 181 additions and 65 deletions

View File

@@ -547,9 +547,9 @@ class Test(unittest.TestCase):
logging.info('---------- Test PART to XMR')
swap_clients = self.swap_clients
js_0 = json.loads(urlopen('http://localhost:1801/json/wallets').read())
assert(make_int(js_0[str(int(Coins.XMR))]['balance'], scale=12) > 0)
assert(make_int(js_0[str(int(Coins.XMR))]['unconfirmed'], scale=12) > 0)
js_1 = json.loads(urlopen('http://localhost:1801/json/wallets').read())
assert(make_int(js_1[str(int(Coins.XMR))]['balance'], scale=12) > 0)
assert(make_int(js_1[str(int(Coins.XMR))]['unconfirmed'], scale=12) > 0)
offer_id = swap_clients[0].postOffer(Coins.PART, Coins.XMR, 100 * COIN, 0.11 * XMR_COIN, 100 * COIN, SwapTypes.XMR_SWAP)
self.wait_for_offer(swap_clients[1], offer_id)
@@ -725,6 +725,14 @@ class Test(unittest.TestCase):
self.wait_for_no_offer(swap_clients[1], offer_id)
def test_08_withdraw(self):
logging.info('---------- Test xmr withdrawals')
swap_clients = self.swap_clients
js_0 = json.loads(urlopen('http://localhost:1800/json/wallets').read())
address_to = js_0[str(int(Coins.XMR))]['deposit_address']
swap_clients[1].withdrawCoin(Coins.XMR, 1.1, address_to, False)
if __name__ == '__main__':
unittest.main()