mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
Merge branch 'new_versions' of https://github.com/cake-tech/cake_wallet into cw_linux_direct_input_password
This commit is contained in:
commit
3b58aedd2d
11 changed files with 59 additions and 23 deletions
|
@ -1,2 +1,4 @@
|
||||||
|
Monero enhancements
|
||||||
In-App live status page for the app services
|
In-App live status page for the app services
|
||||||
|
Add Exolix exchange provider
|
||||||
Bug fixes and enhancements
|
Bug fixes and enhancements
|
|
@ -1,2 +1,5 @@
|
||||||
|
Monero enhancements
|
||||||
|
Bitcoin support different address types (Taproot, Segwit P2WPKH/P2WSH, Legacy)
|
||||||
In-App live status page for the app services
|
In-App live status page for the app services
|
||||||
|
Add Exolix exchange provider
|
||||||
Bug fixes and enhancements
|
Bug fixes and enhancements
|
|
@ -585,13 +585,7 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
|
||||||
int height = 0;
|
int height = 0;
|
||||||
try {
|
try {
|
||||||
height = _getHeightByDate(walletInfo.date);
|
height = _getHeightByDate(walletInfo.date);
|
||||||
} catch (e, s) {
|
} catch (_) {}
|
||||||
onError?.call(FlutterErrorDetails(
|
|
||||||
exception: e,
|
|
||||||
stack: s,
|
|
||||||
library: this.runtimeType.toString(),
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
monero_wallet.setRecoveringFromSeed(isRecovery: true);
|
monero_wallet.setRecoveringFromSeed(isRecovery: true);
|
||||||
monero_wallet.setRefreshFromBlockHeight(height: height);
|
monero_wallet.setRefreshFromBlockHeight(height: height);
|
||||||
|
|
|
@ -35,6 +35,7 @@ const cakeWalletBitcoinCashDefaultNodeUri = 'bitcoincash.stackwallet.com:50002';
|
||||||
const nanoDefaultNodeUri = 'rpc.nano.to';
|
const nanoDefaultNodeUri = 'rpc.nano.to';
|
||||||
const nanoDefaultPowNodeUri = 'rpc.nano.to';
|
const nanoDefaultPowNodeUri = 'rpc.nano.to';
|
||||||
const solanaDefaultNodeUri = 'rpc.ankr.com';
|
const solanaDefaultNodeUri = 'rpc.ankr.com';
|
||||||
|
const newCakeWalletBitcoinUri = 'btc-electrum.cakewallet.com:50002';
|
||||||
|
|
||||||
Future<void> defaultSettingsMigration(
|
Future<void> defaultSettingsMigration(
|
||||||
{required int version,
|
{required int version,
|
||||||
|
@ -201,9 +202,15 @@ Future<void> defaultSettingsMigration(
|
||||||
await changeSolanaCurrentNodeToDefault(
|
await changeSolanaCurrentNodeToDefault(
|
||||||
sharedPreferences: sharedPreferences, nodes: nodes);
|
sharedPreferences: sharedPreferences, nodes: nodes);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 28:
|
case 28:
|
||||||
await _updateMoneroPriority(sharedPreferences);
|
await _updateMoneroPriority(sharedPreferences);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 29:
|
||||||
|
await changeDefaultBitcoinNode(nodes, sharedPreferences);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -703,6 +710,26 @@ Future<void> changeDefaultMoneroNode(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> changeDefaultBitcoinNode(
|
||||||
|
Box<Node> nodeSource, SharedPreferences sharedPreferences) async {
|
||||||
|
const cakeWalletBitcoinNodeUriPattern = '.cakewallet.com';
|
||||||
|
final currentBitcoinNodeId =
|
||||||
|
sharedPreferences.getInt(PreferencesKey.currentBitcoinElectrumSererIdKey);
|
||||||
|
final currentBitcoinNode =
|
||||||
|
nodeSource.values.firstWhere((node) => node.key == currentBitcoinNodeId);
|
||||||
|
final needToReplaceCurrentBitcoinNode =
|
||||||
|
currentBitcoinNode.uri.toString().contains(cakeWalletBitcoinNodeUriPattern);
|
||||||
|
|
||||||
|
final newCakeWalletBitcoinNode = Node(uri: newCakeWalletBitcoinUri, type: WalletType.bitcoin);
|
||||||
|
|
||||||
|
await nodeSource.add(newCakeWalletBitcoinNode);
|
||||||
|
|
||||||
|
if (needToReplaceCurrentBitcoinNode) {
|
||||||
|
await sharedPreferences.setInt(
|
||||||
|
PreferencesKey.currentBitcoinElectrumSererIdKey, newCakeWalletBitcoinNode.key as int);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> checkCurrentNodes(
|
Future<void> checkCurrentNodes(
|
||||||
Box<Node> nodeSource, Box<Node> powNodeSource, SharedPreferences sharedPreferences) async {
|
Box<Node> nodeSource, Box<Node> powNodeSource, SharedPreferences sharedPreferences) async {
|
||||||
final currentMoneroNodeId = sharedPreferences.getInt(PreferencesKey.currentNodeIdKey);
|
final currentMoneroNodeId = sharedPreferences.getInt(PreferencesKey.currentNodeIdKey);
|
||||||
|
|
|
@ -66,6 +66,7 @@ class ExolixExchangeProvider extends ExchangeProvider {
|
||||||
final params = <String, String>{
|
final params = <String, String>{
|
||||||
'rateType': _getRateType(isFixedRateMode),
|
'rateType': _getRateType(isFixedRateMode),
|
||||||
'amount': '1',
|
'amount': '1',
|
||||||
|
'apiToken': apiKey,
|
||||||
};
|
};
|
||||||
if (isFixedRateMode) {
|
if (isFixedRateMode) {
|
||||||
params['coinFrom'] = _normalizeCurrency(to);
|
params['coinFrom'] = _normalizeCurrency(to);
|
||||||
|
|
|
@ -165,7 +165,7 @@ Future<void> initializeAppConfigs() async {
|
||||||
transactionDescriptions: transactionDescriptions,
|
transactionDescriptions: transactionDescriptions,
|
||||||
secureStorage: secureStorage,
|
secureStorage: secureStorage,
|
||||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||||
initialMigrationVersion: 28);
|
initialMigrationVersion: 29);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initialSetup(
|
Future<void> initialSetup(
|
||||||
|
|
|
@ -10,17 +10,24 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class ServicesUpdatesWidget extends StatelessWidget {
|
class ServicesUpdatesWidget extends StatefulWidget {
|
||||||
final Future<ServicesResponse> servicesResponse;
|
final Future<ServicesResponse> servicesResponse;
|
||||||
|
|
||||||
const ServicesUpdatesWidget(this.servicesResponse, {super.key});
|
const ServicesUpdatesWidget(this.servicesResponse, {super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ServicesUpdatesWidget> createState() => _ServicesUpdatesWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
|
||||||
|
bool wasOpened = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: FutureBuilder<ServicesResponse>(
|
child: FutureBuilder<ServicesResponse>(
|
||||||
future: servicesResponse,
|
future: widget.servicesResponse,
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: state.hasData
|
onTap: state.hasData
|
||||||
|
@ -30,6 +37,8 @@ class ServicesUpdatesWidget extends StatelessWidget {
|
||||||
.get<SharedPreferences>()
|
.get<SharedPreferences>()
|
||||||
.setString(PreferencesKey.serviceStatusShaKey, state.data!.currentSha);
|
.setString(PreferencesKey.serviceStatusShaKey, state.data!.currentSha);
|
||||||
|
|
||||||
|
setState(() => wasOpened = true);
|
||||||
|
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class FeatureFlag {
|
class FeatureFlag {
|
||||||
static const bool isCakePayEnabled = false;
|
static const bool isCakePayEnabled = false;
|
||||||
static const bool isExolixEnabled = false;
|
static const bool isExolixEnabled = true;
|
||||||
static const bool isInAppTorEnabled = false;
|
static const bool isInAppTorEnabled = false;
|
||||||
}
|
}
|
|
@ -15,15 +15,15 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
|
||||||
APP_ANDROID_TYPE=$1
|
APP_ANDROID_TYPE=$1
|
||||||
|
|
||||||
MONERO_COM_NAME="Monero.com"
|
MONERO_COM_NAME="Monero.com"
|
||||||
MONERO_COM_VERSION="1.11.1"
|
MONERO_COM_VERSION="1.12.0"
|
||||||
MONERO_COM_BUILD_NUMBER=78
|
MONERO_COM_BUILD_NUMBER=79
|
||||||
MONERO_COM_BUNDLE_ID="com.monero.app"
|
MONERO_COM_BUNDLE_ID="com.monero.app"
|
||||||
MONERO_COM_PACKAGE="com.monero.app"
|
MONERO_COM_PACKAGE="com.monero.app"
|
||||||
MONERO_COM_SCHEME="monero.com"
|
MONERO_COM_SCHEME="monero.com"
|
||||||
|
|
||||||
CAKEWALLET_NAME="Cake Wallet"
|
CAKEWALLET_NAME="Cake Wallet"
|
||||||
CAKEWALLET_VERSION="4.14.1"
|
CAKEWALLET_VERSION="4.15.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=197
|
CAKEWALLET_BUILD_NUMBER=198
|
||||||
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
|
CAKEWALLET_BUNDLE_ID="com.cakewallet.cake_wallet"
|
||||||
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
|
CAKEWALLET_PACKAGE="com.cakewallet.cake_wallet"
|
||||||
CAKEWALLET_SCHEME="cakewallet"
|
CAKEWALLET_SCHEME="cakewallet"
|
||||||
|
|
|
@ -13,13 +13,13 @@ TYPES=($MONERO_COM $CAKEWALLET $HAVEN)
|
||||||
APP_IOS_TYPE=$1
|
APP_IOS_TYPE=$1
|
||||||
|
|
||||||
MONERO_COM_NAME="Monero.com"
|
MONERO_COM_NAME="Monero.com"
|
||||||
MONERO_COM_VERSION="1.11.1"
|
MONERO_COM_VERSION="1.12.0"
|
||||||
MONERO_COM_BUILD_NUMBER=76
|
MONERO_COM_BUILD_NUMBER=77
|
||||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||||
|
|
||||||
CAKEWALLET_NAME="Cake Wallet"
|
CAKEWALLET_NAME="Cake Wallet"
|
||||||
CAKEWALLET_VERSION="4.14.1"
|
CAKEWALLET_VERSION="4.15.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=216
|
CAKEWALLET_BUILD_NUMBER=217
|
||||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||||
|
|
||||||
HAVEN_NAME="Haven"
|
HAVEN_NAME="Haven"
|
||||||
|
|
|
@ -16,13 +16,13 @@ if [ -n "$1" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
MONERO_COM_NAME="Monero.com"
|
MONERO_COM_NAME="Monero.com"
|
||||||
MONERO_COM_VERSION="1.1.1"
|
MONERO_COM_VERSION="1.2.0"
|
||||||
MONERO_COM_BUILD_NUMBER=9
|
MONERO_COM_BUILD_NUMBER=10
|
||||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||||
|
|
||||||
CAKEWALLET_NAME="Cake Wallet"
|
CAKEWALLET_NAME="Cake Wallet"
|
||||||
CAKEWALLET_VERSION="1.7.1"
|
CAKEWALLET_VERSION="1.8.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=56
|
CAKEWALLET_BUILD_NUMBER=57
|
||||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||||
|
|
||||||
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
|
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
|
||||||
|
|
Loading…
Reference in a new issue