mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-31 03:29:04 +00:00
[skip ci] Merge branch 'main' of https://github.com/cake-tech/cake_wallet into mweb
This commit is contained in:
commit
34d5d96cc7
3 changed files with 18 additions and 10 deletions
cw_bitcoin/lib
lib/src/screens/dashboard/widgets
|
@ -76,8 +76,13 @@ abstract class ElectrumTransactionHistoryBase
|
|||
final val = entry.value;
|
||||
|
||||
if (val is Map<String, dynamic>) {
|
||||
final tx = ElectrumTransactionInfo.fromJson(val, walletInfo.type);
|
||||
_update(tx);
|
||||
// removing transactions with invalid date
|
||||
if (val['date'] == 1168650000) {
|
||||
transactions.remove(entry.key);
|
||||
} else {
|
||||
final tx = ElectrumTransactionInfo.fromJson(val, walletInfo.type);
|
||||
_update(tx);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -1629,7 +1629,7 @@ abstract class ElectrumWalletBase
|
|||
}
|
||||
|
||||
if (height != null) {
|
||||
if (time == null) {
|
||||
if (time == null && height > 0) {
|
||||
time = (getDateByBitcoinHeight(height).millisecondsSinceEpoch / 1000).round();
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,15 @@ class MenuWidgetState extends State<MenuWidget> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final itemCount = SettingActions.all.length;
|
||||
List<SettingActions> items = SettingActions.all;
|
||||
if (!widget.dashboardViewModel.hasSilentPayments) {
|
||||
items.removeWhere((element) => element.name(context) == S.of(context).silent_payments_settings);
|
||||
}
|
||||
// if (!widget.dashboardViewModel.hasMweb) {
|
||||
// itemCount--;
|
||||
// items.removeWhere((element) => element.name(context) == S.of(context).litecoin_mweb_settings);
|
||||
// }
|
||||
int itemCount = items.length;
|
||||
|
||||
moneroIcon = Image.asset('assets/images/monero_menu.png',
|
||||
color: Theme.of(context).extension<CakeMenuTheme>()!.iconColor);
|
||||
|
@ -181,12 +189,7 @@ class MenuWidgetState extends State<MenuWidget> {
|
|||
|
||||
index--;
|
||||
|
||||
final item = SettingActions.all[index];
|
||||
|
||||
if (!widget.dashboardViewModel.hasSilentPayments &&
|
||||
item.name(context) == S.of(context).silent_payments_settings) {
|
||||
return Container();
|
||||
}
|
||||
final item = items[index];
|
||||
|
||||
if (!widget.dashboardViewModel.hasMweb &&
|
||||
item.name(context) == S.current.litecoin_mweb_settings) {
|
||||
|
|
Loading…
Reference in a new issue