mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-23 06:38:35 +02:00
Merge branch 'dev' into list-item-padding
This commit is contained in:
@@ -185,7 +185,8 @@ class CWBitcoin extends Bitcoin {
|
||||
txCount: addr.txCount,
|
||||
balance: addr.balance,
|
||||
isChange: addr.isHidden,
|
||||
isLegacyDerivation: addr.isLegacyDerivation))
|
||||
isLegacyDerivation: addr.isLegacyDerivation,
|
||||
derivationPath: addr.derivationPath))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@@ -574,7 +575,8 @@ class CWBitcoin extends Bitcoin {
|
||||
address: addr.address,
|
||||
txCount: addr.txCount,
|
||||
balance: addr.balance,
|
||||
isChange: addr.isHidden))
|
||||
isChange: addr.isHidden,
|
||||
derivationPath: addr.derivationPath))
|
||||
.toList();
|
||||
}
|
||||
|
||||
@@ -589,7 +591,8 @@ class CWBitcoin extends Bitcoin {
|
||||
address: addr.address,
|
||||
txCount: addr.txCount,
|
||||
balance: addr.balance,
|
||||
isChange: addr.isHidden))
|
||||
isChange: addr.isHidden,
|
||||
derivationPath: addr.derivationPath))
|
||||
.toList();
|
||||
}
|
||||
|
||||
|
||||
@@ -310,6 +310,7 @@ import 'buy/kryptonim/kryptonim.dart';
|
||||
import 'buy/meld/meld_buy_provider.dart';
|
||||
import 'dogecoin/dogecoin.dart';
|
||||
import 'new-ui/viewmodels/card_customizer/card_customizer_bloc.dart';
|
||||
import 'new-ui/widgets/addresses_page/address_info.dart';
|
||||
import 'src/screens/buy/buy_sell_page.dart';
|
||||
|
||||
final getIt = GetIt.instance;
|
||||
@@ -880,6 +881,11 @@ Future<void> setup({
|
||||
walletAddressEditOrCreateViewModel:
|
||||
getIt.get<WalletAddressEditOrCreateViewModel>(param1: item)));
|
||||
|
||||
getIt.registerFactoryParam<AddressInfoPopup, dynamic, void>((dynamic item, _) =>
|
||||
AddressInfoPopup(
|
||||
walletAddressEditOrCreateViewModel:
|
||||
getIt.get<WalletAddressEditOrCreateViewModel>(param1: item)));
|
||||
|
||||
getIt.registerFactoryParam<ReceiveLabelModal, dynamic, void>((dynamic item, _) =>
|
||||
ReceiveLabelModal(
|
||||
walletAddressEditOrCreateViewModel:
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:cake_wallet/di.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
import 'package:cake_wallet/monero/monero.dart';
|
||||
import 'package:cake_wallet/new-ui/long_press_popup.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/addresses_page/address_info.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/addresses_page/address_label_input.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/coins_page/cards/balance_card.dart';
|
||||
import 'package:cake_wallet/new-ui/widgets/long_press_menu.dart';
|
||||
@@ -355,6 +356,15 @@ class AddressRow extends StatelessWidget {
|
||||
onAddressHidden();
|
||||
},
|
||||
color: Theme.of(context).colorScheme.error),
|
||||
LongPressMenuItem(
|
||||
label: 'Info',
|
||||
iconPath: "assets/images/info_icon.svg",
|
||||
onSelected: () async {
|
||||
Navigator.of(context, rootNavigator: true).pop();
|
||||
await showPopUp(
|
||||
context: context,
|
||||
builder: (context) => getIt.get<AddressInfoPopup>(param1: item));
|
||||
}),
|
||||
],
|
||||
),
|
||||
child: AnimatedContainer(
|
||||
|
||||
@@ -390,6 +390,8 @@ class _NewSwapPageState extends State<NewSwapPage> {
|
||||
final isCurrentTypeWallet = exchangeViewModel.useSameWalletAddress(currency);
|
||||
|
||||
if (key == depositKey && !isCurrentTypeWallet) exchangeViewModel.isSendFromExternal = true;
|
||||
if (key == depositKey && isCurrentTypeWallet) exchangeViewModel.isSendFromExternal = false;
|
||||
|
||||
|
||||
key.currentState!.changeSelectedCurrency(currency);
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:cake_wallet/view_model/wallet_address_list/wallet_address_edit_or_create_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AddressInfoPopup extends StatelessWidget {
|
||||
const AddressInfoPopup({
|
||||
super.key,
|
||||
required this.walletAddressEditOrCreateViewModel,
|
||||
});
|
||||
|
||||
final WalletAddressEditOrCreateViewModel walletAddressEditOrCreateViewModel;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BackdropFilter(
|
||||
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
borderRadius: BorderRadiusGeometry.lerp(
|
||||
BorderRadius.circular(12),
|
||||
BorderRadius.circular(24),
|
||||
0.5,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Index: ${walletAddressEditOrCreateViewModel.index}'),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'Derivation Path: ${walletAddressEditOrCreateViewModel.derivationPath}'),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -145,8 +145,7 @@ class OtherSettingsPage extends BasePage {
|
||||
Navigator.of(context).pushNamed(Routes.signPage);
|
||||
}),
|
||||
],
|
||||
"dev": [
|
||||
if (_otherSettingsViewModel.walletType == WalletType.bitcoin) ...[
|
||||
if (_otherSettingsViewModel.walletType == WalletType.bitcoin) "btc_logging": [
|
||||
ListItemRegularRow(
|
||||
keyValue: "export_lightning_logs",
|
||||
label: S.of(context).export_lightning_logs,
|
||||
@@ -155,21 +154,20 @@ class OtherSettingsPage extends BasePage {
|
||||
keyValue: "export_payjoin_logs",
|
||||
label: S.of(context).export_payjoin_logs,
|
||||
onTap: () => onExportPJLog(context)),
|
||||
],
|
||||
if (FeatureFlag.hasDevOptions && _otherSettingsViewModel.walletType == WalletType.monero)
|
||||
],
|
||||
"dev": FeatureFlag.hasDevOptions == false ? [] : [
|
||||
if (_otherSettingsViewModel.walletType == WalletType.monero)
|
||||
ListItemRegularRow(
|
||||
keyValue: "[dev] monero background sync",
|
||||
label: "[dev] monero background sync",
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroBackgroundSync)),
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
[WalletType.monero, WalletType.wownero, WalletType.zano]
|
||||
if ([WalletType.monero, WalletType.wownero, WalletType.zano]
|
||||
.contains(_otherSettingsViewModel.walletType))
|
||||
ListItemRegularRow(
|
||||
keyValue: "[dev] xmr call profiler",
|
||||
label: "[dev] xmr call profiler",
|
||||
onTap: () => Navigator.of(context).pushNamed(Routes.devMoneroCallProfiler)),
|
||||
if (FeatureFlag.hasDevOptions &&
|
||||
[WalletType.monero].contains(_otherSettingsViewModel.walletType))
|
||||
if ([WalletType.monero].contains(_otherSettingsViewModel.walletType))
|
||||
ListItemRegularRow(
|
||||
keyValue: '[dev] xmr wallet cache debug',
|
||||
label: '[dev] xmr wallet cache debug',
|
||||
|
||||
@@ -397,7 +397,7 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
|
||||
String get _explorerUrl {
|
||||
|
||||
final txId = transactionInfo.id;
|
||||
final txId = transactionInfo.txHash;
|
||||
if (wallet.chainId != null) {
|
||||
final explorerUrl = evm!.getExplorerUrlForChainId(wallet.chainId!);
|
||||
if (explorerUrl != null) return '$explorerUrl/tx/${txId}';
|
||||
|
||||
@@ -51,6 +51,9 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store {
|
||||
_wallet.type == WalletType.litecoin ||
|
||||
_wallet.type == WalletType.dogecoin;
|
||||
|
||||
String get derivationPath => _item?.derivationPath ?? '';
|
||||
String get index => _item?.id.toString() ?? '';
|
||||
|
||||
Future<void> save() async {
|
||||
try {
|
||||
state = AddressIsSaving();
|
||||
|
||||
@@ -14,6 +14,7 @@ class WalletAddressListItem extends ListItem {
|
||||
this.isHidden = false,
|
||||
this.isManual = false,
|
||||
this.isLegacyDerivation = false,
|
||||
this.derivationPath
|
||||
}) : super();
|
||||
|
||||
final int? id;
|
||||
@@ -26,6 +27,7 @@ class WalletAddressListItem extends ListItem {
|
||||
bool isHidden;
|
||||
bool isManual;
|
||||
bool isLegacyDerivation;
|
||||
String? derivationPath;
|
||||
final bool? isOneTimeReceiveAddress;
|
||||
|
||||
@override
|
||||
|
||||
@@ -258,6 +258,7 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
|
||||
balance: _appStore.amountParsingProxy
|
||||
.getDisplayCryptoString(address.balance, walletTypeToCryptoCurrency(type)),
|
||||
isChange: address.isChange,
|
||||
derivationPath: address.derivationPath,
|
||||
);
|
||||
});
|
||||
addressList.addAll(addressItems);
|
||||
@@ -275,6 +276,7 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
|
||||
.getDisplayCryptoString(address.balance, walletTypeToCryptoCurrency(type)),
|
||||
isChange: address.isChange,
|
||||
isOneTimeReceiveAddress: true,
|
||||
derivationPath: address.derivationPath,
|
||||
);
|
||||
});
|
||||
addressList.addAll(receivedAddressItems);
|
||||
@@ -291,7 +293,8 @@ abstract class WalletAddressListViewModelBase extends WalletChangeListenerViewMo
|
||||
balance: _appStore.amountParsingProxy
|
||||
.getDisplayCryptoString(subaddress.balance, walletTypeToCryptoCurrency(type)),
|
||||
isChange: subaddress.isChange,
|
||||
isLegacyDerivation: subaddress.isLegacyDerivation);
|
||||
isLegacyDerivation: subaddress.isLegacyDerivation,
|
||||
derivationPath: subaddress.derivationPath);
|
||||
});
|
||||
|
||||
// don't show all 1000+ mweb addresses:
|
||||
|
||||
Reference in New Issue
Block a user