dash: Fix initialiseWallet

Only the upgradetohd command sets the hdseed
upgradetohd can only run once the chain is synced

Basicswap stores the hash of the root_key in it's db to check for the expected seed.
Prefer not to store the real key.
This commit is contained in:
tecnovert
2022-10-21 13:00:28 +02:00
parent 4866ff4db8
commit aa14da27af
7 changed files with 31 additions and 6 deletions

View File

@@ -980,6 +980,8 @@ class BasicSwap(BaseApp):
raise ValueError('Invalid swap type for PART_BLIND')
if coin_from == Coins.PIVX and swap_type == SwapTypes.XMR_SWAP:
raise ValueError('TODO: PIVX -> XMR')
if coin_from == Coins.DASH and swap_type == SwapTypes.XMR_SWAP:
raise ValueError('TODO: DASH -> XMR')
def notify(self, event_type, event_data, session=None):
@@ -1497,7 +1499,7 @@ class BasicSwap(BaseApp):
if expect_seedid is None:
self.log.warning('Can\'t find expected wallet seed id for coin {}'.format(ci.coin_name()))
return False
if expect_seedid == ci.getWalletSeedID():
if ci.checkExpectedSeed(expect_seedid):
ci.setWalletSeedWarning(False)
return True
self.log.warning('Wallet for coin {} not derived from swap seed.'.format(ci.coin_name()))