electrum updates (#1449)

* hotfixes

* copy over the rest of the fixes

* use hardened derivation path everywhere

* correct balance path for electrum

* revert index nullability and correct balance path for all cases

* only save wallet info if we changed it
This commit is contained in:
Matthew Fosse
2024-06-18 08:08:03 +03:00
committed by GitHub
parent fc2c9a2bcc
commit 591342ec6a
10 changed files with 66 additions and 46 deletions
+2 -4
View File
@@ -1,3 +1,4 @@
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/core/wallet_creation_service.dart';
import 'package:cake_wallet/di.dart';
import 'package:cake_wallet/entities/background_tasks.dart';
@@ -98,10 +99,7 @@ abstract class WalletCreationVMBase with Store {
);
case WalletType.bitcoin:
case WalletType.litecoin:
return DerivationInfo(
derivationType: DerivationType.electrum,
derivationPath: "m/0'",
);
return bitcoin!.getElectrumDerivations()[DerivationType.electrum]!.first;
default:
return null;
}