return to use of final for bufferedCreateHeight using inline if

and use wowlet's height estimation function for 14 word seeds
This commit is contained in:
sneurlax 2022-11-08 13:48:29 -06:00
parent 48e8501e27
commit d23f6f2823
2 changed files with 3 additions and 7 deletions

@ -1 +1 @@
Subproject commit afdee4b880202f39a2375afc320f0642e98a1827
Subproject commit 2d5f5e5636bdc4b211b2236492268167b5b969d0

View file

@ -714,12 +714,8 @@ class WowneroWallet extends CoinServiceAPI {
final wallet = await _walletCreationService?.create(credentials);
// subtract a couple days to ensure we have a buffer for SWB
if (seedWordsLength == 14) {
final bufferedCreateHeight = getSeedHeightSync(wallet?.seed.trim() as String);
} else {
final bufferedCreateHeight = 0;
// TODO use an alternative to wow_seed's get_seed_height
}
final bufferedCreateHeight = (seedWordsLength == 14) ? getSeedHeightSync(wallet?.seed.trim() as String) : 0;
// TODO use an alternative to wow_seed's get_seed_height instead of 0 above
await DB.instance.put<dynamic>(
boxName: walletId, key: "restoreHeight", value: bufferedCreateHeight);