Skip to content

Commit

Permalink
V4.19.5 v1.16.5 (#1654)
Browse files Browse the repository at this point in the history
* some not enough enhancements for sync status

* update app versions

* minor fix
  • Loading branch information
OmarHatem28 authored Aug 27, 2024
1 parent 4c795ea commit f072e79
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 42 deletions.
5 changes: 2 additions & 3 deletions assets/text/Monerocom_Release_Notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
Scan and verify messages
Synchronization enhancements
Bug fixes
Enhance auto-address generation for Monero
Bug fixes and enhancements
7 changes: 4 additions & 3 deletions assets/text/Release_Notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Scan and verify messages
Synchronization enhancements
Bug fixes
Enable BIP39 by default for wallet creation also on Bitcoin/Litecoin (Electrum seed type is still accessible through advanced settings page)
Improve fee calculation for Bitcoin to protect against overpaying or underpaying
Enhance auto-address generation for Monero
Bug fixes and enhancements
12 changes: 1 addition & 11 deletions cw_bitcoin/lib/electrum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,9 @@ class ElectrumClient {
}
},
onError: (Object error) {
socket = null;
final errorMsg = error.toString();
print(errorMsg);
unterminatedString = '';

final currentHost = socket?.address.host;
final isErrorForCurrentHost = errorMsg.contains(" ${currentHost} ");

if (currentHost != null && isErrorForCurrentHost)
_setConnectionStatus(ConnectionStatus.failed);
},
onDone: () {
unterminatedString = '';
Expand Down Expand Up @@ -436,7 +429,6 @@ class ElectrumClient {
{required String id, required String method, List<Object> params = const []}) {
try {
if (socket == null) {
_setConnectionStatus(ConnectionStatus.failed);
return null;
}
final subscription = BehaviorSubject<T>();
Expand All @@ -453,7 +445,6 @@ class ElectrumClient {
Future<dynamic> call(
{required String method, List<Object> params = const [], Function(int)? idCallback}) async {
if (socket == null) {
_setConnectionStatus(ConnectionStatus.failed);
return null;
}
final completer = Completer<dynamic>();
Expand All @@ -467,10 +458,9 @@ class ElectrumClient {
}

Future<dynamic> callWithTimeout(
{required String method, List<Object> params = const [], int timeout = 4000}) async {
{required String method, List<Object> params = const [], int timeout = 5000}) async {
try {
if (socket == null) {
_setConnectionStatus(ConnectionStatus.failed);
return null;
}
final completer = Completer<dynamic>();
Expand Down
10 changes: 6 additions & 4 deletions cw_bitcoin/lib/electrum_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ abstract class ElectrumWalletBase
Future<Isolate>? _isolate;

void Function(FlutterErrorDetails)? _onError;
Timer? _reconnectTimer;
Timer? _autoSaveTimer;
Timer? _updateFeeRateTimer;
static const int _autoSaveInterval = 1;
Expand Down Expand Up @@ -429,6 +428,10 @@ abstract class ElectrumWalletBase
@override
Future<void> startSync() async {
try {
if (syncStatus is SyncronizingSyncStatus) {
return;
}

syncStatus = SyncronizingSyncStatus();

if (hasSilentPaymentsScanning) {
Expand Down Expand Up @@ -2055,9 +2058,8 @@ abstract class ElectrumWalletBase

_isTryingToConnect = true;

_reconnectTimer?.cancel();
_reconnectTimer = Timer(Duration(seconds: 10), () {
if (this.syncStatus is! SyncedSyncStatus && this.syncStatus is! SyncedTipSyncStatus) {
Timer(Duration(seconds: 10), () {
if (this.syncStatus is NotConnectedSyncStatus || this.syncStatus is LostConnectionSyncStatus) {
this.electrumClient.connectToUri(
node!.uri,
useSSL: node!.useSSL ?? false,
Expand Down
4 changes: 1 addition & 3 deletions cw_monero/lib/monero_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ import 'package:cw_core/monero_transaction_priority.dart';
import 'package:cw_core/monero_wallet_keys.dart';
import 'package:cw_core/monero_wallet_utils.dart';
import 'package:cw_core/node.dart';
import 'package:cw_core/pathForWallet.dart';
import 'package:cw_core/pending_transaction.dart';
import 'package:cw_core/sync_status.dart';
import 'package:cw_core/transaction_direction.dart';
import 'package:cw_core/transaction_priority.dart';
import 'package:cw_core/unspent_coins_info.dart';
import 'package:cw_core/wallet_base.dart';
import 'package:cw_core/wallet_info.dart';
Expand Down Expand Up @@ -88,7 +86,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
reaction((_) => isEnabledAutoGenerateSubaddress, (bool enabled) {
_updateSubAddress(enabled, account: walletAddresses.account);
});
reaction((_) => transactionHistory, (__) {
_onTxHistoryChangeReaction = reaction((_) => transactionHistory, (__) {
_updateSubAddress(isEnabledAutoGenerateSubaddress, account: walletAddresses.account);
});
}
Expand Down
4 changes: 3 additions & 1 deletion lib/reactions/check_connection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ void startCheckConnectionReaction(WalletBase wallet, SettingsStore settingsStore
return;
}

if (wallet.syncStatus is LostConnectionSyncStatus || wallet.syncStatus is FailedSyncStatus) {
if (wallet.type != WalletType.bitcoin &&
(wallet.syncStatus is LostConnectionSyncStatus ||
wallet.syncStatus is FailedSyncStatus)) {
final alive = await settingsStore.getCurrentNode(wallet.type).requestNode();

if (alive) {
Expand Down
1 change: 0 additions & 1 deletion lib/utils/exception_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ class ExceptionHandler {
"Error while launching http",
"OS Error: Network is unreachable",
"ClientException: Write failed, uri=http",
"Connection terminated during handshake",
"Corrupted wallets seeds",
"bad_alloc",
"does not correspond",
Expand Down
8 changes: 4 additions & 4 deletions scripts/android/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
APP_ANDROID_TYPE=$1

MONERO_COM_NAME="Monero.com"
MONERO_COM_VERSION="1.16.4"
MONERO_COM_BUILD_NUMBER=98
MONERO_COM_VERSION="1.16.5"
MONERO_COM_BUILD_NUMBER=99
MONERO_COM_BUNDLE_ID="com.monero.app"
MONERO_COM_PACKAGE="com.monero.app"
MONERO_COM_SCHEME="monero.com"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.19.4"
CAKEWALLET_BUILD_NUMBER=225
CAKEWALLET_VERSION="4.19.5"
CAKEWALLET_BUILD_NUMBER=226
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
CAKEWALLET_SCHEME="cakewallet"
Expand Down
8 changes: 4 additions & 4 deletions scripts/ios/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
APP_IOS_TYPE=$1

MONERO_COM_NAME="Monero.com"
MONERO_COM_VERSION="1.16.4"
MONERO_COM_BUILD_NUMBER=96
MONERO_COM_VERSION="1.16.5"
MONERO_COM_BUILD_NUMBER=97
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="4.19.4"
CAKEWALLET_BUILD_NUMBER=263
CAKEWALLET_VERSION="4.19.5"
CAKEWALLET_BUILD_NUMBER=264
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"

HAVEN_NAME="Haven"
Expand Down
4 changes: 2 additions & 2 deletions scripts/linux/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ if [ -n "$1" ]; then
fi

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="1.9.4"
CAKEWALLET_BUILD_NUMBER=31
CAKEWALLET_VERSION="1.9.5"
CAKEWALLET_BUILD_NUMBER=32

if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then
echo "Wrong app type."
Expand Down
8 changes: 4 additions & 4 deletions scripts/macos/app_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ if [ -n "$1" ]; then
fi

MONERO_COM_NAME="Monero.com"
MONERO_COM_VERSION="1.6.4"
MONERO_COM_BUILD_NUMBER=28
MONERO_COM_VERSION="1.6.5"
MONERO_COM_BUILD_NUMBER=30
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"

CAKEWALLET_NAME="Cake Wallet"
CAKEWALLET_VERSION="1.12.4"
CAKEWALLET_BUILD_NUMBER=85
CAKEWALLET_VERSION="1.12.5"
CAKEWALLET_BUILD_NUMBER=86
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"

if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows/build_exe_installer.iss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MyAppName "Cake Wallet"
#define MyAppVersion "0.0.5"
#define MyAppVersion "0.0.6"
#define MyAppPublisher "Cake Labs LLC"
#define MyAppURL "https://cakewallet.com/"
#define MyAppExeName "CakeWallet.exe"
Expand Down
2 changes: 1 addition & 1 deletion tool/configure.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import 'dart:typed_data';
import 'package:bitcoin_base/bitcoin_base.dart';
import 'package:cake_wallet/view_model/hardware_wallet/ledger_view_model.dart';
import 'package:cake_wallet/view_model/send/output.dart';
import 'package:cw_bitcoin/electrum_transaction_info.dart';
import 'package:cw_core/hardware/hardware_account_data.dart';
import 'package:cw_core/node.dart';
import 'package:cw_core/output_info.dart';
Expand All @@ -102,6 +101,7 @@ import 'package:bip39/bip39.dart' as bip39;
import 'package:cw_bitcoin/utils.dart';
import 'package:cw_bitcoin/electrum_derivations.dart';
import 'package:cw_bitcoin/electrum.dart';
import 'package:cw_bitcoin/electrum_transaction_info.dart';
import 'package:cw_bitcoin/pending_bitcoin_transaction.dart';
import 'package:cw_bitcoin/bitcoin_receive_page_option.dart';
import 'package:cw_bitcoin/bitcoin_wallet.dart';
Expand Down

0 comments on commit f072e79

Please sign in to comment.