mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
Fixes
This commit is contained in:
@@ -52,5 +52,6 @@ class MoneroTransactionInfo extends TransactionInfo {
|
||||
@override
|
||||
String fiatAmount() => _fiatAmount ?? '';
|
||||
|
||||
@override
|
||||
void changeFiatAmount(String amount) => _fiatAmount = formatAmount(amount);
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
|
||||
|
||||
void _setListeners() {
|
||||
_listener?.stop();
|
||||
_listener = monero_wallet.setListeners(_onNewBlock);
|
||||
_listener = monero_wallet.setListeners(_onNewBlock, _onNewTransaction);
|
||||
}
|
||||
|
||||
void _setInitialHeight() {
|
||||
@@ -308,14 +308,23 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
|
||||
}
|
||||
|
||||
void _onNewBlock(int height, int blocksLeft, double ptc) async {
|
||||
_askForUpdateTransactionHistory();
|
||||
if (walletInfo.isRecovery) {
|
||||
_askForUpdateTransactionHistory();
|
||||
}
|
||||
|
||||
_askForUpdateBalance();
|
||||
|
||||
if (blocksLeft < moneroBlockSize) {
|
||||
if (blocksLeft < 100) {
|
||||
syncStatus = SyncedSyncStatus();
|
||||
await _afterSyncSave();
|
||||
} else {
|
||||
syncStatus = SyncingSyncStatus(blocksLeft, ptc);
|
||||
}
|
||||
}
|
||||
|
||||
void _onNewTransaction() {
|
||||
_askForUpdateTransactionHistory();
|
||||
_askForUpdateBalance();
|
||||
_afterSyncSave();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,9 @@ class PendingMoneroTransaction with PendingTransaction {
|
||||
|
||||
final PendingTransactionDescription pendingTransactionDescription;
|
||||
|
||||
@override
|
||||
String get id => pendingTransactionDescription.hash;
|
||||
|
||||
@override
|
||||
String get amountFormatted => AmountConverter.amountIntToString(
|
||||
CryptoCurrency.xmr, pendingTransactionDescription.amount);
|
||||
|
||||
Reference in New Issue
Block a user