mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
resolve "can't add to fixed length list" exception
This commit is contained in:
parent
809cbe6195
commit
bfdcfcec1a
1 changed files with 3 additions and 3 deletions
|
@ -93,14 +93,14 @@ class _CompleteReshareConfigViewState
|
|||
),
|
||||
);
|
||||
} else {
|
||||
final salts = frostInfo.knownSalts;
|
||||
salts.add(salt);
|
||||
final salts = frostInfo.knownSalts; // Fixed length list.
|
||||
final newSalts = List<String>.from(salts)..add(salt);
|
||||
final mainDB = ref.read(mainDBProvider);
|
||||
await mainDB.isar.writeTxn(() async {
|
||||
final info = frostInfo;
|
||||
await mainDB.isar.frostWalletInfo.delete(info.id);
|
||||
await mainDB.isar.frostWalletInfo.put(
|
||||
info.copyWith(knownSalts: salts),
|
||||
info.copyWith(knownSalts: newSalts),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue