diff --git a/cw_monero/lib/account_list.dart b/cw_monero/lib/account_list.dart index 6e84f5931..79342cf3b 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 97a307040..caa0fffd3 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 4ac94e638..a60dfb75f 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 = 35; 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.6; 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 = 35; 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.6; 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 = 35; 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.6; 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 89cd769e0..970c892cd 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/bitcoin/bitcoin_transaction_priority.dart b/lib/bitcoin/bitcoin_transaction_priority.dart index 71002819b..9e2fbc24b 100644 --- a/lib/bitcoin/bitcoin_transaction_priority.dart +++ b/lib/bitcoin/bitcoin_transaction_priority.dart @@ -32,7 +32,7 @@ class BitcoinTransactionPriority extends TransactionPriority { switch (this) { case BitcoinTransactionPriority.slow: - label = S.current.transaction_priority_slow; + label = '${S.current.transaction_priority_slow} ~24hrs'; break; case BitcoinTransactionPriority.medium: label = S.current.transaction_priority_medium; diff --git a/lib/bitcoin/electrum.dart b/lib/bitcoin/electrum.dart index ec099037d..64569e416 100644 --- a/lib/bitcoin/electrum.dart +++ b/lib/bitcoin/electrum.dart @@ -308,7 +308,7 @@ class ElectrumClient { try { final topDoubleString = await estimatefee(p: 1); final middleDoubleString = await estimatefee(p: 20); - final bottomDoubleString = await estimatefee(p: 150); + final bottomDoubleString = await estimatefee(p: 100); final top = (stringDoubleToBitcoinAmount(topDoubleString.toString()) / 1000) .round(); @@ -319,8 +319,7 @@ class ElectrumClient { (stringDoubleToBitcoinAmount(bottomDoubleString.toString()) / 1000) .round(); - final res = [bottom, middle, top]; - return res; + return [bottom, middle, top]; } catch (_) { return []; } diff --git a/lib/monero/monero_wallet.dart b/lib/monero/monero_wallet.dart index cca24a979..6d7d41c4b 100644 --- a/lib/monero/monero_wallet.dart +++ b/lib/monero/monero_wallet.dart @@ -102,10 +102,8 @@ abstract class MoneroWalletBase extends WalletBase 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 abb78776a..b2aa7582d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,8 +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 -publish_to: none +version: 4.1.6+45 environment: sdk: ">=2.7.0 <3.0.0"