mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
fix(cw_monero): prevent monero wallet from breaking during rename (#2214)
* fix(cw_monero): prevent monero wallet from breaking during rename * update to cleaned up monero.dart * fix: transaction screen not refreshing in monero * fix: wallets not opening until app restart after rename. * fix(cw_decred): wallet renaming throwing * fix: transaction not being shown after sending until 1st confirmation * fix(cw_monero): loop safeguard * fix: don't await wallet.fetchTransactions
This commit is contained in:
@@ -271,10 +271,19 @@ abstract class DashboardViewModelBase with Store {
|
||||
});
|
||||
|
||||
_transactionDisposer?.reaction.dispose();
|
||||
_transactionDisposer = reaction(
|
||||
(_) => appStore.wallet!.transactionHistory.transactions.length,
|
||||
_transactionDisposerCallback,
|
||||
);
|
||||
_transactionDisposer = reaction((_) {
|
||||
final length = appStore.wallet!.transactionHistory.transactions.length;
|
||||
if (length == 0) {
|
||||
return 0;
|
||||
}
|
||||
int confirmations = 1;
|
||||
if (![WalletType.solana, WalletType.tron].contains(wallet.type)) {
|
||||
try {
|
||||
confirmations = appStore.wallet!.transactionHistory.transactions.values.first.confirmations + 1;
|
||||
} catch (_) {}
|
||||
}
|
||||
return length * confirmations;
|
||||
}, _transactionDisposerCallback);
|
||||
|
||||
if (hasSilentPayments) {
|
||||
silentPaymentsScanningActive = bitcoin!.getScanningActive(wallet);
|
||||
@@ -891,8 +900,19 @@ abstract class DashboardViewModelBase with Store {
|
||||
|
||||
_transactionDisposer?.reaction.dispose();
|
||||
|
||||
_transactionDisposer = reaction((_) => appStore.wallet!.transactionHistory.transactions.length,
|
||||
_transactionDisposerCallback);
|
||||
_transactionDisposer = reaction((_) {
|
||||
final length = appStore.wallet!.transactionHistory.transactions.length;
|
||||
if (length == 0) {
|
||||
return 0;
|
||||
}
|
||||
int confirmations = 1;
|
||||
if (![WalletType.solana, WalletType.tron].contains(wallet.type)) {
|
||||
try {
|
||||
confirmations = appStore.wallet!.transactionHistory.transactions.values.first.confirmations + 1;
|
||||
} catch (_) {}
|
||||
}
|
||||
return length * confirmations;
|
||||
}, _transactionDisposerCallback);
|
||||
}
|
||||
|
||||
@action
|
||||
|
||||
Reference in New Issue
Block a user