mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: gracefully handling existing LDK wallets after deprecation
This commit is contained in:
parent
fabd816bfe
commit
6bb6f69a27
@ -455,13 +455,14 @@ export class BlueApp {
|
||||
unserializedWallet.init();
|
||||
break;
|
||||
}
|
||||
case 'lightningLdk':
|
||||
// since ldk wallets are deprecated and removed, we need to handle a case when such wallet still exists in storage
|
||||
unserializedWallet = new HDSegwitBech32Wallet();
|
||||
unserializedWallet.setSecret(tempObj.secret.replace('ldk://', ''));
|
||||
break;
|
||||
case LegacyWallet.type:
|
||||
default:
|
||||
unserializedWallet = LegacyWallet.fromJson(key) as unknown as LegacyWallet;
|
||||
if (tempObj.secret?.startsWith('ldk://')) {
|
||||
const extractedSecret = tempObj.secret.replace('ldk://', '');
|
||||
unserializedWallet.setSecret(extractedSecret);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user