mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 17:40:43 +00:00
Merged main into ltc.
This commit is contained in:
commit
35a76cd0e7
8 changed files with 38 additions and 26 deletions
|
@ -5,6 +5,7 @@ import 'package:cw_monero/types.dart';
|
||||||
import 'package:cw_monero/monero_api.dart';
|
import 'package:cw_monero/monero_api.dart';
|
||||||
import 'package:cw_monero/structs/account_row.dart';
|
import 'package:cw_monero/structs/account_row.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:cw_monero/wallet.dart';
|
||||||
|
|
||||||
final accountSizeNative = moneroApi
|
final accountSizeNative = moneroApi
|
||||||
.lookup<NativeFunction<account_size>>('account_size')
|
.lookup<NativeFunction<account_size>>('account_size')
|
||||||
|
@ -70,8 +71,13 @@ void _setLabelForAccount(Map<String, dynamic> args) {
|
||||||
setLabelForAccountSync(label: label, accountIndex: accountIndex);
|
setLabelForAccountSync(label: label, accountIndex: accountIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> addAccount({String label}) async => compute(_addAccount, label);
|
Future<void> addAccount({String label}) async {
|
||||||
|
await compute(_addAccount, label);
|
||||||
|
await store();
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> setLabelForAccount({int accountIndex, String label}) async =>
|
Future<void> setLabelForAccount({int accountIndex, String label}) async {
|
||||||
compute(
|
await compute(
|
||||||
_setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
|
_setLabelForAccount, {'accountIndex': accountIndex, 'label': label});
|
||||||
|
await store();
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ import 'package:cw_monero/signatures.dart';
|
||||||
import 'package:cw_monero/types.dart';
|
import 'package:cw_monero/types.dart';
|
||||||
import 'package:cw_monero/monero_api.dart';
|
import 'package:cw_monero/monero_api.dart';
|
||||||
import 'package:cw_monero/structs/subaddress_row.dart';
|
import 'package:cw_monero/structs/subaddress_row.dart';
|
||||||
|
import 'package:cw_monero/wallet.dart';
|
||||||
|
|
||||||
final subaddressSizeNative = moneroApi
|
final subaddressSizeNative = moneroApi
|
||||||
.lookup<NativeFunction<subaddrress_size>>('subaddrress_size')
|
.lookup<NativeFunction<subaddrress_size>>('subaddrress_size')
|
||||||
|
@ -79,14 +80,18 @@ void _setLabelForSubaddress(Map<String, dynamic> args) {
|
||||||
accountIndex: accountIndex, addressIndex: addressIndex, label: label);
|
accountIndex: accountIndex, addressIndex: addressIndex, label: label);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future addSubaddress({int accountIndex, String label}) async =>
|
Future addSubaddress({int accountIndex, String label}) async {
|
||||||
compute<Map<String, Object>, void>(
|
await compute<Map<String, Object>, void>(
|
||||||
_addSubaddress, {'accountIndex': accountIndex, 'label': label});
|
_addSubaddress, {'accountIndex': accountIndex, 'label': label});
|
||||||
|
await store();
|
||||||
|
}
|
||||||
|
|
||||||
Future setLabelForSubaddress(
|
Future setLabelForSubaddress(
|
||||||
{int accountIndex, int addressIndex, String label}) =>
|
{int accountIndex, int addressIndex, String label}) async {
|
||||||
compute<Map<String, Object>, void>(_setLabelForSubaddress, {
|
await compute<Map<String, Object>, void>(_setLabelForSubaddress, {
|
||||||
'accountIndex': accountIndex,
|
'accountIndex': accountIndex,
|
||||||
'addressIndex': addressIndex,
|
'addressIndex': addressIndex,
|
||||||
'label': label
|
'label': label
|
||||||
});
|
});
|
||||||
|
await store();
|
||||||
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 33;
|
CURRENT_PROJECT_VERSION = 35;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
@ -375,7 +375,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 4.1.4;
|
MARKETING_VERSION = 4.1.6;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
|
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
@ -501,7 +501,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 33;
|
CURRENT_PROJECT_VERSION = 35;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
@ -518,7 +518,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 4.1.4;
|
MARKETING_VERSION = 4.1.6;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
|
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
@ -536,7 +536,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
|
||||||
CURRENT_PROJECT_VERSION = 33;
|
CURRENT_PROJECT_VERSION = 35;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
|
@ -553,7 +553,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 4.1.4;
|
MARKETING_VERSION = 4.1.6;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
|
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|
|
@ -24,6 +24,11 @@
|
||||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>NSAppTransportSecurity</key>
|
||||||
|
<dict>
|
||||||
|
<key>NSAllowsArbitraryLoads</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>Used for scan QR code</string>
|
<string>Used for scan QR code</string>
|
||||||
<key>NSDocumentsFolderUsageDescription</key>
|
<key>NSDocumentsFolderUsageDescription</key>
|
||||||
|
|
|
@ -32,7 +32,7 @@ class BitcoinTransactionPriority extends TransactionPriority {
|
||||||
|
|
||||||
switch (this) {
|
switch (this) {
|
||||||
case BitcoinTransactionPriority.slow:
|
case BitcoinTransactionPriority.slow:
|
||||||
label = S.current.transaction_priority_slow;
|
label = '${S.current.transaction_priority_slow} ~24hrs';
|
||||||
break;
|
break;
|
||||||
case BitcoinTransactionPriority.medium:
|
case BitcoinTransactionPriority.medium:
|
||||||
label = S.current.transaction_priority_medium;
|
label = S.current.transaction_priority_medium;
|
||||||
|
|
|
@ -308,7 +308,7 @@ class ElectrumClient {
|
||||||
try {
|
try {
|
||||||
final topDoubleString = await estimatefee(p: 1);
|
final topDoubleString = await estimatefee(p: 1);
|
||||||
final middleDoubleString = await estimatefee(p: 20);
|
final middleDoubleString = await estimatefee(p: 20);
|
||||||
final bottomDoubleString = await estimatefee(p: 150);
|
final bottomDoubleString = await estimatefee(p: 100);
|
||||||
final top =
|
final top =
|
||||||
(stringDoubleToBitcoinAmount(topDoubleString.toString()) / 1000)
|
(stringDoubleToBitcoinAmount(topDoubleString.toString()) / 1000)
|
||||||
.round();
|
.round();
|
||||||
|
@ -319,8 +319,7 @@ class ElectrumClient {
|
||||||
(stringDoubleToBitcoinAmount(bottomDoubleString.toString()) / 1000)
|
(stringDoubleToBitcoinAmount(bottomDoubleString.toString()) / 1000)
|
||||||
.round();
|
.round();
|
||||||
|
|
||||||
final res = [bottom, middle, top];
|
return [bottom, middle, top];
|
||||||
return res;
|
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,10 +102,8 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
accountList.update();
|
accountList.update();
|
||||||
accountList.accounts.observe((_) async => await save());
|
|
||||||
account = accountList.accounts.first;
|
account = accountList.accounts.first;
|
||||||
subaddressList.update(accountIndex: account.id ?? 0);
|
subaddressList.update(accountIndex: account.id ?? 0);
|
||||||
subaddressList.subaddresses.observe((_) async => await save());
|
|
||||||
subaddress = subaddressList.getAll().first;
|
subaddress = subaddressList.getAll().first;
|
||||||
balance = MoneroBalance(
|
balance = MoneroBalance(
|
||||||
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
|
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
|
||||||
|
|
|
@ -11,8 +11,7 @@ description: Cake Wallet.
|
||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 4.1.4+43
|
version: 4.1.6+45
|
||||||
publish_to: none
|
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.7.0 <3.0.0"
|
sdk: ">=2.7.0 <3.0.0"
|
||||||
|
|
Loading…
Reference in a new issue