mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
Merge branch 'main' of https://github.com/cake-tech/cake_wallet into mweb_enhancements_4
This commit is contained in:
commit
85b3969e1f
12 changed files with 50 additions and 9 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
# Cake Wallet
|
||||
|
||||
Cake Wallet is an open source, non-custodial, and private multi-currency crypto wallet for Android, iOS, macOS, and Linux.
|
||||
[Cake Wallet](https://cakewallet.com) is an open source, non-custodial, and private multi-currency crypto wallet for Android, iOS, macOS, and Linux.
|
||||
|
||||
Cake Wallet includes support for several cryptocurrencies, including:
|
||||
* Monero (XMR)
|
||||
|
@ -26,7 +26,7 @@ Cake Wallet includes support for several cryptocurrencies, including:
|
|||
* Ethereum (ETH)
|
||||
* Litecoin (LTC)
|
||||
* Bitcoin Cash (BCH)
|
||||
* Polygon (MATIC)
|
||||
* Polygon (Pol)
|
||||
* Solana (SOL)
|
||||
* Nano (XNO)
|
||||
* Haven (XHV)
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<!-- required for API 18 - 30 -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="30" />
|
||||
|
||||
<!-- required for API <= 29 -->
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
|
||||
|
|
|
@ -2269,6 +2269,8 @@ abstract class ElectrumWalletBase
|
|||
Timer(Duration(seconds: 5), () {
|
||||
if (this.syncStatus is NotConnectedSyncStatus ||
|
||||
this.syncStatus is LostConnectionSyncStatus) {
|
||||
if (node == null) return;
|
||||
|
||||
this.electrumClient.connectToUri(
|
||||
node!.uri,
|
||||
useSSL: node!.useSSL ?? false,
|
||||
|
|
|
@ -23,6 +23,8 @@ abstract class HavenWalletAddressesBase extends WalletAddressesWithAccount<Accou
|
|||
@observable
|
||||
String address;
|
||||
|
||||
String get primaryAddress => address;
|
||||
|
||||
// @override
|
||||
@observable
|
||||
Account? account;
|
||||
|
|
|
@ -267,6 +267,8 @@ abstract class Web3WalletServiceBase with Store {
|
|||
|
||||
final keyForWallet = getKeyForStoringTopicsForWallet();
|
||||
|
||||
if (keyForWallet.isEmpty) return;
|
||||
|
||||
final currentTopicsForWallet = getPairingTopicsForWallet(keyForWallet);
|
||||
|
||||
final filteredPairings =
|
||||
|
@ -360,6 +362,10 @@ abstract class Web3WalletServiceBase with Store {
|
|||
String getKeyForStoringTopicsForWallet() {
|
||||
List<ChainKeyModel> chainKeys = walletKeyService.getKeysForChain(appStore.wallet!);
|
||||
|
||||
if (chainKeys.isEmpty) {
|
||||
return '';
|
||||
}
|
||||
|
||||
final keyForPairingTopic =
|
||||
PreferencesKey.walletConnectPairingTopicsListForWallet(chainKeys.first.publicKey);
|
||||
|
||||
|
@ -386,6 +392,8 @@ abstract class Web3WalletServiceBase with Store {
|
|||
// Get key specific to the current wallet
|
||||
final key = getKeyForStoringTopicsForWallet();
|
||||
|
||||
if (key.isEmpty) return;
|
||||
|
||||
// Get all pairing topics attached to this key
|
||||
final pairingTopicsForWallet = getPairingTopicsForWallet(key);
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ class FiatCurrency extends EnumerableItem<String> with Serializable<String> impl
|
|||
FiatCurrency.tur.raw: FiatCurrency.tur,
|
||||
};
|
||||
|
||||
static FiatCurrency deserialize({required String raw}) => _all[raw]!;
|
||||
static FiatCurrency deserialize({required String raw}) => _all[raw] ?? FiatCurrency.usd;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => other is FiatCurrency && other.raw == raw;
|
||||
|
|
|
@ -10,7 +10,6 @@ import 'package:cake_wallet/src/screens/dashboard/desktop_widgets/dropdown_item_
|
|||
import 'package:cake_wallet/src/screens/wallet_unlock/wallet_unlock_arguments.dart';
|
||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||
import 'package:cake_wallet/store/settings_store.dart';
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:cake_wallet/themes/extensions/menu_theme.dart';
|
||||
import 'package:cake_wallet/utils/show_bar.dart';
|
||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||
|
@ -100,6 +99,11 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
|
|||
),
|
||||
];
|
||||
|
||||
final selectedItem = dropDownItems.firstWhere(
|
||||
(element) => element.isSelected,
|
||||
orElse: () => dropDownItems.first,
|
||||
);
|
||||
|
||||
return DropdownButton<DesktopDropdownItem>(
|
||||
items: dropDownItems
|
||||
.map(
|
||||
|
@ -115,7 +119,7 @@ class _DesktopWalletSelectionDropDownState extends State<DesktopWalletSelectionD
|
|||
dropdownColor: themeData.extension<CakeMenuTheme>()!.backgroundColor,
|
||||
style: TextStyle(color: themeData.extension<CakeTextTheme>()!.titleColor),
|
||||
selectedItemBuilder: (context) => dropDownItems.map((item) => item.child).toList(),
|
||||
value: dropDownItems.firstWhere((element) => element.isSelected),
|
||||
value: selectedItem,
|
||||
underline: const SizedBox(),
|
||||
focusColor: Colors.transparent,
|
||||
borderRadius: BorderRadius.circular(15.0),
|
||||
|
|
|
@ -52,7 +52,9 @@ class BottomSheetListenerState extends State<BottomSheetListener> {
|
|||
);
|
||||
},
|
||||
);
|
||||
if (!item.completer.isCompleted) {
|
||||
item.completer.complete(value);
|
||||
}
|
||||
widget.bottomSheetService.resetCurrentSheet();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ class CakeImageWidget extends StatelessWidget {
|
|||
imageUrl!,
|
||||
height: height,
|
||||
width: width,
|
||||
errorBuilder: (_, __, ___) => Icon(Icons.error),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -33,6 +34,7 @@ class CakeImageWidget extends StatelessWidget {
|
|||
imageUrl!,
|
||||
height: height,
|
||||
width: width,
|
||||
placeholderBuilder: (_) => Icon(Icons.error),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
|
|||
"assets/images/notification_icon.svg",
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
|
||||
width: 30,
|
||||
placeholderBuilder: (_) => Icon(Icons.error),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -136,6 +137,7 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
|
|||
"assets/images/notification_icon.svg",
|
||||
color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
|
||||
width: 30,
|
||||
placeholderBuilder: (_) => Icon(Icons.error),
|
||||
),
|
||||
if (state.hasData && state.data!.hasUpdates && !wasOpened)
|
||||
Container(
|
||||
|
|
|
@ -62,6 +62,14 @@ class ExceptionHandler {
|
|||
|
||||
await _addDeviceInfo(_file!);
|
||||
|
||||
// Check if a mail client is available
|
||||
final bool canSend = await FlutterMailer.canSendMail();
|
||||
|
||||
if (Platform.isIOS && !canSend) {
|
||||
debugPrint('Mail app is not available');
|
||||
return;
|
||||
}
|
||||
|
||||
final MailOptions mailOptions = MailOptions(
|
||||
subject: 'Mobile App Issue',
|
||||
recipients: ['support@cakewallet.com'],
|
||||
|
|
|
@ -53,8 +53,18 @@ class ImageUtil {
|
|||
);
|
||||
} else {
|
||||
return isSvg
|
||||
? SvgPicture.asset(imagePath, height: _height, width: _width)
|
||||
: Image.asset(imagePath, height: _height, width: _width);
|
||||
? SvgPicture.asset(
|
||||
imagePath,
|
||||
height: _height,
|
||||
width: _width,
|
||||
placeholderBuilder: (_) => Icon(Icons.error),
|
||||
)
|
||||
: Image.asset(
|
||||
imagePath,
|
||||
height: _height,
|
||||
width: _width,
|
||||
errorBuilder: (_, __, ___) => Icon(Icons.error),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue