diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index ab6496387..69d04462b 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -354,7 +354,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 17; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -494,7 +494,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 17; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -528,7 +528,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 16; + CURRENT_PROJECT_VERSION = 17; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/bitcoin/electrum.dart b/lib/bitcoin/electrum.dart index be1aba92e..994264729 100644 --- a/lib/bitcoin/electrum.dart +++ b/lib/bitcoin/electrum.dart @@ -37,7 +37,8 @@ class ElectrumClient { ElectrumClient() : _id = 0, _isConnected = false, - _tasks = {}; + _tasks = {}, + unterminatedString = ''; static const connectionTimeout = Duration(seconds: 5); static const aliveTimerDuration = Duration(seconds: 2); @@ -80,11 +81,7 @@ class ElectrumClient { } on FormatException catch (e) { final msg = e.message.toLowerCase(); - if (msg == 'Unterminated string'.toLowerCase()) { - unterminatedString = e.source as String; - } - - if (msg == 'Unexpected character'.toLowerCase()) { + if (e.source is String) { unterminatedString += e.source as String; } @@ -97,7 +94,7 @@ class ElectrumClient { final response = json.decode(unterminatedString) as Map; _handleResponse(response); - unterminatedString = null; + unterminatedString = ''; } } on TypeError catch (e) { if (!e.toString().contains('Map')) { diff --git a/pubspec.yaml b/pubspec.yaml index 61e6b0cc8..fd0615297 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Cake Wallet. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 4.1.0+32 +version: 4.1.0+33 environment: sdk: ">=2.7.0 <3.0.0"