mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
all transactions v2 for bch
This commit is contained in:
parent
0396b7865f
commit
a299ca1315
4 changed files with 1069 additions and 23 deletions
|
@ -87,6 +87,11 @@ class TransactionV2 {
|
|||
return Amount(rawValue: inSum, fractionDigits: coin.decimals);
|
||||
}
|
||||
|
||||
Set<String> associatedAddresses() => {
|
||||
...inputs.map((e) => e.addresses).expand((e) => e),
|
||||
...outputs.map((e) => e.addresses).expand((e) => e),
|
||||
};
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'TransactionV2(\n'
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -21,6 +21,7 @@ import 'package:stackwallet/pages/special/firo_rescan_recovery_error_dialog.dart
|
|||
import 'package:stackwallet/pages/token_view/my_tokens_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/sub_widgets/transactions_list.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/all_transactions_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/tx_v2/transaction_v2_list.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_features.dart';
|
||||
import 'package:stackwallet/pages_desktop_specific/my_stack_view/wallet_view/sub_widgets/desktop_wallet_summary.dart';
|
||||
|
@ -461,30 +462,33 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
|
|||
.hasTokenSupport))
|
||||
? "Edit"
|
||||
: "See all",
|
||||
onTap: ref.watch(walletsChangeNotifierProvider.select(
|
||||
(value) => value
|
||||
.getManager(widget.walletId)
|
||||
.hasTokenSupport))
|
||||
? () async {
|
||||
final result = await showDialog<int?>(
|
||||
context: context,
|
||||
builder: (context) => EditWalletTokensView(
|
||||
walletId: widget.walletId,
|
||||
isDesktopPopup: true,
|
||||
),
|
||||
);
|
||||
onTap: () async {
|
||||
if (ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
.getManager(widget.walletId)
|
||||
.hasTokenSupport) {
|
||||
final result = await showDialog<int?>(
|
||||
context: context,
|
||||
builder: (context) => EditWalletTokensView(
|
||||
walletId: widget.walletId,
|
||||
isDesktopPopup: true,
|
||||
),
|
||||
);
|
||||
|
||||
if (result == 42) {
|
||||
// wallet tokens were edited so update ui
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
: () {
|
||||
Navigator.of(context).pushNamed(
|
||||
AllTransactionsView.routeName,
|
||||
arguments: widget.walletId,
|
||||
);
|
||||
},
|
||||
if (result == 42) {
|
||||
// wallet tokens were edited so update ui
|
||||
setState(() {});
|
||||
}
|
||||
} else {
|
||||
await Navigator.of(context).pushNamed(
|
||||
coin == Coin.bitcoincash ||
|
||||
coin == Coin.bitcoincashTestnet
|
||||
? AllTransactionsV2View.routeName
|
||||
: AllTransactionsView.routeName,
|
||||
arguments: widget.walletId,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -132,6 +132,7 @@ import 'package:stackwallet/pages/wallet_view/transaction_views/all_transactions
|
|||
import 'package:stackwallet/pages/wallet_view/transaction_views/edit_note_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_details_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/transaction_search_filter_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/tx_v2/all_transactions_v2_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/tx_v2/fusion_group_details_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/transaction_views/tx_v2/transaction_v2_details_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/wallet_view.dart';
|
||||
|
@ -1324,6 +1325,20 @@ class RouteGenerator {
|
|||
}
|
||||
return _routeError("${settings.name} invalid args: ${args.toString()}");
|
||||
|
||||
case AllTransactionsV2View.routeName:
|
||||
if (args is String) {
|
||||
return getRoute(
|
||||
shouldUseMaterialRoute: useMaterialPageRoute,
|
||||
builder: (_) => AllTransactionsV2View(
|
||||
walletId: args,
|
||||
),
|
||||
settings: RouteSettings(
|
||||
name: settings.name,
|
||||
),
|
||||
);
|
||||
}
|
||||
return _routeError("${settings.name} invalid args: ${args.toString()}");
|
||||
|
||||
case TransactionSearchFilterView.routeName:
|
||||
if (args is Coin) {
|
||||
return getRoute(
|
||||
|
|
Loading…
Reference in a new issue