mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-16 17:27:37 +00:00
fix: Generic fixes of bugs from Support (#1774)
Some checks failed
Cache Dependencies / test (push) Has been cancelled
Some checks failed
Cache Dependencies / test (push) Has been cancelled
This commit is contained in:
parent
5fc649023c
commit
752b6bbebf
10 changed files with 46 additions and 6 deletions
|
@ -2270,6 +2270,8 @@ abstract class ElectrumWalletBase extends WalletBase<
|
|||
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> {
|
|||
);
|
||||
},
|
||||
);
|
||||
item.completer.complete(value);
|
||||
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