mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
some small bug fixes
This commit is contained in:
parent
8c67901c28
commit
7e6daad779
4 changed files with 9 additions and 9 deletions
|
@ -945,6 +945,7 @@ class EpicCashWallet extends CoinServiceAPI
|
|||
Logging.instance.log("Opening existing ${coin.prettyName} wallet",
|
||||
level: LogLevel.Info);
|
||||
|
||||
await isarInit(walletId);
|
||||
final config = await getRealConfig();
|
||||
final password = await _secureStore.read(key: '${_walletId}_password');
|
||||
|
||||
|
@ -959,7 +960,6 @@ class EpicCashWallet extends CoinServiceAPI
|
|||
}
|
||||
await _prefs.init();
|
||||
await updateNode(false);
|
||||
await isarInit(walletId);
|
||||
await _refreshBalance();
|
||||
// TODO: is there anything else that should be set up here whenever this wallet is first loaded again?
|
||||
}
|
||||
|
@ -1015,6 +1015,8 @@ class EpicCashWallet extends CoinServiceAPI
|
|||
String stringConfig = await getConfig();
|
||||
String epicboxConfig = await getEpicBoxConfig();
|
||||
|
||||
await isarInit(walletId);
|
||||
|
||||
await _secureStore.write(
|
||||
key: '${_walletId}_mnemonic', value: mnemonicString);
|
||||
await _secureStore.write(key: '${_walletId}_config', value: stringConfig);
|
||||
|
@ -1051,8 +1053,6 @@ class EpicCashWallet extends CoinServiceAPI
|
|||
epicUpdateRestoreHeight(bufferedCreateHeight),
|
||||
updateCachedIsFavorite(false),
|
||||
]);
|
||||
|
||||
await isarInit(walletId);
|
||||
}
|
||||
|
||||
bool refreshMutex = false;
|
||||
|
|
|
@ -1077,6 +1077,7 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
if (highestPercentCached < percent) {
|
||||
highestPercentCached = percent;
|
||||
}
|
||||
await updateCachedChainHeight(height);
|
||||
|
||||
GlobalEventBus.instance.fire(
|
||||
RefreshPercentChangedEvent(
|
||||
|
@ -1206,8 +1207,7 @@ class MoneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
);
|
||||
|
||||
@override
|
||||
// TODO: implement storedChainHeight
|
||||
int get storedChainHeight => throw UnimplementedError();
|
||||
int get storedChainHeight => getCachedChainHeight();
|
||||
|
||||
@override
|
||||
Balance get balance => _balance ??= getCachedBalance();
|
||||
|
|
|
@ -1146,6 +1146,7 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
if (highestPercentCached < percent) {
|
||||
highestPercentCached = percent;
|
||||
}
|
||||
await updateCachedChainHeight(height);
|
||||
|
||||
GlobalEventBus.instance.fire(
|
||||
RefreshPercentChangedEvent(
|
||||
|
@ -1275,8 +1276,7 @@ class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
|||
);
|
||||
|
||||
@override
|
||||
// TODO: implement storedChainHeight
|
||||
int get storedChainHeight => throw UnimplementedError();
|
||||
int get storedChainHeight => getCachedChainHeight();
|
||||
|
||||
@override
|
||||
Balance get balance => _balance ??= getCachedBalance();
|
||||
|
|
|
@ -85,7 +85,7 @@ mixin EpicCashHive {
|
|||
// epic restore height
|
||||
int? epicGetRestoreHeight() {
|
||||
return DB.instance.get<dynamic>(boxName: _walletId, key: "restoreHeight")
|
||||
as int;
|
||||
as int?;
|
||||
}
|
||||
|
||||
Future<void> epicUpdateRestoreHeight(int height) async {
|
||||
|
@ -99,7 +99,7 @@ mixin EpicCashHive {
|
|||
// epic creation height
|
||||
int? epicGetCreationHeight() {
|
||||
return DB.instance.get<dynamic>(boxName: _walletId, key: "creationHeight")
|
||||
as int;
|
||||
as int?;
|
||||
}
|
||||
|
||||
Future<void> epicUpdateCreationHeight(int height) async {
|
||||
|
|
Loading…
Reference in a new issue