mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-03 09:29:48 +00:00
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-519-tor
This commit is contained in:
commit
ecdb49adea
21 changed files with 215 additions and 83 deletions
Binary file not shown.
Before Width: | Height: | Size: 471 B |
69
assets/images/notification_icon.svg
Normal file
69
assets/images/notification_icon.svg
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
version="1.1"
|
||||||
|
id="Capa_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
width="510px"
|
||||||
|
height="510px"
|
||||||
|
viewBox="0 0 510 510"
|
||||||
|
style="enable-background:new 0 0 510 510;"
|
||||||
|
xml:space="preserve"
|
||||||
|
inkscape:version="0.92.3 (2405546, 2018-03-11)"
|
||||||
|
sodipodi:docname="notification_logo_tilt_white.svg"><metadata
|
||||||
|
id="metadata42"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs40" /><sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1090"
|
||||||
|
id="namedview38"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.4627451"
|
||||||
|
inkscape:cx="-849.27966"
|
||||||
|
inkscape:cy="255"
|
||||||
|
inkscape:window-x="-12"
|
||||||
|
inkscape:window-y="58"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="notifications"
|
||||||
|
inkscape:object-paths="true" /><g
|
||||||
|
id="g3"
|
||||||
|
transform="matrix(0.87658593,0,0,0.87658593,31.470588,31.470588)"><g
|
||||||
|
id="notifications"
|
||||||
|
transform="rotate(-20,255,255)"><path
|
||||||
|
d="m 233.56017,502.19654 c 28.05,0 51,-22.95 51,-51 h -102 c 0,28.05 22.95,51 51,51 z m 165.75,-153 v -140.25 c 0,-79.05 -53.55,-142.8 -127.5,-160.65 v -17.85 c 0,-20.4 -17.85,-38.2499996 -38.25,-38.2499996 -20.4,0 -38.25,17.8499996 -38.25,38.2499996 v 17.85 c -73.95,17.85 -127.499999,81.6 -127.499999,160.65 v 140.25 l -51,51 v 25.5 H 450.31017 v -25.5 z"
|
||||||
|
id="path6"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
style="opacity:1;fill:#ffffff;fill-opacity:0;stroke:#000000;stroke-width:19.39342117;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></g><g
|
||||||
|
id="g8" /><g
|
||||||
|
id="g10" /><g
|
||||||
|
id="g12" /><g
|
||||||
|
id="g14" /><g
|
||||||
|
id="g16" /><g
|
||||||
|
id="g18" /><g
|
||||||
|
id="g20" /><g
|
||||||
|
id="g22" /><g
|
||||||
|
id="g24" /><g
|
||||||
|
id="g26" /><g
|
||||||
|
id="g28" /><g
|
||||||
|
id="g30" /><g
|
||||||
|
id="g32" /><g
|
||||||
|
id="g34" /><g
|
||||||
|
id="g36" /></svg>
|
After Width: | Height: | Size: 2.7 KiB |
|
@ -1,2 +1,4 @@
|
||||||
New themes
|
Monero enhancements
|
||||||
|
In-App live status page for the app services
|
||||||
|
Add Exolix exchange provider
|
||||||
Bug fixes and enhancements
|
Bug fixes and enhancements
|
|
@ -1,6 +1,5 @@
|
||||||
Add Solana wallet
|
Monero enhancements
|
||||||
Support ALL Bitcoin address types (Legacy, Segwit (both variants), Taproot)
|
Bitcoin support different address types (Taproot, Segwit P2WPKH/P2WSH, Legacy)
|
||||||
Enhance Sending/Receiving flow for Bitcoin
|
In-App live status page for the app services
|
||||||
Improve fee calculations in Bitcoin
|
Add Exolix exchange provider
|
||||||
New themes
|
|
||||||
Bug fixes and enhancements
|
Bug fixes and enhancements
|
|
@ -1,7 +1,4 @@
|
||||||
import 'package:cw_core/transaction_priority.dart';
|
import 'package:cw_core/transaction_priority.dart';
|
||||||
import 'package:cw_core/wallet_type.dart';
|
|
||||||
//import 'package:cake_wallet/generated/i18n.dart';
|
|
||||||
import 'package:cw_core/enumerable_item.dart';
|
|
||||||
|
|
||||||
class MoneroTransactionPriority extends TransactionPriority {
|
class MoneroTransactionPriority extends TransactionPriority {
|
||||||
const MoneroTransactionPriority({required String title, required int raw})
|
const MoneroTransactionPriority({required String title, required int raw})
|
||||||
|
@ -12,21 +9,20 @@ class MoneroTransactionPriority extends TransactionPriority {
|
||||||
MoneroTransactionPriority.automatic,
|
MoneroTransactionPriority.automatic,
|
||||||
MoneroTransactionPriority.medium,
|
MoneroTransactionPriority.medium,
|
||||||
MoneroTransactionPriority.fast,
|
MoneroTransactionPriority.fast,
|
||||||
MoneroTransactionPriority.fastest
|
MoneroTransactionPriority.fastest,
|
||||||
];
|
];
|
||||||
static const slow = MoneroTransactionPriority(title: 'Slow', raw: 0);
|
static const automatic = MoneroTransactionPriority(title: 'Automatic', raw: 0);
|
||||||
static const automatic = MoneroTransactionPriority(title: 'Automatic', raw: 1);
|
static const slow = MoneroTransactionPriority(title: 'Slow', raw: 1);
|
||||||
static const medium = MoneroTransactionPriority(title: 'Medium', raw: 2);
|
static const medium = MoneroTransactionPriority(title: 'Medium', raw: 2);
|
||||||
static const fast = MoneroTransactionPriority(title: 'Fast', raw: 3);
|
static const fast = MoneroTransactionPriority(title: 'Fast', raw: 3);
|
||||||
static const fastest = MoneroTransactionPriority(title: 'Fastest', raw: 4);
|
static const fastest = MoneroTransactionPriority(title: 'Fastest', raw: 4);
|
||||||
static const standard = slow;
|
|
||||||
|
|
||||||
static MoneroTransactionPriority deserialize({required int raw}) {
|
static MoneroTransactionPriority deserialize({required int raw}) {
|
||||||
switch (raw) {
|
switch (raw) {
|
||||||
case 0:
|
case 0:
|
||||||
return slow;
|
|
||||||
case 1:
|
|
||||||
return automatic;
|
return automatic;
|
||||||
|
case 1:
|
||||||
|
return slow;
|
||||||
case 2:
|
case 2:
|
||||||
return medium;
|
return medium;
|
||||||
case 3:
|
case 3:
|
||||||
|
|
|
@ -282,9 +282,7 @@ abstract class MoneroWalletBase
|
||||||
pendingTransactionDescription = await transaction_history.createTransaction(
|
pendingTransactionDescription = await transaction_history.createTransaction(
|
||||||
address: address!,
|
address: address!,
|
||||||
amount: amount,
|
amount: amount,
|
||||||
priorityRaw: _credentials.priority == MoneroTransactionPriority.automatic
|
priorityRaw: _credentials.priority.serialize(),
|
||||||
? MoneroTransactionPriority.medium.serialize()
|
|
||||||
: _credentials.priority.serialize(),
|
|
||||||
accountIndex: walletAddresses.account!.id,
|
accountIndex: walletAddresses.account!.id,
|
||||||
preferredInputs: inputs);
|
preferredInputs: inputs);
|
||||||
}
|
}
|
||||||
|
@ -576,13 +574,7 @@ abstract class MoneroWalletBase
|
||||||
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,10 +202,20 @@ Future<void> defaultSettingsMigration(
|
||||||
await changeSolanaCurrentNodeToDefault(
|
await changeSolanaCurrentNodeToDefault(
|
||||||
sharedPreferences: sharedPreferences, nodes: nodes);
|
sharedPreferences: sharedPreferences, nodes: nodes);
|
||||||
break;
|
break;
|
||||||
case 27:
|
|
||||||
|
case 28:
|
||||||
|
await _updateMoneroPriority(sharedPreferences);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 29:
|
||||||
|
await changeDefaultBitcoinNode(nodes, sharedPreferences);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 30:
|
||||||
await migrateTorPreferences(sharedPreferences: sharedPreferences);
|
await migrateTorPreferences(sharedPreferences: sharedPreferences);
|
||||||
await addOnionNode(nodes);
|
await addOnionNode(nodes);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -219,6 +230,18 @@ Future<void> defaultSettingsMigration(
|
||||||
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
|
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _updateMoneroPriority(SharedPreferences sharedPreferences) async {
|
||||||
|
final currentPriority =
|
||||||
|
await sharedPreferences.getInt(PreferencesKey.moneroTransactionPriority) ??
|
||||||
|
monero!.getDefaultTransactionPriority().serialize();
|
||||||
|
|
||||||
|
// was set to automatic but automatic should be 0
|
||||||
|
if (currentPriority == 1) {
|
||||||
|
sharedPreferences.setInt(PreferencesKey.moneroTransactionPriority,
|
||||||
|
monero!.getDefaultTransactionPriority().serialize()); // 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> _validateWalletInfoBoxData(Box<WalletInfo> walletInfoSource) async {
|
Future<void> _validateWalletInfoBoxData(Box<WalletInfo> walletInfoSource) async {
|
||||||
try {
|
try {
|
||||||
final root = await getApplicationDocumentsDirectory();
|
final root = await getApplicationDocumentsDirectory();
|
||||||
|
@ -706,6 +729,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);
|
||||||
|
|
|
@ -149,25 +149,26 @@ Future<void> initializeAppConfigs() async {
|
||||||
final unspentCoinsInfoSource = await CakeHive.openBox<UnspentCoinsInfo>(UnspentCoinsInfo.boxName);
|
final unspentCoinsInfoSource = await CakeHive.openBox<UnspentCoinsInfo>(UnspentCoinsInfo.boxName);
|
||||||
|
|
||||||
await initialSetup(
|
await initialSetup(
|
||||||
sharedPreferences: await SharedPreferences.getInstance(),
|
sharedPreferences: await SharedPreferences.getInstance(),
|
||||||
nodes: nodes,
|
nodes: nodes,
|
||||||
powNodes: powNodes,
|
powNodes: powNodes,
|
||||||
walletInfoSource: walletInfoSource,
|
walletInfoSource: walletInfoSource,
|
||||||
contactSource: contacts,
|
contactSource: contacts,
|
||||||
tradesSource: trades,
|
tradesSource: trades,
|
||||||
ordersSource: orders,
|
ordersSource: orders,
|
||||||
unspentCoinsInfoSource: unspentCoinsInfoSource,
|
unspentCoinsInfoSource: unspentCoinsInfoSource,
|
||||||
// fiatConvertationService: fiatConvertationService,
|
// fiatConvertationService: fiatConvertationService,
|
||||||
templates: templates,
|
templates: templates,
|
||||||
exchangeTemplates: exchangeTemplates,
|
exchangeTemplates: exchangeTemplates,
|
||||||
transactionDescriptions: transactionDescriptions,
|
transactionDescriptions: transactionDescriptions,
|
||||||
secureStorage: secureStorage,
|
secureStorage: secureStorage,
|
||||||
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
anonpayInvoiceInfo: anonpayInvoiceInfo,
|
||||||
initialMigrationVersion: 27);
|
initialMigrationVersion: 30,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initialSetup(
|
Future<void> initialSetup(
|
||||||
{required SharedPreferences sharedPreferences,
|
{required SharedPreferences sharedPreferences,
|
||||||
required Box<Node> nodes,
|
required Box<Node> nodes,
|
||||||
required Box<Node> powNodes,
|
required Box<Node> powNodes,
|
||||||
required Box<WalletInfo> walletInfoSource,
|
required Box<WalletInfo> walletInfoSource,
|
||||||
|
|
|
@ -7,13 +7,15 @@ class SideMenuItem extends StatelessWidget {
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
this.imagePath,
|
this.imagePath,
|
||||||
this.icon,
|
this.icon,
|
||||||
|
this.widget,
|
||||||
this.isSelected = false,
|
this.isSelected = false,
|
||||||
}) : assert((icon != null && imagePath == null) || (icon == null && imagePath != null));
|
}) : assert(widget != null || icon != null || imagePath != null);
|
||||||
|
|
||||||
final void Function() onTap;
|
final void Function() onTap;
|
||||||
final String? imagePath;
|
final String? imagePath;
|
||||||
final IconData? icon;
|
final IconData? icon;
|
||||||
final bool isSelected;
|
final bool isSelected;
|
||||||
|
final Widget? widget;
|
||||||
|
|
||||||
Color _setColor(BuildContext context) {
|
Color _setColor(BuildContext context) {
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
|
@ -28,18 +30,7 @@ class SideMenuItem extends StatelessWidget {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(20),
|
padding: EdgeInsets.all(20),
|
||||||
child: icon != null
|
child: widget ?? _getIcon(context),
|
||||||
? Icon(
|
|
||||||
icon,
|
|
||||||
color: _setColor(context),
|
|
||||||
)
|
|
||||||
: Image.asset(
|
|
||||||
imagePath ?? '',
|
|
||||||
fit: BoxFit.cover,
|
|
||||||
height: 30,
|
|
||||||
width: 30,
|
|
||||||
color: _setColor(context),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
onTap: () => onTap.call(),
|
onTap: () => onTap.call(),
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
|
@ -48,4 +39,19 @@ class SideMenuItem extends StatelessWidget {
|
||||||
splashColor: Colors.transparent,
|
splashColor: Colors.transparent,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _getIcon(BuildContext context) {
|
||||||
|
return icon != null
|
||||||
|
? Icon(
|
||||||
|
icon,
|
||||||
|
color: _setColor(context),
|
||||||
|
)
|
||||||
|
: Image.asset(
|
||||||
|
imagePath ?? '',
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
height: 30,
|
||||||
|
width: 30,
|
||||||
|
color: _setColor(context),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sideba
|
||||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
||||||
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator.dart';
|
import 'package:cake_wallet/src/screens/dashboard/widgets/sync_indicator.dart';
|
||||||
import 'package:cake_wallet/src/screens/wallet_connect/widgets/modals/bottom_sheet_listener.dart';
|
import 'package:cake_wallet/src/screens/wallet_connect/widgets/modals/bottom_sheet_listener.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/services_updates_widget.dart';
|
||||||
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
||||||
import 'package:cake_wallet/view_model/dashboard/desktop_sidebar_view_model.dart';
|
import 'package:cake_wallet/view_model/dashboard/desktop_sidebar_view_model.dart';
|
||||||
import 'package:cake_wallet/view_model/settings/tor_view_model.dart';
|
import 'package:cake_wallet/view_model/settings/tor_view_model.dart';
|
||||||
|
@ -106,12 +107,18 @@ class DesktopSidebarWrapper extends BasePage {
|
||||||
? selectedIconPath
|
? selectedIconPath
|
||||||
: unselectedIconPath,
|
: unselectedIconPath,
|
||||||
),
|
),
|
||||||
|
SideMenuItem(
|
||||||
|
widget: ServicesUpdatesWidget(dashboardViewModel.getServicesStatus()),
|
||||||
|
isSelected: desktopSidebarViewModel.currentPage == SidebarItem.status,
|
||||||
|
onTap: () {},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
bottomItems: [
|
bottomItems: [
|
||||||
SideMenuItem(
|
SideMenuItem(
|
||||||
imagePath: 'assets/images/support_icon.png',
|
imagePath: 'assets/images/support_icon.png',
|
||||||
isSelected: desktopSidebarViewModel.currentPage == SidebarItem.support,
|
isSelected: desktopSidebarViewModel.currentPage == SidebarItem.support,
|
||||||
onTap: () => desktopSidebarViewModel.onPageChange(SidebarItem.support)),
|
onTap: () => desktopSidebarViewModel.onPageChange(SidebarItem.support),
|
||||||
|
),
|
||||||
SideMenuItem(
|
SideMenuItem(
|
||||||
imagePath: 'assets/images/settings_outline.png',
|
imagePath: 'assets/images/settings_outline.png',
|
||||||
isSelected: desktopSidebarViewModel.currentPage == SidebarItem.settings,
|
isSelected: desktopSidebarViewModel.currentPage == SidebarItem.settings,
|
||||||
|
|
|
@ -6,20 +6,28 @@ import 'package:cake_wallet/src/widgets/service_status_tile.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
|
import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
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
|
||||||
|
@ -29,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(
|
||||||
|
@ -96,15 +106,16 @@ class ServicesUpdatesWidget extends StatelessWidget {
|
||||||
: null,
|
: null,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Image.asset(
|
SvgPicture.asset(
|
||||||
"assets/images/notification_icon.png",
|
"assets/images/notification_icon.svg",
|
||||||
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
|
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
|
||||||
|
width: 30,
|
||||||
),
|
),
|
||||||
if (state.hasData && state.data!.hasUpdates)
|
if (state.hasData && state.data!.hasUpdates)
|
||||||
Container(
|
Container(
|
||||||
height: 7,
|
height: 7,
|
||||||
width: 7,
|
width: 7,
|
||||||
margin: EdgeInsetsDirectional.only(start: 8),
|
margin: EdgeInsetsDirectional.only(start: 15),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
|
|
|
@ -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 = true;
|
static const bool isInAppTorEnabled = true;
|
||||||
}
|
}
|
|
@ -537,7 +537,10 @@ abstract class DashboardViewModelBase with Store {
|
||||||
final hasUpdates = oldSha != currentSha;
|
final hasUpdates = oldSha != currentSha;
|
||||||
|
|
||||||
return ServicesResponse.fromJson(
|
return ServicesResponse.fromJson(
|
||||||
json.decode(res.body) as Map<String, dynamic>, hasUpdates, currentSha);
|
json.decode(res.body) as Map<String, dynamic>,
|
||||||
|
hasUpdates,
|
||||||
|
currentSha,
|
||||||
|
);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return ServicesResponse([], false, '');
|
return ServicesResponse([], false, '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ part 'desktop_sidebar_view_model.g.dart';
|
||||||
enum SidebarItem {
|
enum SidebarItem {
|
||||||
dashboard,
|
dashboard,
|
||||||
transactions,
|
transactions,
|
||||||
|
status,
|
||||||
support,
|
support,
|
||||||
settings,
|
settings,
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.0"
|
MONERO_COM_VERSION="1.12.0"
|
||||||
MONERO_COM_BUILD_NUMBER=77
|
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.0"
|
CAKEWALLET_VERSION="4.15.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=196
|
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"
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. ./config.sh
|
. ./config.sh
|
||||||
MONERO_BRANCH=release-v0.18.2.2-android_tx_priority_fix
|
MONERO_BRANCH=release-v0.18.3.2-android
|
||||||
MONERO_SRC_DIR=${WORKDIR}/monero
|
MONERO_SRC_DIR=${WORKDIR}/monero
|
||||||
|
|
||||||
git clone https://github.com/cake-tech/monero.git ${MONERO_SRC_DIR} --branch ${MONERO_BRANCH}
|
git clone https://github.com/cake-tech/monero.git ${MONERO_SRC_DIR} --branch ${MONERO_BRANCH}
|
||||||
cd $MONERO_SRC_DIR
|
cd $MONERO_SRC_DIR
|
||||||
git submodule init
|
git submodule update --init --force
|
||||||
git submodule update
|
|
||||||
|
|
||||||
for arch in "aarch" "aarch64" "i686" "x86_64"
|
for arch in "aarch" "aarch64" "i686" "x86_64"
|
||||||
do
|
do
|
||||||
|
@ -59,7 +58,7 @@ cd $MONERO_SRC_DIR
|
||||||
rm -rf ./build/release
|
rm -rf ./build/release
|
||||||
mkdir -p ./build/release
|
mkdir -p ./build/release
|
||||||
cd ./build/release
|
cd ./build/release
|
||||||
CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} $FLAGS ../..
|
CC=${CLANG} CXX=${CXXLANG} cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH=${ARCH} -D STATIC=ON -D BUILD_64=${BUILD_64} -D CMAKE_BUILD_TYPE=release -D ANDROID=true -D INSTALL_VENDORED_LIBUNBOUND=ON -D BUILD_TAG=${TAG} -D CMAKE_SYSTEM_NAME="Android" -D CMAKE_ANDROID_STANDALONE_TOOLCHAIN="${ANDROID_STANDALONE_TOOLCHAIN_PATH}" -D CMAKE_ANDROID_ARCH_ABI=${ARCH_ABI} -D MANUAL_SUBMODULES=1 $FLAGS ../..
|
||||||
|
|
||||||
make wallet_api -j$THREADS
|
make wallet_api -j$THREADS
|
||||||
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
||||||
|
|
|
@ -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.0"
|
MONERO_COM_VERSION="1.12.0"
|
||||||
MONERO_COM_BUILD_NUMBER=75
|
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.0"
|
CAKEWALLET_VERSION="4.15.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=215
|
CAKEWALLET_BUILD_NUMBER=217
|
||||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||||
|
|
||||||
HAVEN_NAME="Haven"
|
HAVEN_NAME="Haven"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
MONERO_URL="https://github.com/cake-tech/monero.git"
|
MONERO_URL="https://github.com/cake-tech/monero.git"
|
||||||
MONERO_DIR_PATH="${EXTERNAL_IOS_SOURCE_DIR}/monero"
|
MONERO_DIR_PATH="${EXTERNAL_IOS_SOURCE_DIR}/monero"
|
||||||
MONERO_VERSION=release-v0.18.2.2_tx_priority_fix
|
MONERO_VERSION=release-v0.18.3.2
|
||||||
BUILD_TYPE=release
|
BUILD_TYPE=release
|
||||||
PREFIX=${EXTERNAL_IOS_DIR}
|
PREFIX=${EXTERNAL_IOS_DIR}
|
||||||
DEST_LIB_DIR=${EXTERNAL_IOS_LIB_DIR}/monero
|
DEST_LIB_DIR=${EXTERNAL_IOS_LIB_DIR}/monero
|
||||||
|
@ -52,6 +52,7 @@ cmake -D IOS=ON \
|
||||||
-DUNBOUND_INCLUDE_DIR=${EXTERNAL_IOS_INCLUDE_DIR} \
|
-DUNBOUND_INCLUDE_DIR=${EXTERNAL_IOS_INCLUDE_DIR} \
|
||||||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
||||||
-DUSE_DEVICE_TREZOR=OFF \
|
-DUSE_DEVICE_TREZOR=OFF \
|
||||||
|
-DMANUAL_SUBMODULES=1 \
|
||||||
../..
|
../..
|
||||||
make wallet_api -j4
|
make wallet_api -j4
|
||||||
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
||||||
|
|
|
@ -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.0"
|
MONERO_COM_VERSION="1.2.0"
|
||||||
MONERO_COM_BUILD_NUMBER=7
|
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.0"
|
CAKEWALLET_VERSION="1.8.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=55
|
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
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
MONERO_URL="https://github.com/cake-tech/monero.git"
|
MONERO_URL="https://github.com/cake-tech/monero.git"
|
||||||
MONERO_DIR_PATH="${EXTERNAL_MACOS_SOURCE_DIR}/monero"
|
MONERO_DIR_PATH="${EXTERNAL_MACOS_SOURCE_DIR}/monero"
|
||||||
MONERO_VERSION=release-v0.18.2.2_tx_priority_fix
|
MONERO_VERSION=release-v0.18.3.2
|
||||||
BUILD_TYPE=release
|
BUILD_TYPE=release
|
||||||
PREFIX=${EXTERNAL_MACOS_DIR}
|
PREFIX=${EXTERNAL_MACOS_DIR}
|
||||||
DEST_LIB_DIR=${EXTERNAL_MACOS_LIB_DIR}/monero
|
DEST_LIB_DIR=${EXTERNAL_MACOS_LIB_DIR}/monero
|
||||||
|
@ -46,6 +46,7 @@ cmake -DARCH=${ARCH} \
|
||||||
-DUNBOUND_INCLUDE_DIR=${EXTERNAL_MACOS_INCLUDE_DIR} \
|
-DUNBOUND_INCLUDE_DIR=${EXTERNAL_MACOS_INCLUDE_DIR} \
|
||||||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
|
||||||
-DUSE_DEVICE_TREZOR=OFF \
|
-DUSE_DEVICE_TREZOR=OFF \
|
||||||
|
-DMANUAL_SUBMODULES=1 \
|
||||||
../..
|
../..
|
||||||
make wallet_api -j4
|
make wallet_api -j4
|
||||||
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
find . -path ./lib -prune -o -name '*.a' -exec cp '{}' lib \;
|
||||||
|
|
Loading…
Reference in a new issue