mirror of
https://github.com/basicswap/basicswap.git
synced 2025-11-05 18:38:09 +01:00
Disable v23 descriptor wallets.
Missing sethdseed, signmessage doesn't work and dumprivkey is missing (preventing a workaround).
This commit is contained in:
@@ -723,6 +723,10 @@ class BasicSwap(BaseApp):
|
||||
yield c
|
||||
|
||||
def changeWalletPasswords(self, old_password, new_password):
|
||||
|
||||
if len(self.swaps_in_progress) > 0:
|
||||
raise ValueError('Can\'t change passwords while swaps are in progress')
|
||||
|
||||
# Unlock all wallets to ensure they all have the same password.
|
||||
for c in self.activeCoins():
|
||||
ci = self.ci(c)
|
||||
|
||||
@@ -1261,6 +1261,7 @@ class BTCInterface(CoinInterface):
|
||||
ensure(sign_for_addr is not None, 'Could not find address with enough funds for proof')
|
||||
|
||||
self._log.debug('sign_for_addr %s', sign_for_addr)
|
||||
|
||||
if self._use_segwit: # TODO: Use isSegwitAddress when scantxoutset can use combo
|
||||
# 'Address does not refer to key' for non p2pkh
|
||||
pkh = self.decodeAddress(sign_for_addr)
|
||||
@@ -1291,6 +1292,7 @@ class BTCInterface(CoinInterface):
|
||||
return False
|
||||
|
||||
def changeWalletPassword(self, old_password, new_password):
|
||||
self._log.info('changeWalletPassword - {}'.format(self.ticker()))
|
||||
if old_password == '':
|
||||
return self.rpc_callback('encryptwallet', [new_password])
|
||||
self.rpc_callback('walletpassphrasechange', [old_password, new_password])
|
||||
@@ -1298,10 +1300,12 @@ class BTCInterface(CoinInterface):
|
||||
def unlockWallet(self, password):
|
||||
if password == '':
|
||||
return
|
||||
self._log.info('unlockWallet - {}'.format(self.ticker()))
|
||||
# Max timeout value, ~3 years
|
||||
self.rpc_callback('walletpassphrase', [password, 100000000])
|
||||
|
||||
def lockWallet(self):
|
||||
self._log.info('lockWallet - {}'.format(self.ticker()))
|
||||
self.rpc_callback('walletlock')
|
||||
|
||||
|
||||
|
||||
@@ -295,7 +295,6 @@ class XMRInterface(CoinInterface):
|
||||
}
|
||||
|
||||
try:
|
||||
rv = self.rpc_wallet_cb('open_wallet', {'filename': address_b58})
|
||||
self.openWallet(address_b58)
|
||||
except Exception as e:
|
||||
self.createWallet(params)
|
||||
@@ -520,6 +519,7 @@ class XMRInterface(CoinInterface):
|
||||
return balance_info['unlocked_balance']
|
||||
|
||||
def changeWalletPassword(self, old_password, new_password):
|
||||
self._log.info('changeWalletPassword - {}'.format(self.ticker()))
|
||||
orig_password = self._wallet_password
|
||||
if old_password != '':
|
||||
self._wallet_password = old_password
|
||||
@@ -531,7 +531,9 @@ class XMRInterface(CoinInterface):
|
||||
raise e
|
||||
|
||||
def unlockWallet(self, password):
|
||||
self._log.info('unlockWallet - {}'.format(self.ticker()))
|
||||
self._wallet_password = password
|
||||
|
||||
def lockWallet(self):
|
||||
self._log.info('lockWallet - {}'.format(self.ticker()))
|
||||
self._wallet_password = None
|
||||
|
||||
Reference in New Issue
Block a user