Fix renamming first derivation
This commit is contained in:
parent
d1ffe2a5dc
commit
b3efa766d6
|
@ -136,20 +136,15 @@ class WalletOptionsProvider with ChangeNotifier {
|
||||||
|
|
||||||
String newConfig =
|
String newConfig =
|
||||||
await _walletConfig.readAsLines().then((List<String> lines) {
|
await _walletConfig.readAsLines().then((List<String> lines) {
|
||||||
int nbrLines = lines.length;
|
for (String wLine in lines) {
|
||||||
if (nbrLines != 1) {
|
String wID = "${wLine.split(':')[0]}:${wLine.split(':')[1]}";
|
||||||
for (String wLine in lines) {
|
String deri = wLine.split(':')[3];
|
||||||
String wID = "${wLine.split(':')[0]}:${wLine.split(':')[1]}";
|
if (wID == _walletID) {
|
||||||
String deri = wLine.split(':')[3];
|
lines.remove(wLine);
|
||||||
if (wID == _walletID) {
|
lines.add('$_walletID:$_newName:$deri');
|
||||||
lines.remove(wLine);
|
|
||||||
lines.add('$_walletID:$_newName:$deri');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return lines.join('\n');
|
|
||||||
} else {
|
|
||||||
return 'true';
|
|
||||||
}
|
}
|
||||||
|
return lines.join('\n');
|
||||||
});
|
});
|
||||||
|
|
||||||
await _walletConfig.delete();
|
await _walletConfig.delete();
|
||||||
|
|
Loading…
Reference in New Issue