mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
tests: Move test_003_api to test_xmr and run in CI.
This commit is contained in:
@@ -983,7 +983,9 @@ class BasicSwap(BaseApp):
|
||||
thread_func = {
|
||||
Coins.XMR: threadPollXMRChainState,
|
||||
Coins.WOW: threadPollWOWChainState,
|
||||
}.get(c, threadPollChainState) # default case
|
||||
}.get(
|
||||
c, threadPollChainState
|
||||
) # default case
|
||||
|
||||
t = threading.Thread(target=thread_func, args=(self, c))
|
||||
self.threads.append(t)
|
||||
@@ -2613,7 +2615,9 @@ class BasicSwap(BaseApp):
|
||||
_, is_locked = self.getLockedState()
|
||||
if is_locked is False:
|
||||
self.log.warning(
|
||||
"Setting seed id for coin {} from master key.".format(ci.coin_name())
|
||||
"Setting seed id for coin {} from master key.".format(
|
||||
ci.coin_name()
|
||||
)
|
||||
)
|
||||
root_key = self.getWalletKey(c, 1)
|
||||
self.storeSeedIDForCoin(root_key, c)
|
||||
|
||||
@@ -842,22 +842,30 @@ def js_getcoinseed(self, url_split, post_string, is_json) -> bytes:
|
||||
address = ci.getAddressFromKeys(key_view, key_spend)
|
||||
|
||||
expect_address = self.getCachedMainWalletAddress(ci)
|
||||
rv.update({
|
||||
"key_view": ci.encodeKey(key_view),
|
||||
"key_spend": ci.encodeKey(key_spend),
|
||||
"address": address,
|
||||
"expected_address": "Unset" if expect_address is None else expect_address
|
||||
})
|
||||
rv.update(
|
||||
{
|
||||
"key_view": ci.encodeKey(key_view),
|
||||
"key_spend": ci.encodeKey(key_spend),
|
||||
"address": address,
|
||||
"expected_address": (
|
||||
"Unset" if expect_address is None else expect_address
|
||||
),
|
||||
}
|
||||
)
|
||||
else:
|
||||
seed_key = swap_client.getWalletKey(coin, 1)
|
||||
seed_id = ci.getSeedHash(seed_key)
|
||||
expect_seedid = swap_client.getStringKV("main_wallet_seedid_" + ci.coin_name().lower())
|
||||
expect_seedid = swap_client.getStringKV(
|
||||
"main_wallet_seedid_" + ci.coin_name().lower()
|
||||
)
|
||||
|
||||
rv.update({
|
||||
"seed": seed_key.hex(),
|
||||
"seed_id": seed_id.hex(),
|
||||
"expected_seed_id": "Unset" if expect_seedid is None else expect_seedid
|
||||
})
|
||||
rv.update(
|
||||
{
|
||||
"seed": seed_key.hex(),
|
||||
"seed_id": seed_id.hex(),
|
||||
"expected_seed_id": "Unset" if expect_seedid is None else expect_seedid,
|
||||
}
|
||||
)
|
||||
|
||||
return bytes(
|
||||
json.dumps(rv),
|
||||
|
||||
Reference in New Issue
Block a user