From 9876b35e22c40c9a6c7ce04b8305ad1373f036c8 Mon Sep 17 00:00:00 2001 From: Hanh Date: Fri, 7 Jun 2024 16:00:07 +1000 Subject: [PATCH] transparent tx history custom send toggle --- lib/pages/accounts/send.dart | 11 ++++++++++- native/zcash-sync | 2 +- pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/pages/accounts/send.dart b/lib/pages/accounts/send.dart index c62682b7..6298bdfb 100644 --- a/lib/pages/accounts/send.dart +++ b/lib/pages/accounts/send.dart @@ -66,10 +66,12 @@ class _QuickSendState extends State with WithLoadingAnimation { int addressPools = 0; bool isTex = false; int rp = 0; + late bool custom; @override void initState() { super.initState(); + custom = widget.custom ^ appSettings.customSend; _didUpdateSendContext(widget.sendContext); } @@ -85,7 +87,6 @@ class _QuickSendState extends State with WithLoadingAnimation { @override Widget build(BuildContext context) { - final custom = widget.custom ^ appSettings.customSend; final customSendSettings = appSettings.customSendSettings; final spendable = getSpendable(_pools, balances); final numReceivers = numPoolsOf(addressPools); @@ -94,6 +95,10 @@ class _QuickSendState extends State with WithLoadingAnimation { appBar: AppBar( title: Text(s.send), actions: [ + IconButton( + onPressed: _toggleCustom, + icon: Icon(Icons.tune), + ), IconButton( onPressed: send, icon: Icon(widget.single ? Icons.send : Icons.add), @@ -273,4 +278,8 @@ class _QuickSendState extends State with WithLoadingAnimation { addressPools = receivers & coinSettings.receipientPools; rp = addressPools; } + + _toggleCustom() { + setState(() => custom = !custom); + } } diff --git a/native/zcash-sync b/native/zcash-sync index 3e326238..c9246c95 160000 --- a/native/zcash-sync +++ b/native/zcash-sync @@ -1 +1 @@ -Subproject commit 3e32623834864ac6bbf099977b85e26516376ce3 +Subproject commit c9246c9554c1db381b56037e542cbbbb7d823511 diff --git a/pubspec.yaml b/pubspec.yaml index c526105a..afd5fa44 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.6.0+529 +version: 1.6.0+530 environment: sdk: ">=3.0.0 <4.0.0"