mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
Fix withdrawal error.
This commit is contained in:
@@ -58,6 +58,7 @@ from tests.basicswap.common import (
|
||||
wait_for_bid,
|
||||
wait_for_bid_tx_state,
|
||||
wait_for_in_progress,
|
||||
post_json_req,
|
||||
TEST_HTTP_HOST,
|
||||
TEST_HTTP_PORT,
|
||||
BASE_PORT,
|
||||
@@ -647,6 +648,22 @@ class Test(unittest.TestCase):
|
||||
assert(js_1['num_swapping'] == 0 and js_1['num_watched_outputs'] == 0)
|
||||
'''
|
||||
|
||||
def test_12_withdrawal(self):
|
||||
logging.info('---------- Test LTC withdrawals')
|
||||
|
||||
ltc_addr = ltcRpc('getnewaddress "Withdrawal test" legacy')
|
||||
logging.info('ltc_addr {}'.format(ltc_addr))
|
||||
wallets0 = json.loads(urlopen('http://127.0.0.1:{}/json/wallets'.format(TEST_HTTP_PORT + 0)).read())
|
||||
assert(float(wallets0['3']['balance']) > 100)
|
||||
|
||||
post_json = {
|
||||
'value': 100,
|
||||
'address': ltc_addr,
|
||||
'subfee': False,
|
||||
}
|
||||
json_rv = json.loads(post_json_req('http://127.0.0.1:{}/json/wallets/ltc/withdraw'.format(TEST_HTTP_PORT + 0), post_json))
|
||||
assert(len(json_rv['txid']) == 64)
|
||||
|
||||
def pass_99_delay(self):
|
||||
logging.info('Delay')
|
||||
for i in range(60 * 10):
|
||||
|
||||
Reference in New Issue
Block a user