Merge branch 'dashboard-desktop-view' of https://github.com/cake-tech/cake_wallet into CW-301-desktop-side-bar-ui
Conflicts: lib/src/screens/dashboard/dashboard_page.dart
2
.gitignore
vendored
|
@ -138,3 +138,5 @@ assets/images/app_logo.png
|
||||||
|
|
||||||
|
|
||||||
macos/Runner/Info.plist
|
macos/Runner/Info.plist
|
||||||
|
macos/Runner/DebugProfile.entitlements
|
||||||
|
macos/Runner/Release.entitlements
|
|
@ -1,20 +0,0 @@
|
||||||
//
|
|
||||||
// wakeLock.swift
|
|
||||||
// Runner
|
|
||||||
//
|
|
||||||
// Created by Godwin Asuquo on 1/21/22.
|
|
||||||
//
|
|
||||||
|
|
||||||
import Foundation
|
|
||||||
import UIKit
|
|
||||||
|
|
||||||
func enableWakeScreen() -> Bool{
|
|
||||||
UIApplication.shared.isIdleTimerDisabled = true
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
func disableWakeScreen() -> Bool{
|
|
||||||
UIApplication.shared.isIdleTimerDisabled = false
|
|
||||||
return true
|
|
||||||
}
|
|
|
@ -12,7 +12,6 @@
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||||
20ED0868E1BD7E12278C0CB3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B26E3F56D69167FBB1DC160A /* Pods_Runner.framework */; };
|
20ED0868E1BD7E12278C0CB3 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B26E3F56D69167FBB1DC160A /* Pods_Runner.framework */; };
|
||||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||||
5AFFEBFD279AD49C00F906A4 /* wakeLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AFFEBFC279AD49C00F906A4 /* wakeLock.swift */; };
|
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||||
|
@ -280,7 +279,6 @@
|
||||||
files = (
|
files = (
|
||||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||||
5AFFEBFD279AD49C00F906A4 /* wakeLock.swift in Sources */,
|
|
||||||
0C9D68C9264854B60011B691 /* secRandom.swift in Sources */,
|
0C9D68C9264854B60011B691 /* secRandom.swift in Sources */,
|
||||||
0C44A71A2518EF8000B570ED /* decrypt.swift in Sources */,
|
0C44A71A2518EF8000B570ED /* decrypt.swift in Sources */,
|
||||||
);
|
);
|
||||||
|
|
|
@ -96,11 +96,6 @@ import UnstoppableDomainsResolution
|
||||||
|
|
||||||
result(address)
|
result(address)
|
||||||
}
|
}
|
||||||
case "enableWakeScreen":
|
|
||||||
result(enableWakeScreen())
|
|
||||||
|
|
||||||
case "disableWakeScreen":
|
|
||||||
result(disableWakeScreen())
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
result(FlutterMethodNotImplemented)
|
result(FlutterMethodNotImplemented)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import 'package:cake_wallet/core/yat_service.dart';
|
import 'package:cake_wallet/core/yat_service.dart';
|
||||||
import 'package:cake_wallet/entities/parse_address_from_domain.dart';
|
import 'package:cake_wallet/entities/parse_address_from_domain.dart';
|
||||||
import 'package:cake_wallet/entities/wake_lock.dart';
|
|
||||||
import 'package:cake_wallet/ionia/ionia_anypay.dart';
|
import 'package:cake_wallet/ionia/ionia_anypay.dart';
|
||||||
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
||||||
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
import 'package:cake_wallet/ionia/ionia_tip.dart';
|
||||||
import 'package:cake_wallet/src/screens/buy/onramper_page.dart';
|
import 'package:cake_wallet/src/screens/buy/onramper_page.dart';
|
||||||
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
import 'package:cake_wallet/src/screens/settings/display_settings_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/other_settings_page.dart';
|
import 'package:cake_wallet/src/screens/settings/other_settings_page.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/privacy_page.dart';
|
import 'package:cake_wallet/src/screens/settings/privacy_page.dart';
|
||||||
|
@ -704,8 +704,6 @@ Future setup(
|
||||||
param1: item, param2: unspentCoinsListViewModel));
|
param1: item, param2: unspentCoinsListViewModel));
|
||||||
});
|
});
|
||||||
|
|
||||||
getIt.registerFactory(() => WakeLock());
|
|
||||||
|
|
||||||
getIt.registerFactory(() => YatService());
|
getIt.registerFactory(() => YatService());
|
||||||
|
|
||||||
getIt.registerFactory(() => AddressResolver(yatService: getIt.get<YatService>(),
|
getIt.registerFactory(() => AddressResolver(yatService: getIt.get<YatService>(),
|
||||||
|
@ -819,6 +817,8 @@ Future setup(
|
||||||
|
|
||||||
getIt.registerFactory(() => IoniaAccountCardsPage(getIt.get<IoniaAccountViewModel>()));
|
getIt.registerFactory(() => IoniaAccountCardsPage(getIt.get<IoniaAccountViewModel>()));
|
||||||
|
|
||||||
|
getIt.registerFactory(() => DesktopWalletSelectionDropDown(getIt.get<WalletListViewModel>()));
|
||||||
|
|
||||||
getIt.registerFactoryParam<IoniaPaymentStatusViewModel, IoniaAnyPayPaymentInfo, AnyPayPaymentCommittedInfo>(
|
getIt.registerFactoryParam<IoniaPaymentStatusViewModel, IoniaAnyPayPaymentInfo, AnyPayPaymentCommittedInfo>(
|
||||||
(IoniaAnyPayPaymentInfo paymentInfo, AnyPayPaymentCommittedInfo committedInfo)
|
(IoniaAnyPayPaymentInfo paymentInfo, AnyPayPaymentCommittedInfo committedInfo)
|
||||||
=> IoniaPaymentStatusViewModel(
|
=> IoniaPaymentStatusViewModel(
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
||||||
const channel = MethodChannel('com.cake_wallet/native_utils');
|
const channel = MethodChannel('com.cake_wallet/native_utils');
|
||||||
|
@ -6,6 +8,7 @@ Future<String> fetchUnstoppableDomainAddress(String domain, String ticker) async
|
||||||
var address = '';
|
var address = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (Platform.isAndroid || Platform.isIOS) {
|
||||||
address = await channel.invokeMethod<String>(
|
address = await channel.invokeMethod<String>(
|
||||||
'getUnstoppableDomainAddress',
|
'getUnstoppableDomainAddress',
|
||||||
<String, String> {
|
<String, String> {
|
||||||
|
@ -13,6 +16,10 @@ Future<String> fetchUnstoppableDomainAddress(String domain, String ticker) async
|
||||||
'ticker' : ticker
|
'ticker' : ticker
|
||||||
}
|
}
|
||||||
) ?? '';
|
) ?? '';
|
||||||
|
} else {
|
||||||
|
// TODO: Integrate with Unstoppable domains resolution API
|
||||||
|
return address;
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('Unstoppable domain error: ${e.toString()}');
|
print('Unstoppable domain error: ${e.toString()}');
|
||||||
address = '';
|
address = '';
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
class WakeLock {
|
|
||||||
static const _utils = const MethodChannel('com.cake_wallet/native_utils');
|
|
||||||
|
|
||||||
Future<void> enableWake() async {
|
|
||||||
try {
|
|
||||||
await _utils.invokeMethod<bool>('enableWakeScreen');
|
|
||||||
} on PlatformException catch (_) {
|
|
||||||
print('Failed enabling screen wakelock');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> disableWake() async {
|
|
||||||
try {
|
|
||||||
await _utils.invokeMethod<bool>('disableWakeScreen');
|
|
||||||
} on PlatformException catch (_) {
|
|
||||||
print('Failed enabling screen wakelock');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,4 @@
|
||||||
import 'package:cake_wallet/di.dart';
|
|
||||||
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
import 'package:cake_wallet/entities/update_haven_rate.dart';
|
||||||
import 'package:cake_wallet/entities/wake_lock.dart';
|
|
||||||
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
import 'package:cake_wallet/store/dashboard/fiat_conversion_store.dart';
|
||||||
import 'package:cw_core/wallet_type.dart';
|
import 'package:cw_core/wallet_type.dart';
|
||||||
import 'package:mobx/mobx.dart';
|
import 'package:mobx/mobx.dart';
|
||||||
|
@ -9,7 +7,7 @@ import 'package:cw_core/wallet_base.dart';
|
||||||
import 'package:cw_core/balance.dart';
|
import 'package:cw_core/balance.dart';
|
||||||
import 'package:cw_core/transaction_info.dart';
|
import 'package:cw_core/transaction_info.dart';
|
||||||
import 'package:cw_core/sync_status.dart';
|
import 'package:cw_core/sync_status.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:wakelock/wakelock.dart';
|
||||||
|
|
||||||
ReactionDisposer? _onWalletSyncStatusChangeReaction;
|
ReactionDisposer? _onWalletSyncStatusChangeReaction;
|
||||||
|
|
||||||
|
@ -17,7 +15,6 @@ void startWalletSyncStatusChangeReaction(
|
||||||
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>,
|
WalletBase<Balance, TransactionHistoryBase<TransactionInfo>,
|
||||||
TransactionInfo> wallet,
|
TransactionInfo> wallet,
|
||||||
FiatConversionStore fiatConversionStore) {
|
FiatConversionStore fiatConversionStore) {
|
||||||
final _wakeLock = getIt.get<WakeLock>();
|
|
||||||
_onWalletSyncStatusChangeReaction?.reaction.dispose();
|
_onWalletSyncStatusChangeReaction?.reaction.dispose();
|
||||||
_onWalletSyncStatusChangeReaction =
|
_onWalletSyncStatusChangeReaction =
|
||||||
reaction((_) => wallet.syncStatus, (SyncStatus status) async {
|
reaction((_) => wallet.syncStatus, (SyncStatus status) async {
|
||||||
|
@ -30,10 +27,10 @@ void startWalletSyncStatusChangeReaction(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (status is SyncingSyncStatus) {
|
if (status is SyncingSyncStatus) {
|
||||||
await _wakeLock.enableWake();
|
await Wakelock.enable();
|
||||||
}
|
}
|
||||||
if (status is SyncedSyncStatus || status is FailedSyncStatus) {
|
if (status is SyncedSyncStatus || status is FailedSyncStatus) {
|
||||||
await _wakeLock.disableWake();
|
await Wakelock.disable();
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
print(e.toString());
|
print(e.toString());
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
import 'package:cake_wallet/di.dart';
|
||||||
import 'package:cake_wallet/entities/main_actions.dart';
|
import 'package:cake_wallet/entities/main_actions.dart';
|
||||||
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_wallet_selection_dropdown.dart';
|
||||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart';
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_dashboard_view.dart';
|
||||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu.dart';
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu.dart';
|
||||||
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_controller.dart';
|
import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_controller.dart';
|
||||||
|
@ -11,6 +13,7 @@ import 'package:cake_wallet/src/screens/yat_emoji_id.dart';
|
||||||
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
import 'package:cake_wallet/utils/responsive_layout_util.dart';
|
||||||
|
import 'package:cake_wallet/utils/constants.dart';
|
||||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
import 'package:cake_wallet/view_model/dashboard/dashboard_view_model.dart';
|
||||||
|
@ -171,6 +174,15 @@ class _DashboardPage extends BasePage {
|
||||||
@override
|
@override
|
||||||
Widget get endDrawer => MenuWidget(walletViewModel);
|
Widget get endDrawer => MenuWidget(walletViewModel);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget? leading(BuildContext context) {
|
||||||
|
if (MediaQuery.of(context).size.width > ConstValues.minimumDesktopWidth) {
|
||||||
|
return getIt<DesktopWalletSelectionDropDown>();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget middle(BuildContext context) {
|
Widget middle(BuildContext context) {
|
||||||
return SyncIndicator(
|
return SyncIndicator(
|
||||||
|
|
|
@ -0,0 +1,163 @@
|
||||||
|
import 'package:another_flushbar/flushbar.dart';
|
||||||
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:cake_wallet/routes.dart';
|
||||||
|
import 'package:cake_wallet/src/screens/auth/auth_page.dart';
|
||||||
|
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||||
|
import 'package:cake_wallet/utils/show_bar.dart';
|
||||||
|
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||||
|
import 'package:cake_wallet/view_model/wallet_list/wallet_list_item.dart';
|
||||||
|
import 'package:cake_wallet/view_model/wallet_list/wallet_list_view_model.dart';
|
||||||
|
import 'package:cw_core/wallet_type.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class DesktopWalletSelectionDropDown extends StatefulWidget {
|
||||||
|
final WalletListViewModel walletListViewModel;
|
||||||
|
|
||||||
|
DesktopWalletSelectionDropDown(this.walletListViewModel, {Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DesktopWalletSelectionDropDown> createState() => _DesktopWalletSelectionDropDownState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionDropDown> {
|
||||||
|
final moneroIcon = Image.asset('assets/images/monero_logo.png', height: 24, width: 24);
|
||||||
|
final bitcoinIcon = Image.asset('assets/images/bitcoin.png', height: 24, width: 24);
|
||||||
|
final litecoinIcon = Image.asset('assets/images/litecoin_icon.png', height: 24, width: 24);
|
||||||
|
final havenIcon = Image.asset('assets/images/haven_logo.png', height: 24, width: 24);
|
||||||
|
final nonWalletTypeIcon = Image.asset('assets/images/close.png', height: 24, width: 24);
|
||||||
|
|
||||||
|
final double tileHeight = 60;
|
||||||
|
|
||||||
|
Flushbar<void>? _progressBar;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
final themeData = Theme.of(context);
|
||||||
|
return DropdownButton<WalletListItem>(
|
||||||
|
items: widget.walletListViewModel.wallets
|
||||||
|
.map((wallet) => DropdownMenuItem(
|
||||||
|
child: ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(maxWidth: 500),
|
||||||
|
child: walletListItemTile(wallet),
|
||||||
|
),
|
||||||
|
value: wallet,
|
||||||
|
))
|
||||||
|
.toList(),
|
||||||
|
onChanged: (selectedWallet) async {
|
||||||
|
if (selectedWallet!.isCurrent || !selectedWallet.isEnabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final confirmed = await showPopUp<bool>(
|
||||||
|
context: context,
|
||||||
|
builder: (dialogContext) {
|
||||||
|
return AlertWithTwoActions(
|
||||||
|
alertTitle: S.of(context).change_wallet_alert_title,
|
||||||
|
alertContent: S.of(context).change_wallet_alert_content(selectedWallet.name),
|
||||||
|
leftButtonText: S.of(context).cancel,
|
||||||
|
rightButtonText: S.of(context).change,
|
||||||
|
actionLeftButton: () => Navigator.of(context).pop(false),
|
||||||
|
actionRightButton: () => Navigator.of(context).pop(true));
|
||||||
|
}) ??
|
||||||
|
false;
|
||||||
|
|
||||||
|
if (confirmed) {
|
||||||
|
await _loadWallet(selectedWallet);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dropdownColor: themeData.textTheme.bodyText1?.decorationColor,
|
||||||
|
style: TextStyle(color: themeData.primaryTextTheme.headline6?.color),
|
||||||
|
selectedItemBuilder: (context) => widget.walletListViewModel.wallets
|
||||||
|
.map((wallet) => ConstrainedBox(
|
||||||
|
constraints: BoxConstraints(maxWidth: 500),
|
||||||
|
child: walletListItemTile(wallet),
|
||||||
|
))
|
||||||
|
.toList(),
|
||||||
|
value: widget.walletListViewModel.wallets.firstWhere((element) => element.isCurrent),
|
||||||
|
underline: const SizedBox(),
|
||||||
|
focusColor: Colors.transparent,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget walletListItemTile(WalletListItem wallet) {
|
||||||
|
return Container(
|
||||||
|
height: tileHeight,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 20),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: <Widget>[
|
||||||
|
wallet.isEnabled ? _imageFor(type: wallet.type) : nonWalletTypeIcon,
|
||||||
|
SizedBox(width: 10),
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
|
wallet.name,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 22,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
color: Theme.of(context).primaryTextTheme.headline6!.color!,
|
||||||
|
),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
maxLines: 1,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Image _imageFor({required WalletType type}) {
|
||||||
|
switch (type) {
|
||||||
|
case WalletType.bitcoin:
|
||||||
|
return bitcoinIcon;
|
||||||
|
case WalletType.monero:
|
||||||
|
return moneroIcon;
|
||||||
|
case WalletType.litecoin:
|
||||||
|
return litecoinIcon;
|
||||||
|
case WalletType.haven:
|
||||||
|
return havenIcon;
|
||||||
|
default:
|
||||||
|
return nonWalletTypeIcon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _loadWallet(WalletListItem wallet) async {
|
||||||
|
if (await widget.walletListViewModel.checkIfAuthRequired()) {
|
||||||
|
await Navigator.of(context).pushNamed(Routes.auth,
|
||||||
|
arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) async {
|
||||||
|
if (!isAuthenticatedSuccessfully) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
auth.changeProcessText(S.of(context).wallet_list_loading_wallet(wallet.name));
|
||||||
|
await widget.walletListViewModel.loadWallet(wallet);
|
||||||
|
auth.hideProgressText();
|
||||||
|
auth.close();
|
||||||
|
setState(() {});
|
||||||
|
} catch (e) {
|
||||||
|
auth.changeProcessText(
|
||||||
|
S.of(context).wallet_list_failed_to_load(wallet.name, e.toString()));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
changeProcessText(S.of(context).wallet_list_loading_wallet(wallet.name));
|
||||||
|
await widget.walletListViewModel.loadWallet(wallet);
|
||||||
|
hideProgressText();
|
||||||
|
setState(() {});
|
||||||
|
} catch (e) {
|
||||||
|
changeProcessText(S.of(context).wallet_list_failed_to_load(wallet.name, e.toString()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void changeProcessText(String text) {
|
||||||
|
_progressBar = createBar<void>(text, duration: null)..show(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
void hideProgressText() {
|
||||||
|
_progressBar?.dismiss();
|
||||||
|
_progressBar = null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,8 +1,9 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:cake_wallet/routes.dart';
|
import 'package:cake_wallet/routes.dart';
|
||||||
import 'package:cake_wallet/utils/show_bar.dart';
|
import 'package:cake_wallet/utils/show_bar.dart';
|
||||||
import 'package:device_display_brightness/device_display_brightness.dart';
|
import 'package:device_display_brightness/device_display_brightness.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
@ -59,12 +60,8 @@ class QRWidget extends StatelessWidget {
|
||||||
builder: (_) => Flexible(
|
builder: (_) => Flexible(
|
||||||
flex: 5,
|
flex: 5,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () {
|
||||||
// Get the current brightness:
|
changeBrightnessForRoute(() async {
|
||||||
final double brightness = await DeviceDisplayBrightness.getBrightness();
|
|
||||||
|
|
||||||
// ignore: unawaited_futures
|
|
||||||
DeviceDisplayBrightness.setBrightness(1.0);
|
|
||||||
await Navigator.pushNamed(
|
await Navigator.pushNamed(
|
||||||
context,
|
context,
|
||||||
Routes.fullscreenQR,
|
Routes.fullscreenQR,
|
||||||
|
@ -73,8 +70,7 @@ class QRWidget extends StatelessWidget {
|
||||||
'isLight': isLight,
|
'isLight': isLight,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// ignore: unawaited_futures
|
});
|
||||||
DeviceDisplayBrightness.setBrightness(brightness);
|
|
||||||
},
|
},
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: Key(addressListViewModel.uri.toString()),
|
tag: Key(addressListViewModel.uri.toString()),
|
||||||
|
@ -173,4 +169,25 @@ class QRWidget extends StatelessWidget {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> changeBrightnessForRoute(Future<void> Function() navigation) async {
|
||||||
|
final isMobile = Platform.isIOS || Platform.isAndroid;
|
||||||
|
|
||||||
|
// if not mobile, just navigate
|
||||||
|
if (!isMobile) {
|
||||||
|
navigation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the current brightness:
|
||||||
|
final brightness = await DeviceDisplayBrightness.getBrightness();
|
||||||
|
|
||||||
|
// ignore: unawaited_futures
|
||||||
|
DeviceDisplayBrightness.setBrightness(1.0);
|
||||||
|
|
||||||
|
await navigation();
|
||||||
|
|
||||||
|
// ignore: unawaited_futures
|
||||||
|
DeviceDisplayBrightness.setBrightness(brightness);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import 'package:cake_wallet/utils/constants.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
||||||
factory NavBar(
|
factory NavBar(
|
||||||
|
@ -63,10 +63,24 @@ class NavBar extends StatelessWidget implements ObstructingPreferredSizeWidget {
|
||||||
final paddingTop = pad / 2;
|
final paddingTop = pad / 2;
|
||||||
final _paddingBottom = (pad / 2);
|
final _paddingBottom = (pad / 2);
|
||||||
|
|
||||||
|
if (MediaQuery.of(context).size.width > ConstValues.minimumDesktopWidth) {
|
||||||
|
return PreferredSize(
|
||||||
|
preferredSize: Size.fromHeight(height),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
if (leading != null) Flexible(child: leading!),
|
||||||
|
if (middle != null) middle!,
|
||||||
|
if (trailing != null) trailing!,
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
decoration: decoration ?? BoxDecoration(color: backgroundColor),
|
decoration: decoration ?? BoxDecoration(color: backgroundColor),
|
||||||
padding:
|
padding: EdgeInsetsDirectional.only(bottom: _paddingBottom, top: paddingTop),
|
||||||
EdgeInsetsDirectional.only(bottom: _paddingBottom, top: paddingTop),
|
|
||||||
child: CupertinoNavigationBar(
|
child: CupertinoNavigationBar(
|
||||||
leading: leading,
|
leading: leading,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
|
|
3
lib/utils/constants.dart
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
class ConstValues {
|
||||||
|
static const int minimumDesktopWidth = 900;
|
||||||
|
}
|
16
macos/CakeWallet/decrypt.swift
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import Foundation
|
||||||
|
import CryptoSwift
|
||||||
|
|
||||||
|
func decrypt(data: Data, key: String, salt: String) -> String? {
|
||||||
|
let keyBytes = key.data(using: .utf8)?.bytes ?? []
|
||||||
|
let saltBytes = salt.data(using: .utf8)?.bytes ?? []
|
||||||
|
|
||||||
|
guard let PBKDF2key = try? PKCS5.PBKDF2(password: keyBytes, salt: saltBytes, iterations: 4096, variant: .sha256).calculate(),
|
||||||
|
let cipher = try? Blowfish(key: PBKDF2key, padding: .pkcs7),
|
||||||
|
let decryptedBytes = try? cipher.decrypt(data.bytes) else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
let decryptedData = Data(decryptedBytes)
|
||||||
|
return String(data: decryptedData, encoding: .utf8)
|
||||||
|
}
|
12
macos/CakeWallet/secRandom.swift
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
func secRandom(count: Int) -> Data? {
|
||||||
|
var bytes = [Int8](repeating: 0, count: count)
|
||||||
|
let status = SecRandomCopyBytes(kSecRandomDefault, bytes.count, &bytes)
|
||||||
|
|
||||||
|
if status == errSecSuccess {
|
||||||
|
return Data(bytes: bytes, count: bytes.count)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
|
@ -10,18 +10,19 @@ import cw_monero
|
||||||
import devicelocale
|
import devicelocale
|
||||||
import flutter_secure_storage_macos
|
import flutter_secure_storage_macos
|
||||||
import package_info
|
import package_info
|
||||||
import path_provider_macos
|
import path_provider_foundation
|
||||||
import platform_device_id
|
import platform_device_id
|
||||||
import platform_device_id_macos
|
import platform_device_id_macos
|
||||||
import share_plus_macos
|
import share_plus_macos
|
||||||
import shared_preferences_foundation
|
import shared_preferences_foundation
|
||||||
import url_launcher_macos
|
import url_launcher_macos
|
||||||
|
import wakelock_macos
|
||||||
|
|
||||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
|
||||||
CwMoneroPlugin.register(with: registry.registrar(forPlugin: "CwMoneroPlugin"))
|
CwMoneroPlugin.register(with: registry.registrar(forPlugin: "CwMoneroPlugin"))
|
||||||
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
|
DevicelocalePlugin.register(with: registry.registrar(forPlugin: "DevicelocalePlugin"))
|
||||||
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
|
FlutterSecureStorageMacosPlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStorageMacosPlugin"))
|
||||||
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
FLTPackageInfoPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlugin"))
|
||||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||||
PlatformDeviceIdMacosPlugin.register(with: registry.registrar(forPlugin: "PlatformDeviceIdMacosPlugin"))
|
PlatformDeviceIdMacosPlugin.register(with: registry.registrar(forPlugin: "PlatformDeviceIdMacosPlugin"))
|
||||||
|
@ -29,4 +30,5 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||||
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
|
||||||
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
|
||||||
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
|
||||||
|
WakelockMacosPlugin.register(with: registry.registrar(forPlugin: "WakelockMacosPlugin"))
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,9 @@ target 'Runner' do
|
||||||
use_modular_headers!
|
use_modular_headers!
|
||||||
|
|
||||||
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
||||||
|
|
||||||
|
# Cake Wallet (Legacy)
|
||||||
|
pod 'CryptoSwift'
|
||||||
end
|
end
|
||||||
|
|
||||||
post_install do |installer|
|
post_install do |installer|
|
||||||
|
|
|
@ -2,6 +2,7 @@ PODS:
|
||||||
- connectivity_macos (0.0.1):
|
- connectivity_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- Reachability
|
- Reachability
|
||||||
|
- CryptoSwift (1.3.1)
|
||||||
- cw_monero (0.0.1):
|
- cw_monero (0.0.1):
|
||||||
- cw_monero/Boost (= 0.0.1)
|
- cw_monero/Boost (= 0.0.1)
|
||||||
- cw_monero/Monero (= 0.0.1)
|
- cw_monero/Monero (= 0.0.1)
|
||||||
|
@ -21,12 +22,13 @@ PODS:
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- devicelocale (0.0.1):
|
- devicelocale (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- flutter_secure_storage_macos (6.1.1):
|
- flutter_secure_storage_macos (3.3.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- FlutterMacOS (1.0.0)
|
- FlutterMacOS (1.0.0)
|
||||||
- package_info (0.0.1):
|
- package_info (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- path_provider_macos (0.0.1):
|
- path_provider_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- platform_device_id (0.0.1):
|
- platform_device_id (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
@ -40,23 +42,28 @@ PODS:
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
- url_launcher_macos (0.0.1):
|
- url_launcher_macos (0.0.1):
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
- wakelock_macos (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
- connectivity_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos`)
|
- connectivity_macos (from `Flutter/ephemeral/.symlinks/plugins/connectivity_macos/macos`)
|
||||||
|
- CryptoSwift
|
||||||
- cw_monero (from `Flutter/ephemeral/.symlinks/plugins/cw_monero/macos`)
|
- cw_monero (from `Flutter/ephemeral/.symlinks/plugins/cw_monero/macos`)
|
||||||
- devicelocale (from `Flutter/ephemeral/.symlinks/plugins/devicelocale/macos`)
|
- devicelocale (from `Flutter/ephemeral/.symlinks/plugins/devicelocale/macos`)
|
||||||
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
- flutter_secure_storage_macos (from `Flutter/ephemeral/.symlinks/plugins/flutter_secure_storage_macos/macos`)
|
||||||
- FlutterMacOS (from `Flutter/ephemeral`)
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
- package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`)
|
- package_info (from `Flutter/ephemeral/.symlinks/plugins/package_info/macos`)
|
||||||
- path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`)
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos`)
|
||||||
- platform_device_id (from `Flutter/ephemeral/.symlinks/plugins/platform_device_id/macos`)
|
- platform_device_id (from `Flutter/ephemeral/.symlinks/plugins/platform_device_id/macos`)
|
||||||
- platform_device_id_macos (from `Flutter/ephemeral/.symlinks/plugins/platform_device_id_macos/macos`)
|
- platform_device_id_macos (from `Flutter/ephemeral/.symlinks/plugins/platform_device_id_macos/macos`)
|
||||||
- share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`)
|
- share_plus_macos (from `Flutter/ephemeral/.symlinks/plugins/share_plus_macos/macos`)
|
||||||
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos`)
|
||||||
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
|
- wakelock_macos (from `Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos`)
|
||||||
|
|
||||||
SPEC REPOS:
|
SPEC REPOS:
|
||||||
trunk:
|
trunk:
|
||||||
|
- CryptoSwift
|
||||||
- Reachability
|
- Reachability
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
@ -72,8 +79,8 @@ EXTERNAL SOURCES:
|
||||||
:path: Flutter/ephemeral
|
:path: Flutter/ephemeral
|
||||||
package_info:
|
package_info:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/package_info/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/package_info/macos
|
||||||
path_provider_macos:
|
path_provider_foundation:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/macos
|
||||||
platform_device_id:
|
platform_device_id:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/platform_device_id/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/platform_device_id/macos
|
||||||
platform_device_id_macos:
|
platform_device_id_macos:
|
||||||
|
@ -84,22 +91,26 @@ EXTERNAL SOURCES:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/macos
|
||||||
url_launcher_macos:
|
url_launcher_macos:
|
||||||
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
wakelock_macos:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/wakelock_macos/macos
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
connectivity_macos: 5dae6ee11d320fac7c05f0d08bd08fc32b5514d9
|
connectivity_macos: 5dae6ee11d320fac7c05f0d08bd08fc32b5514d9
|
||||||
|
CryptoSwift: f12f037f6d0fcd6d48c96db0071b653de64e6c4d
|
||||||
cw_monero: f8b7f104508efba2591548e76b5c058d05cba3f0
|
cw_monero: f8b7f104508efba2591548e76b5c058d05cba3f0
|
||||||
devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225
|
devicelocale: 9f0f36ac651cabae2c33f32dcff4f32b61c38225
|
||||||
flutter_secure_storage_macos: 75c8cadfdba05ca007c0fa4ea0c16e5cf85e521b
|
flutter_secure_storage_macos: 6ceee8fbc7f484553ad17f79361b556259df89aa
|
||||||
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
|
FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
|
||||||
package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2
|
package_info: 6eba2fd8d3371dda2d85c8db6fe97488f24b74b2
|
||||||
path_provider_macos: 05fb0ef0cedf3e5bd179b9e41a638682b37133ea
|
path_provider_foundation: 37748e03f12783f9de2cb2c4eadfaa25fe6d4852
|
||||||
platform_device_id: 3e414428f45df149bbbfb623e2c0ca27c545b763
|
platform_device_id: 3e414428f45df149bbbfb623e2c0ca27c545b763
|
||||||
platform_device_id_macos: f763bb55f088be804d61b96eb4710b8ab6598e94
|
platform_device_id_macos: f763bb55f088be804d61b96eb4710b8ab6598e94
|
||||||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
||||||
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
share_plus_macos: 853ee48e7dce06b633998ca0735d482dd671ade4
|
||||||
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
|
shared_preferences_foundation: 297b3ebca31b34ec92be11acd7fb0ba932c822ca
|
||||||
url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3
|
url_launcher_macos: c04e4fa86382d4f94f6b38f14625708be3ae52e2
|
||||||
|
wakelock_macos: bc3f2a9bd8d2e6c89fee1e1822e7ddac3bd004a9
|
||||||
|
|
||||||
PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
|
PODFILE CHECKSUM: 63bac006751af51321f57697a4b72bbfa0947124
|
||||||
|
|
||||||
COCOAPODS: 1.11.3
|
COCOAPODS: 1.11.3
|
||||||
|
|
|
@ -24,9 +24,11 @@
|
||||||
328F945957E1041662291EC5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C84AA35EA80D710889C68D81 /* Pods_Runner.framework */; };
|
328F945957E1041662291EC5 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C84AA35EA80D710889C68D81 /* Pods_Runner.framework */; };
|
||||||
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
||||||
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
|
||||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||||
|
9F31AE4A2988022C00765327 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||||
|
9F3F7550298098120030A1D7 /* secRandom.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3F754D298098120030A1D7 /* secRandom.swift */; };
|
||||||
|
9F3F7551298098120030A1D7 /* decrypt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F3F754E298098120030A1D7 /* decrypt.swift */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
@ -57,7 +59,7 @@
|
||||||
135D3AD0276D31F62BBEDDBF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
135D3AD0276D31F62BBEDDBF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
33CC10ED2044A3C60003C045 /* cake_wallet_new.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = cake_wallet_new.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
33CC10ED2044A3C60003C045 /* Cake Wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Cake Wallet.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
|
@ -72,6 +74,8 @@
|
||||||
359F2F22842E234537DED5E3 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
359F2F22842E234537DED5E3 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9F3F754D298098120030A1D7 /* secRandom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = secRandom.swift; path = CakeWallet/secRandom.swift; sourceTree = "<group>"; };
|
||||||
|
9F3F754E298098120030A1D7 /* decrypt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = decrypt.swift; path = CakeWallet/decrypt.swift; sourceTree = "<group>"; };
|
||||||
C84AA35EA80D710889C68D81 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
C84AA35EA80D710889C68D81 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
FF499CFF131B036E3C5638D0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
FF499CFF131B036E3C5638D0 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
@ -102,6 +106,8 @@
|
||||||
33CC10E42044A3C60003C045 = {
|
33CC10E42044A3C60003C045 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
9F3F754E298098120030A1D7 /* decrypt.swift */,
|
||||||
|
9F3F754D298098120030A1D7 /* secRandom.swift */,
|
||||||
33FAB671232836740065AC1E /* Runner */,
|
33FAB671232836740065AC1E /* Runner */,
|
||||||
33CEB47122A05771004F2AC0 /* Flutter */,
|
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||||
33CC10EE2044A3C60003C045 /* Products */,
|
33CC10EE2044A3C60003C045 /* Products */,
|
||||||
|
@ -113,7 +119,7 @@
|
||||||
33CC10EE2044A3C60003C045 /* Products */ = {
|
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
33CC10ED2044A3C60003C045 /* cake_wallet_new.app */,
|
33CC10ED2044A3C60003C045 /* Cake Wallet.app */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -194,7 +200,7 @@
|
||||||
);
|
);
|
||||||
name = Runner;
|
name = Runner;
|
||||||
productName = Runner;
|
productName = Runner;
|
||||||
productReference = 33CC10ED2044A3C60003C045 /* cake_wallet_new.app */;
|
productReference = 33CC10ED2044A3C60003C045 /* Cake Wallet.app */;
|
||||||
productType = "com.apple.product-type.application";
|
productType = "com.apple.product-type.application";
|
||||||
};
|
};
|
||||||
/* End PBXNativeTarget section */
|
/* End PBXNativeTarget section */
|
||||||
|
@ -247,7 +253,7 @@
|
||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
|
9F31AE4A2988022C00765327 /* Assets.xcassets in Resources */,
|
||||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -338,6 +344,8 @@
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
9F3F7550298098120030A1D7 /* secRandom.swift in Sources */,
|
||||||
|
9F3F7551298098120030A1D7 /* decrypt.swift in Sources */,
|
||||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
|
||||||
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
|
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
|
||||||
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
|
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
|
||||||
|
@ -425,12 +433,13 @@
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
|
ENABLE_ON_DEMAND_RESOURCES = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
};
|
};
|
||||||
|
@ -555,12 +564,13 @@
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
|
ENABLE_ON_DEMAND_RESOURCES = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
|
@ -579,12 +589,13 @@
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COMBINE_HIDPI_IMAGES = YES;
|
COMBINE_HIDPI_IMAGES = YES;
|
||||||
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
DEVELOPMENT_TEAM = 32J6BB6VUS;
|
||||||
|
ENABLE_ON_DEMAND_RESOURCES = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/../Frameworks",
|
"@executable_path/../Frameworks",
|
||||||
);
|
);
|
||||||
MACOSX_DEPLOYMENT_TARGET = 11;
|
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "cake_wallet_new.app"
|
BuildableName = "Cake Wallet.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "cake_wallet_new.app"
|
BuildableName = "Cake Wallet.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "cake_wallet_new.app"
|
BuildableName = "Cake Wallet.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||||
BuildableName = "cake_wallet_new.app"
|
BuildableName = "Cake Wallet.app"
|
||||||
BlueprintName = "Runner"
|
BlueprintName = "Runner"
|
||||||
ReferencedContainer = "container:Runner.xcodeproj">
|
ReferencedContainer = "container:Runner.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
|
|
@ -1,9 +1,33 @@
|
||||||
import Cocoa
|
import Cocoa
|
||||||
import FlutterMacOS
|
import FlutterMacOS
|
||||||
|
import IOKit.pwr_mgt
|
||||||
|
|
||||||
@NSApplicationMain
|
@NSApplicationMain
|
||||||
class AppDelegate: FlutterAppDelegate {
|
class AppDelegate: FlutterAppDelegate {
|
||||||
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func applicationDidFinishLaunching(_ notification: Notification) {
|
||||||
|
let controller : FlutterViewController = mainFlutterWindow?.contentViewController as! FlutterViewController
|
||||||
|
|
||||||
|
let utilsChannel = FlutterMethodChannel(
|
||||||
|
name: "com.cake_wallet/native_utils",
|
||||||
|
binaryMessenger: controller.engine.binaryMessenger)
|
||||||
|
utilsChannel.setMethodCallHandler({ [weak self] (call: FlutterMethodCall, result: @escaping FlutterResult) -> Void in
|
||||||
|
switch call.method {
|
||||||
|
case "sec_random":
|
||||||
|
guard let args = call.arguments as? Dictionary<String, Any>,
|
||||||
|
let count = args["count"] as? Int else {
|
||||||
|
result(nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
result(secRandom(count: count))
|
||||||
|
|
||||||
|
default:
|
||||||
|
result(FlutterMethodNotImplemented)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,68 +1,68 @@
|
||||||
{
|
{
|
||||||
"images" : [
|
"info": {
|
||||||
|
"version": 1,
|
||||||
|
"author": "xcode"
|
||||||
|
},
|
||||||
|
"images": [
|
||||||
{
|
{
|
||||||
"size" : "16x16",
|
"size": "16x16",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_16.png",
|
"filename": "app_icon_16.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "16x16",
|
"size": "16x16",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_32.png",
|
"filename": "app_icon_32.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "32x32",
|
"size": "32x32",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_32.png",
|
"filename": "app_icon_32.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "32x32",
|
"size": "32x32",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_64.png",
|
"filename": "app_icon_64.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "128x128",
|
"size": "128x128",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_128.png",
|
"filename": "app_icon_128.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "128x128",
|
"size": "128x128",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_256.png",
|
"filename": "app_icon_256.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "256x256",
|
"size": "256x256",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_256.png",
|
"filename": "app_icon_256.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "256x256",
|
"size": "256x256",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_512.png",
|
"filename": "app_icon_512.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "512x512",
|
"size": "512x512",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_512.png",
|
"filename": "app_icon_512.png",
|
||||||
"scale" : "1x"
|
"scale": "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"size" : "512x512",
|
"size": "512x512",
|
||||||
"idiom" : "mac",
|
"idiom": "mac",
|
||||||
"filename" : "app_icon_1024.png",
|
"filename": "app_icon_1024.png",
|
||||||
"scale" : "2x"
|
"scale": "2x"
|
||||||
}
|
|
||||||
],
|
|
||||||
"info" : {
|
|
||||||
"version" : 1,
|
|
||||||
"author" : "xcode"
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
}
|
}
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 678 B |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
@ -5,10 +5,10 @@
|
||||||
// 'flutter create' template.
|
// 'flutter create' template.
|
||||||
|
|
||||||
// The application's name. By default this is also the title of the Flutter window.
|
// The application's name. By default this is also the title of the Flutter window.
|
||||||
PRODUCT_NAME = cake_wallet_new
|
PRODUCT_NAME = Cake Wallet
|
||||||
|
|
||||||
// The application's bundle identifier
|
// The application's bundle identifier
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakeWalletNew
|
PRODUCT_BUNDLE_IDENTIFIER = com.fotolockr.cakewallet
|
||||||
|
|
||||||
// The copyright displayed in application information
|
// The copyright displayed in application information
|
||||||
PRODUCT_COPYRIGHT = Copyright © 2022 com.fotolockr. All rights reserved.
|
PRODUCT_COPYRIGHT = Copyright © 2022 com.fotolockr. All rights reserved.
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>keychain-access-groups</key>
|
<key>keychain-access-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>$(AppIdentifierPrefix)com.cakewallet.macos</string>
|
<string>$(AppIdentifierPrefix)${BUNDLE_ID}</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
|
@ -6,7 +6,7 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>keychain-access-groups</key>
|
<key>keychain-access-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>$(AppIdentifierPrefix)com.cakewallet.macos</string>
|
<string>$(AppIdentifierPrefix)${BUNDLE_ID}</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
|
@ -9,13 +9,12 @@ dependencies:
|
||||||
qr: ^3.0.1
|
qr: ^3.0.1
|
||||||
uuid: 3.0.6
|
uuid: 3.0.6
|
||||||
shared_preferences: ^2.0.15
|
shared_preferences: ^2.0.15
|
||||||
flutter_secure_storage: ^7.0.1
|
flutter_secure_storage:
|
||||||
# flutter_secure_storage:
|
git:
|
||||||
# git:
|
url: https://github.com/cake-tech/flutter_secure_storage.git
|
||||||
# url: https://github.com/cake-tech/flutter_secure_storage.git
|
path: flutter_secure_storage
|
||||||
# path: flutter_secure_storage
|
ref: cake-6.0.0
|
||||||
# ref: cake-6.0.0
|
version: 6.0.0
|
||||||
# version: 6.0.0
|
|
||||||
# provider: ^6.0.3
|
# provider: ^6.0.3
|
||||||
rxdart: ^0.27.4
|
rxdart: ^0.27.4
|
||||||
yaml: ^3.1.1
|
yaml: ^3.1.1
|
||||||
|
@ -62,6 +61,7 @@ dependencies:
|
||||||
permission_handler: ^10.0.0
|
permission_handler: ^10.0.0
|
||||||
device_display_brightness: ^0.0.6
|
device_display_brightness: ^0.0.6
|
||||||
platform_device_id: ^1.0.1
|
platform_device_id: ^1.0.1
|
||||||
|
wakelock: ^0.6.2
|
||||||
cake_backup:
|
cake_backup:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/cake-tech/cake_backup.git
|
url: https://github.com/cake-tech/cake_backup.git
|
||||||
|
@ -75,7 +75,7 @@ dev_dependencies:
|
||||||
mobx_codegen: ^2.0.7
|
mobx_codegen: ^2.0.7
|
||||||
build_resolvers: ^2.0.9
|
build_resolvers: ^2.0.9
|
||||||
hive_generator: ^1.1.3
|
hive_generator: ^1.1.3
|
||||||
flutter_launcher_icons: ^0.9.3
|
flutter_launcher_icons: ^0.11.0
|
||||||
# check flutter_launcher_icons for usage
|
# check flutter_launcher_icons for usage
|
||||||
pedantic: ^1.8.0
|
pedantic: ^1.8.0
|
||||||
# replace https://github.com/dart-lang/lints#migrating-from-packagepedantic
|
# replace https://github.com/dart-lang/lints#migrating-from-packagepedantic
|
||||||
|
@ -84,6 +84,9 @@ flutter_icons:
|
||||||
image_path: "assets/images/app_logo.png"
|
image_path: "assets/images/app_logo.png"
|
||||||
android: true
|
android: true
|
||||||
ios: true
|
ios: true
|
||||||
|
macos:
|
||||||
|
generate: true
|
||||||
|
image_path: "assets/images/app_logo.png"
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
uses-material-design: true
|
uses-material-design: true
|
||||||
|
|
|
@ -13,6 +13,12 @@ cp -rf ./macos/Runner/InfoBase.plist ./macos/Runner/Info.plist
|
||||||
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${APP_MACOS_BUNDLE_ID}" ./macos/Runner/Info.plist
|
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${APP_MACOS_BUNDLE_ID}" ./macos/Runner/Info.plist
|
||||||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${APP_MACOS_VERSION}" ./macos/Runner/Info.plist
|
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${APP_MACOS_VERSION}" ./macos/Runner/Info.plist
|
||||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${APP_MACOS_BUILD_NUMBER}" ./macos/Runner/Info.plist
|
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${APP_MACOS_BUILD_NUMBER}" ./macos/Runner/Info.plist
|
||||||
|
|
||||||
|
# Fill entitlements Bundle ID
|
||||||
|
cp -rf ./macos/Runner/DebugProfileBase.entitlements ./macos/Runner/DebugProfile.entitlements
|
||||||
|
cp -rf ./macos/Runner/ReleaseBase.entitlements ./macos/Runner/Release.entitlements
|
||||||
|
sed -i '' "s/\${BUNDLE_ID}/${APP_MACOS_BUNDLE_ID}/g" ./macos/Runner/DebugProfile.entitlements
|
||||||
|
sed -i '' "s/\${BUNDLE_ID}/${APP_MACOS_BUNDLE_ID}/g" ./macos/Runner/Release.entitlements
|
||||||
CONFIG_ARGS=""
|
CONFIG_ARGS=""
|
||||||
|
|
||||||
case $APP_MACOS_TYPE in
|
case $APP_MACOS_TYPE in
|
||||||
|
|
|
@ -17,7 +17,7 @@ fi
|
||||||
CAKEWALLET_NAME="Cake Wallet"
|
CAKEWALLET_NAME="Cake Wallet"
|
||||||
CAKEWALLET_VERSION="1.0.0"
|
CAKEWALLET_VERSION="1.0.0"
|
||||||
CAKEWALLET_BUILD_NUMBER=1
|
CAKEWALLET_BUILD_NUMBER=1
|
||||||
CAKEWALLET_BUNDLE_ID="com.cakewallet.macos"
|
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||||
|
|
||||||
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
|
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
|
||||||
echo "Wrong app type."
|
echo "Wrong app type."
|
||||||
|
|
|
@ -32,6 +32,10 @@ export CMAKE_INCLUDE_PATH="${PREFIX}/include"
|
||||||
export CMAKE_LIBRARY_PATH="${PREFIX}/lib"
|
export CMAKE_LIBRARY_PATH="${PREFIX}/lib"
|
||||||
rm -r monero/build > /dev/null
|
rm -r monero/build > /dev/null
|
||||||
|
|
||||||
|
if [ "${ARCH}" == "x86_64" ]; then
|
||||||
|
ARCH="x86-64"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p monero/build/${BUILD_TYPE}
|
mkdir -p monero/build/${BUILD_TYPE}
|
||||||
pushd monero/build/${BUILD_TYPE}
|
pushd monero/build/${BUILD_TYPE}
|
||||||
cmake -DARCH=${ARCH} \
|
cmake -DARCH=${ARCH} \
|
||||||
|
|