mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-30 11:54:22 +01:00
Make SP scanning, wallet-specific (#2383)
This commit is contained in:
@@ -12,7 +12,6 @@ import 'package:cake_wallet/entities/provider_types.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/routes.dart';
|
||||
import 'package:cake_wallet/store/app_store.dart';
|
||||
import 'package:cake_wallet/themes/core/material_base_theme.dart';
|
||||
import 'package:cw_core/crypto_currency.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
@@ -89,7 +88,7 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
|
||||
return isBuyAction ? formattedFiatAmount : formattedCryptoAmount;
|
||||
}
|
||||
|
||||
AppStore _appStore;
|
||||
final AppStore _appStore;
|
||||
|
||||
Quote? bestRateQuote;
|
||||
|
||||
@@ -315,14 +314,16 @@ abstract class BuySellViewModelBase extends WalletChangeListenerViewModel with S
|
||||
...outOfLimitQuotes,
|
||||
]);
|
||||
|
||||
await Navigator.of(context).pushNamed(
|
||||
Routes.buyOptionsPage,
|
||||
arguments: [
|
||||
updatedQuoteOptions,
|
||||
changeOption,
|
||||
launchTrade,
|
||||
],
|
||||
).then((value) => calculateBestRate());
|
||||
if (context.mounted) {
|
||||
await Navigator.of(context).pushNamed(
|
||||
Routes.buyOptionsPage,
|
||||
arguments: [
|
||||
updatedQuoteOptions,
|
||||
changeOption,
|
||||
launchTrade,
|
||||
],
|
||||
).then((value) => calculateBestRate());
|
||||
}
|
||||
}
|
||||
|
||||
void _onPairChange() {
|
||||
|
||||
@@ -18,7 +18,7 @@ abstract class SilentPaymentsSettingsViewModelBase with Store {
|
||||
bool get silentPaymentsCardDisplay => _settingsStore.silentPaymentsCardDisplay;
|
||||
|
||||
@computed
|
||||
bool get silentPaymentsAlwaysScan => _settingsStore.silentPaymentsAlwaysScan;
|
||||
bool get silentPaymentsAlwaysScan => bitcoin!.getIsAlwaysScanningSP(_wallet);
|
||||
|
||||
@action
|
||||
void setSilentPaymentsCardDisplay(bool value) {
|
||||
@@ -27,7 +27,7 @@ abstract class SilentPaymentsSettingsViewModelBase with Store {
|
||||
|
||||
@action
|
||||
void setSilentPaymentsAlwaysScan(bool value) {
|
||||
_settingsStore.silentPaymentsAlwaysScan = value;
|
||||
bitcoin!.setIsAlwaysScanningSP(_wallet, value);
|
||||
if (value) bitcoin!.setScanningActive(_wallet, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user