From d23f6f2823a2d53b578f930c11fb4b41e0b25a27 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 8 Nov 2022 13:48:29 -0600 Subject: [PATCH] return to use of final for bufferedCreateHeight using inline if and use wowlet's height estimation function for 14 word seeds --- crypto_plugins/flutter_libmonero | 2 +- lib/services/coins/wownero/wownero_wallet.dart | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/crypto_plugins/flutter_libmonero b/crypto_plugins/flutter_libmonero index afdee4b88..2d5f5e563 160000 --- a/crypto_plugins/flutter_libmonero +++ b/crypto_plugins/flutter_libmonero @@ -1 +1 @@ -Subproject commit afdee4b880202f39a2375afc320f0642e98a1827 +Subproject commit 2d5f5e5636bdc4b211b2236492268167b5b969d0 diff --git a/lib/services/coins/wownero/wownero_wallet.dart b/lib/services/coins/wownero/wownero_wallet.dart index 5c419afd1..55f43cdd1 100644 --- a/lib/services/coins/wownero/wownero_wallet.dart +++ b/lib/services/coins/wownero/wownero_wallet.dart @@ -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( boxName: walletId, key: "restoreHeight", value: bufferedCreateHeight);