minor enhancements

This commit is contained in:
OmarHatem 2024-05-25 17:22:33 +03:00
parent c71318ca03
commit c4b4d4e735
6 changed files with 28 additions and 31 deletions

View file

@ -1,4 +1,2 @@
Bitcoin Silent Payments
Add Tron wallet
Hardware wallets enhancements
Bug fixes
Bug fixes and generic enhancements

View file

@ -368,12 +368,6 @@ class ElectrumClient {
id: 'blockchain.headers.subscribe', method: 'blockchain.headers.subscribe');
}
BehaviorSubject<Object>? chainTipUpdate() {
_id += 1;
return subscribe<Object>(
id: 'blockchain.headers.subscribe', method: 'blockchain.headers.subscribe');
}
BehaviorSubject<Object>? scripthashUpdate(String scripthash) {
_id += 1;
return subscribe<Object>(

View file

@ -227,7 +227,6 @@ abstract class ElectrumWalletBase
}
}
@observable
int? _currentChainTip;
Future<int> getCurrentChainTip() async {
@ -1760,12 +1759,14 @@ abstract class ElectrumWalletBase
_chainTipUpdateSubject = electrumClient.chainTipSubscribe();
_chainTipUpdateSubject?.listen((e) async {
final event = e as Map<String, dynamic>;
final height = int.parse(event['height'].toString());
final height = int.tryParse(event['height'].toString());
_currentChainTip = height;
if (height != null) {
_currentChainTip = height;
if (alwaysScan == true && syncStatus is SyncedSyncStatus) {
_setListeners(walletInfo.restoreHeight);
if (alwaysScan == true && syncStatus is SyncedSyncStatus) {
_setListeners(walletInfo.restoreHeight);
}
}
});
}

View file

@ -1,4 +1,5 @@
import 'package:cake_wallet/bitcoin/bitcoin.dart';
import 'package:cake_wallet/main.dart';
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
import 'package:cake_wallet/utils/show_pop_up.dart';
import 'package:flutter/material.dart';
@ -42,8 +43,9 @@ class RescanPage extends BasePage {
return _toggleSilentPaymentsScanning(context);
}
await _rescanViewModel.rescanCurrentWallet(
_rescanViewModel.rescanCurrentWallet(
restoreHeight: _blockchainHeightWidgetKey.currentState!.height);
Navigator.of(context).pop();
},
color: Theme.of(context).primaryColor,
@ -55,28 +57,30 @@ class RescanPage extends BasePage {
}
Future<void> _toggleSilentPaymentsScanning(BuildContext context) async {
final height = _blockchainHeightWidgetKey.currentState!.height;
Navigator.of(context).pop();
final needsToSwitch =
await bitcoin!.getNodeIsElectrsSPEnabled(_rescanViewModel.wallet) == false;
if (needsToSwitch) {
return showPopUp<void>(
context: context,
builder: (BuildContext context) => AlertWithTwoActions(
alertTitle: S.of(context).change_current_node_title,
alertContent: S.of(context).confirm_silent_payments_switch_node,
rightButtonText: S.of(context).ok,
leftButtonText: S.of(context).cancel,
context: navigatorKey.currentState!.context,
builder: (BuildContext _dialogContext) => AlertWithTwoActions(
alertTitle: S.of(_dialogContext).change_current_node_title,
alertContent: S.of(_dialogContext).confirm_silent_payments_switch_node,
rightButtonText: S.of(_dialogContext).ok,
leftButtonText: S.of(_dialogContext).cancel,
actionRightButton: () async {
_rescanViewModel.rescanCurrentWallet(
restoreHeight: _blockchainHeightWidgetKey.currentState!.height);
Navigator.of(context).pop();
Navigator.of(_dialogContext).pop();
_rescanViewModel.rescanCurrentWallet(restoreHeight: height);
},
actionLeftButton: () => Navigator.of(context).pop(),
actionLeftButton: () => Navigator.of(_dialogContext).pop(),
));
}
await _rescanViewModel.rescanCurrentWallet(
restoreHeight: _blockchainHeightWidgetKey.currentState!.height);
Navigator.of(context).pop();
_rescanViewModel.rescanCurrentWallet(restoreHeight: height);
}
}

View file

@ -18,8 +18,8 @@ MONERO_COM_BUILD_NUMBER=87
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.17.0"
CAKEWALLET_BUILD_NUMBER=244
CAKEWALLET_VERSION="4.18.0"
CAKEWALLET_BUILD_NUMBER=247
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
HAVEN_NAME="Haven"

View file

@ -22,7 +22,7 @@ MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="1.10.0"
CAKEWALLET_BUILD_NUMBER=76
CAKEWALLET_BUILD_NUMBER=77
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then