Change derivation %3 to %2; Harden derivation
This commit is contained in:
parent
d53facca05
commit
345a600599
|
@ -126,10 +126,10 @@ class MyWalletsProvider with ChangeNotifier {
|
|||
List<WalletData> _walletConfig = readAllWallets(_chest);
|
||||
|
||||
if (_walletConfig.isEmpty) {
|
||||
_newDerivationNbr = 3;
|
||||
_newDerivationNbr = 2;
|
||||
_newWalletNbr = 0;
|
||||
} else {
|
||||
_newDerivationNbr = _walletConfig.last.derivation! + 3;
|
||||
_newDerivationNbr = _walletConfig.last.derivation! + 2;
|
||||
_newWalletNbr = _walletConfig.last.number! + 1;
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,8 @@ class MyWalletsProvider with ChangeNotifier {
|
|||
final int? _currentChestNumber = myWalletProvider.getCurrentChest();
|
||||
final ChestData _currentChest = chestBox.get(_currentChestNumber)!;
|
||||
|
||||
final address = await _sdk.derive(context, _currentChest.address!, _newDerivationNbr, pinCode);
|
||||
final address = await _sdk.derive(
|
||||
context, _currentChest.address!, _newDerivationNbr, pinCode);
|
||||
|
||||
WalletData newWallet = WalletData(
|
||||
chest: _chest,
|
||||
|
|
|
@ -299,7 +299,7 @@ class SubstrateSdk with ChangeNotifier {
|
|||
print(generatedMnemonic);
|
||||
print(sourceDerivation);
|
||||
|
||||
return await importAccount(fromMnemonic: true, derivePath: '/$number');
|
||||
return await importAccount(fromMnemonic: true, derivePath: '//$number');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,7 +124,8 @@ class SettingsScreen extends StatelessWidget {
|
|||
),
|
||||
onPressed: () async => {
|
||||
log.i('Suppression de tous les wallets'),
|
||||
await _myWallets.deleteAllWallet(context)
|
||||
await _myWallets.deleteAllWallet(context),
|
||||
await _sub.deleteAllAccounts()
|
||||
},
|
||||
child: const Text("EFFACER TOUS MES PORTEFEUILLES",
|
||||
style: TextStyle(fontSize: 20)))))),
|
||||
|
|
Loading…
Reference in New Issue