diff --git a/cw_monero/lib/account_list.dart b/cw_monero/lib/account_list.dart index 6e84f59315..79342cf3b2 100644 --- a/cw_monero/lib/account_list.dart +++ b/cw_monero/lib/account_list.dart @@ -5,6 +5,7 @@ import 'package:cw_monero/types.dart'; import 'package:cw_monero/monero_api.dart'; import 'package:cw_monero/structs/account_row.dart'; import 'package:flutter/foundation.dart'; +import 'package:cw_monero/wallet.dart'; final accountSizeNative = moneroApi .lookup>('account_size') @@ -70,8 +71,13 @@ void _setLabelForAccount(Map args) { setLabelForAccountSync(label: label, accountIndex: accountIndex); } -Future addAccount({String label}) async => compute(_addAccount, label); +Future addAccount({String label}) async { + await compute(_addAccount, label); + await store(); +} -Future setLabelForAccount({int accountIndex, String label}) async => - compute( - _setLabelForAccount, {'accountIndex': accountIndex, 'label': label}); \ No newline at end of file +Future setLabelForAccount({int accountIndex, String label}) async { + await compute( + _setLabelForAccount, {'accountIndex': accountIndex, 'label': label}); + await store(); +} \ No newline at end of file diff --git a/cw_monero/lib/subaddress_list.dart b/cw_monero/lib/subaddress_list.dart index 97a3070406..caa0fffd3a 100644 --- a/cw_monero/lib/subaddress_list.dart +++ b/cw_monero/lib/subaddress_list.dart @@ -5,6 +5,7 @@ import 'package:cw_monero/signatures.dart'; import 'package:cw_monero/types.dart'; import 'package:cw_monero/monero_api.dart'; import 'package:cw_monero/structs/subaddress_row.dart'; +import 'package:cw_monero/wallet.dart'; final subaddressSizeNative = moneroApi .lookup>('subaddrress_size') @@ -79,14 +80,18 @@ void _setLabelForSubaddress(Map args) { accountIndex: accountIndex, addressIndex: addressIndex, label: label); } -Future addSubaddress({int accountIndex, String label}) async => - compute, void>( +Future addSubaddress({int accountIndex, String label}) async { + await compute, void>( _addSubaddress, {'accountIndex': accountIndex, 'label': label}); + await store(); +} Future setLabelForSubaddress( - {int accountIndex, int addressIndex, String label}) => - compute, void>(_setLabelForSubaddress, { - 'accountIndex': accountIndex, - 'addressIndex': addressIndex, - 'label': label - }); + {int accountIndex, int addressIndex, String label}) async { + await compute, void>(_setLabelForSubaddress, { + 'accountIndex': accountIndex, + 'addressIndex': addressIndex, + 'label': label + }); + await store(); +} diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 4ac94e6383..6e3df44f7f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -358,7 +358,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 33; + CURRENT_PROJECT_VERSION = 34; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -375,7 +375,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.1.4; + MARKETING_VERSION = 4.1.5; PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -501,7 +501,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 33; + CURRENT_PROJECT_VERSION = 34; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -518,7 +518,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.1.4; + MARKETING_VERSION = 4.1.5; PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -536,7 +536,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 33; + CURRENT_PROJECT_VERSION = 34; DEVELOPMENT_TEAM = 32J6BB6VUS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -553,7 +553,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 4.1.4; + MARKETING_VERSION = 4.1.5; PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 89cd769e0a..970c892cd0 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -24,6 +24,11 @@ $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSCameraUsageDescription Used for scan QR code NSDocumentsFolderUsageDescription diff --git a/lib/monero/monero_wallet.dart b/lib/monero/monero_wallet.dart index ac7f0cd94d..0891100c89 100644 --- a/lib/monero/monero_wallet.dart +++ b/lib/monero/monero_wallet.dart @@ -100,10 +100,8 @@ abstract class MoneroWalletBase extends WalletBase with Store { Future init() async { accountList.update(); - accountList.accounts.observe((_) async => await save()); account = accountList.accounts.first; subaddressList.update(accountIndex: account.id ?? 0); - subaddressList.subaddresses.observe((_) async => await save()); subaddress = subaddressList.getAll().first; balance = MoneroBalance( fullBalance: monero_wallet.getFullBalance(accountIndex: account.id), diff --git a/pubspec.yaml b/pubspec.yaml index e93b34fa62..388b8a5f2e 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.4+43 +version: 4.1.5+44 environment: sdk: ">=2.7.0 <3.0.0"